Selaa lähdekoodia

诊断依据修改(未完成)

zhangxc 5 vuotta sitten
vanhempi
commit
6f93292879
1 muutettua tiedostoa jossa 48 lisäystä ja 46 poistoa
  1. 48 46
      src/components/diagBase/AddDiagBase.vue

+ 48 - 46
src/components/diagBase/AddDiagBase.vue

@@ -92,7 +92,7 @@
                                 type="textarea"
                                 :readonly = true
                                 :autosize="{ minRows: 1}"
-                                :class="{borderRed:item.uniqueName===null}" 
+                                :class="{borderRed:item.uniqueName===null ||item.verifyUnique}" 
                                 :title="item.uniqueName" 
                                 v-model.trim="item.uniqueName" 
                                 >
@@ -261,7 +261,7 @@
                     this.disFormulaList = data.disformula
                 } 
                 this.hasQuestion = data.hasQuestion
-
+                console.log('this.disFeatureList', this.disFeatureList)
             } 
         } else {
             
@@ -363,7 +363,7 @@
         //         }
         //     }
         //     api.importDiagnosticBasis(formData,header).then((res)=>{
-        //         console.log('ress', res)
+        //        
         //         if(res.data.code==0){
         //             const data = res.data.data
         //             this.warning('上传成功','success')
@@ -411,7 +411,7 @@
         //             }
         //             this.disFeatureList = featureList
         //             this.disFormulaList = formulaList
-        //             console.log(' this.disFormulaListResult',  this.disFormulaListResult)
+        //            
         //         }else{
         //         /*this.$message({
         //             dangerouslyUseHTMLString: true,
@@ -510,6 +510,46 @@
                     }
                 ];
             }
+            this.disFormulaList = this.disFormulaListResult;
+            
+            // this.showDelDialog()
+            return this.diagBaseVerifyData(type)
+           
+        },
+        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:''})
+                } 
+            }
+
+            const loading = this.$loading({
+                lock: true,
+                text: 'Loading',
+                spinner: 'el-icon-loading',
+                background: 'rgba(0, 0, 0, 0.7)'
+            });
+           
+           
+            if(type == 'save'){
+                this.isReady = true
+            }
+            if(labArr.length > 0) {
+                this.labVerifyData(labArr, loading,type).then(() =>{
+                    if(this.hasNoUniqueName) {
+                        loading.close()
+                        return
+                    }else {
+                        this.verifyDiagBase(loading,type)
+                    }
+                })
+            } else {
+                this.verifyDiagBase(loading,type)
+            }
+        },
+        errorDataVerify() {
             const disFormulaList = this.disFormulaListResult;
             let codeErrorNum = 0;
             //必填项是否填写
@@ -602,8 +642,6 @@
                     errStrList.push(errStr)
                 }
                 
-                
-                
             }
             this.disFeatureList = JSON.parse(JSON.stringify(disFeatureList))
             let formulaListErrNum = 0
@@ -634,7 +672,7 @@
                     //     let regexDisFormula = /[^\u4EFB\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D\u53410-9\/\.+\(\)\(\)]/g
                     //     if(regexDisFormula.test(disFormulaList[i].formula)) {
                     //          disFormulaList[i].verifyFormula = "公式格式错误"
-                    //          const errStr = "诊断公式第" + (i+ 1) +"行公式格式错误"
+                    //          const errStr = "诊断公式第" + (i+ 1) +"行公式格式错误"
                     //         errStrList.push(errStr)
                     //         formulaListErrNum++;
                     //     }
@@ -663,45 +701,10 @@
            
             if(errStrList.length >0 ||codeErrorNum > 0 ||formulaListErrNum > 0) {
                 this.errorTips(errorStr)
-            }
-            // this.showDelDialog()
-            return this.diagBaseVerifyData(type)
-           
-        },
-        diagBaseVerifyData(type) {
-            //判断诊断依据先判断化验有没有公表项
-             const labArr= []
-            for (let i = 0; i < this.disFeatureListResult.length; i++) {
-                if(+this.disFeatureListResult[i].type === 3) {
-                    labArr.push({index: i, mealName: this.disFeatureListResult[i].standard, itemName: this.disFeatureListResult[i].relation, uniqueName:''})
-                } 
-            }
-
-            const loading = this.$loading({
-                lock: true,
-                text: 'Loading',
-                spinner: 'el-icon-loading',
-                background: 'rgba(0, 0, 0, 0.7)'
-            });
-           
-           
-            if(type == 'save'){
-                this.isReady = true
-            }
-            if(labArr.length > 0) {
-                this.labVerifyData(labArr, loading).then(() =>{
-                    if(this.hasNoUniqueName) {
-                        loading.close()
-                        return
-                    }else {
-                        this.verifyDiagBase(loading)
-                    }
-                })
-            } else {
-                this.verifyDiagBase(loading)
+                return
             }
         },
-        labVerifyData(labArr, loading) {
+        labVerifyData(labArr, loading,type) {
             const labArrParam = {
                 lisMappingSearchList : labArr
             }
@@ -734,7 +737,6 @@
                            
                         }
                     }
-                    console.log('errorStr', errorStr)
                     if(errorStr) {
                         this.errorTips(errorStr)
                     }
@@ -749,7 +751,7 @@
                 }
             }).catch(()=>{ this.isReady=false;loading.close()})
         },
-        verifyDiagBase(loading) {
+        verifyDiagBase(loading,type) {
             
             const param = {
                 disFeature: this.disFeatureListResult,