|
@@ -72,7 +72,7 @@
|
|
|
</tr>
|
|
|
</table>
|
|
|
<p class="moduleTitle">诊断公式:</p>
|
|
|
- <p class="inpTips">可输入数字(0~9)规定内汉字:任、一、二、三、四、五、六、七、八、九、十,其余汉字不可输入;可输入的符号:“.”“/”“()”</p>
|
|
|
+ <p class="inpTips">可输入数字(0~9)规定内汉字:任、一、二、三、四、五、六、七、八、九、十,其余汉字不可输入;可输入的符号:“.”、“/”、“()”</p>
|
|
|
<table class="diagTable">
|
|
|
<tr class="tableTitle">
|
|
|
<td class="FormulaSort">排序</td>
|
|
@@ -106,7 +106,7 @@
|
|
|
<div class="btnBox">
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
- @click="submitForm()"
|
|
|
+ @click="submitForm('save')"
|
|
|
>校验并保存数据</el-button>
|
|
|
<el-button
|
|
|
type="primary"
|
|
@@ -276,7 +276,7 @@
|
|
|
}
|
|
|
},
|
|
|
updateNeo() {
|
|
|
- this.submitForm().then(() => {
|
|
|
+ this.submitForm('updateNeo').then(() => {
|
|
|
if(this.hasQuestion == 0) {
|
|
|
const param = {
|
|
|
id: this.id,
|
|
@@ -284,11 +284,13 @@
|
|
|
}
|
|
|
api.diagBaseUpdateNeo(param).then((res) => {
|
|
|
if(res.data.code == 0) {
|
|
|
- this.warning('更新成功')
|
|
|
+ this.warning('更新成功', 'success');
|
|
|
} else {
|
|
|
this.warning(res.data.msg)
|
|
|
}
|
|
|
})
|
|
|
+ } else {
|
|
|
+ this.warning('更新失败');
|
|
|
}
|
|
|
|
|
|
})
|
|
@@ -298,22 +300,24 @@
|
|
|
},
|
|
|
exportDiagnosticAll(){
|
|
|
|
|
|
- this.submitForm().then(() => {
|
|
|
+ this.submitForm('export').then(() => {
|
|
|
if(this.hasQuestion == 0) {
|
|
|
const param = {
|
|
|
diagnoseId: this.id
|
|
|
}
|
|
|
api.exportDiagnosticAll(param).then((res) => {
|
|
|
- utils.downloadExportedData(res.data,'诊断依据' )
|
|
|
+ utils.downloadExportedData(res.data,'诊断依据');
|
|
|
})
|
|
|
+ }else {
|
|
|
+ this.warning('导出失败');
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
- submitForm() {
|
|
|
+ submitForm(type) {
|
|
|
if(!this.disName) {
|
|
|
- this.warning('请选择诊断')
|
|
|
+ this.warning('请选择诊断');
|
|
|
return
|
|
|
}
|
|
|
this.disFeatureListResult = []
|
|
@@ -412,10 +416,10 @@
|
|
|
return
|
|
|
}
|
|
|
// this.showDelDialog()
|
|
|
- return this.diagBaseVerifyData()
|
|
|
+ return this.diagBaseVerifyData(type)
|
|
|
|
|
|
},
|
|
|
- diagBaseVerifyData() {
|
|
|
+ diagBaseVerifyData(type) {
|
|
|
const param = {
|
|
|
disFeature: this.disFeatureListResult,
|
|
|
disName: this.disName,
|
|
@@ -425,11 +429,14 @@
|
|
|
}
|
|
|
return api.diagBaseVerifyData(param).then((res) => {
|
|
|
const data = res.data.data
|
|
|
- if(data.hasQuestion) {
|
|
|
- this.warning('校验完成请先调整问题词')
|
|
|
- } else {
|
|
|
- this.warning('校验成功')
|
|
|
+ if(type =='save') {
|
|
|
+ if(data.hasQuestion) {
|
|
|
+ this.warning('校验完成请先调整问题词,该数据已保存')
|
|
|
+ } else {
|
|
|
+ this.warning('校验成功', 'success')
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
this.id = data.id
|
|
|
this.disFeatureList = data.disFeature
|
|
|
if(data.disformula.length) {
|