Explorar el Código

Merge branch 'depart' into dev2/luolei

Luolei hace 6 años
padre
commit
621f1403ff
Se han modificado 1 ficheros con 11 adiciones y 3 borrados
  1. 11 3
      src/components/icss/AddSimilarName.vue

+ 11 - 3
src/components/icss/AddSimilarName.vue

@@ -183,9 +183,17 @@
         const {selfName,selfEmpty,retrievalNames,retrievalEmpty,retrievalSonNames,sonEmpty} = this;
         let dataList = [];
         if(this.flag){ //修改
+          if(!selfName[0].retrievalSpell){
+            this.$message.error("本体拼音不能为空");
+            return
+          }
           dataList = selfName.concat(retrievalNames,retrievalEmpty,retrievalSonNames,sonEmpty);
           this.toast = "修改成功";
         }else{
+          if(!selfEmpty[0].retrievalSpell){
+            this.$message.error("本体拼音不能为空");
+            return
+          }
           dataList = selfEmpty.concat(retrievalNames,retrievalEmpty,retrievalSonNames,sonEmpty);
           this.toast = "添加成功";
         }
@@ -208,8 +216,8 @@
             });
             this.$router.push({path:'LT-YXSJWH-BMWH'});
           }else{
-            console.log(result.msg);
-            this.$message.error(result.msg);
+            // console.log(result.msg);
+            this.$message.error("请选择标签");
           }
         })
       },
@@ -243,7 +251,7 @@
       },
       close(){
         this.showFlag = false;
-        this.searchStr = "";
+        // this.searchStr = "";
       },
       handleInput(e){//名字只能输入中文、英文和数字
         e.target.value = e.target.value.replace(/[^0-9a-zA-Z\u4e00-\u9fa5]/g,'');