Browse Source

修改诊断依据校验

zhangxc 5 years ago
parent
commit
815f7d0b19
1 changed files with 20 additions and 16 deletions
  1. 20 16
      src/components/diagBase/AddDiagBase.vue

+ 20 - 16
src/components/diagBase/AddDiagBase.vue

@@ -450,26 +450,29 @@
         // },
         // },
         updateNeo() {
         updateNeo() {
             const submitFormResult = this.submitForm('updateNeo')
             const submitFormResult = this.submitForm('updateNeo')
+            console.log('submitFormResult', submitFormResult)
             if(!submitFormResult) {
             if(!submitFormResult) {
                 return
                 return
             } else {
             } else {
-                submitFormResult.then(() => {
-                    if(this.hasQuestion == 0) {
-                        const param = {
-                            id: this.id,
-                            modifier: this.modifier
-                        }
-                        api.diagBaseUpdateNeo(param).then((res) => {
-                            if(res.data.code == 0) {
-                                this.warning('更新成功', 'success');
-                            } else {
-                                this.warning(res.data.msg)
+                submitFormResult.then((data) => {
+                    if(data !== false) {
+                         if(this.hasQuestion == 0) {
+                            const param = {
+                                id: this.id,
+                                modifier: this.modifier
                             }
                             }
-                        })
-                    } else {
-                        this.warning('更新失败');
-                    }
-                    
+                            api.diagBaseUpdateNeo(param).then((res) => {
+                                if(res.data.code == 0) {
+                                    this.warning('更新成功', 'success');
+                                } else {
+                                    this.warning(res.data.msg)
+                                }
+                            })
+                        } else {
+                            this.warning('更新失败');
+                        }
+
+                        }
                 })
                 })
             
             
             }
             }
@@ -591,6 +594,7 @@
                     if(labVerifyData) {
                     if(labVerifyData) {
                          return labVerifyData.then((data) =>{
                          return labVerifyData.then((data) =>{
                             if(this.hasNoUniqueName||data===false) {
                             if(this.hasNoUniqueName||data===false) {
+                                return false
                             }else {
                             }else {
                                 return this.verifyDiagBase(type)
                                 return this.verifyDiagBase(type)
                             }
                             }