|
@@ -261,7 +261,6 @@
|
|
|
this.disFormulaList = data.disformula
|
|
|
}
|
|
|
this.hasQuestion = data.hasQuestion
|
|
|
- console.log('this.disFeatureList', this.disFeatureList)
|
|
|
}
|
|
|
} else {
|
|
|
|
|
@@ -482,17 +481,13 @@
|
|
|
}
|
|
|
this.disFeatureListResult = []
|
|
|
this.disFormulaListResult = []
|
|
|
- let errStrList = [];
|
|
|
+
|
|
|
for(let i = 0; i < this.disFeatureList.length; i++) { //如果有任意一项有值,就检测,所有项都没值,则删掉这条数据
|
|
|
if(this.disFeatureList[i].type || this.disFeatureList[i].code || this.disFeatureList[i].standard || this.disFeatureList[i].relation || this.disFeatureList[i].midResult) {
|
|
|
this.disFeatureListResult.push(this.disFeatureList[i])
|
|
|
}
|
|
|
}
|
|
|
- for(let i = 0; i < this.disFormulaList.length; i++) { //如果有任意一项有值,就检测,所有项都没值,则删掉这条数据
|
|
|
- if(this.disFormulaList[i].type || this.disFormulaList[i].formula ) {
|
|
|
- this.disFormulaListResult.push(this.disFormulaList[i])
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
let disFeatureList;
|
|
|
if(this.disFeatureListResult.length) {
|
|
|
disFeatureList = this.disFeatureListResult;
|
|
@@ -510,8 +505,7 @@
|
|
|
}
|
|
|
];
|
|
|
}
|
|
|
- this.disFormulaList = this.disFormulaListResult;
|
|
|
-
|
|
|
+ this.disFeatureList = disFeatureList
|
|
|
// this.showDelDialog()
|
|
|
return this.diagBaseVerifyData(type)
|
|
|
|
|
@@ -519,9 +513,9 @@
|
|
|
diagBaseVerifyData(type) {
|
|
|
//判断诊断依据先判断化验有没有公表项
|
|
|
const labArr= []
|
|
|
- for (let i = 0; i < this.disFormulaList.length; i++) {
|
|
|
- if(+this.disFormulaList[i].type === 3) {
|
|
|
- labArr.push({index: i, mealName: this.disFormulaList[i].standard, itemName: this.disFormulaList[i].relation, uniqueName:''})
|
|
|
+ for (let i = 0; i < this.disFeatureList.length; i++) {
|
|
|
+ if(+this.disFeatureList[i].type === 3) {
|
|
|
+ labArr.push({index: i, mealName: this.disFeatureList[i].standard, itemName: this.disFeatureList[i].relation, uniqueName:''})
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -549,9 +543,16 @@
|
|
|
this.verifyDiagBase(loading,type)
|
|
|
}
|
|
|
},
|
|
|
- errorDataVerify() {
|
|
|
+ errorDataVerify(loading) {
|
|
|
+ for(let i = 0; i < this.disFormulaList.length; i++) { //如果有任意一项有值,就检测,所有项都没值,则删掉这条数据
|
|
|
+ if(this.disFormulaList[i].type || this.disFormulaList[i].formula ) {
|
|
|
+ this.disFormulaListResult.push(this.disFormulaList[i])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ const disFeatureList = this.disFeatureList;
|
|
|
const disFormulaList = this.disFormulaListResult;
|
|
|
let codeErrorNum = 0;
|
|
|
+ let errStrList = [];
|
|
|
//必填项是否填写
|
|
|
for(let i=0; i < disFeatureList.length; i++) {
|
|
|
if(!disFeatureList[i].type) {
|
|
@@ -700,9 +701,12 @@
|
|
|
}
|
|
|
|
|
|
if(errStrList.length >0 ||codeErrorNum > 0 ||formulaListErrNum > 0) {
|
|
|
+ this.disFeatureList = JSON.parse(JSON.stringify(disFeatureList))
|
|
|
this.errorTips(errorStr)
|
|
|
- return
|
|
|
+ loading.close()
|
|
|
+ return false
|
|
|
}
|
|
|
+ return true
|
|
|
},
|
|
|
labVerifyData(labArr, loading,type) {
|
|
|
const labArrParam = {
|
|
@@ -760,6 +764,10 @@
|
|
|
id: this.id,
|
|
|
modifier: this.modifier
|
|
|
}
|
|
|
+ const hasErrorData = this.errorDataVerify(loading)
|
|
|
+ if(!hasErrorData) {
|
|
|
+ return
|
|
|
+ }
|
|
|
return api.diagBaseVerifyData(param).then((res) => {
|
|
|
if(+res.data.code === 0) {
|
|
|
const data = res.data.data
|