luolei 4 years ago
parent
commit
b12e2763d2

+ 10 - 3
src/components/basicKnow/AddTerm.vue

@@ -753,7 +753,6 @@ export default {
           this.allwords.splice(index, 1);
         }
       } else {
-        console.log(2222)
         this.synonymous.splice(index, 1);
       }
     },
@@ -763,7 +762,7 @@ export default {
         this.warning('请输入标准词');
         return;
       }
-      if (!this.data.type && !this.unfit) {
+      if (!this.data.code && !this.unfit) {
         this.warning('请选择术语类型');
         return;
       }
@@ -827,6 +826,14 @@ export default {
       }
       // 校验是否有名称全为数字
       const pattern = /[^0-9]/g;
+      const tmpData = this.data.name
+      if(tmpData&&!tmpData.match(pattern)){
+          this.$message({
+            message: '无法输入纯数字,请输入正确数据!',
+            type: 'warning'
+          });
+          return false;
+      }
       for (let d = 0; d < detailList.length; d++) {
         let dname = detailList[d].name;
         // if(detailList[d].name && !pattern.test(detailList[d].name)){
@@ -898,7 +905,7 @@ export default {
           klConceptSub: detailList||[],
         };
       }
-      console.log(this.data)
+      // console.log(this.data)
       // return false
       this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
       api.saveBaseConceptInfo(params).then(res => {

+ 5 - 1
src/components/knowledgeExtra/DiseaseTree.vue

@@ -241,7 +241,7 @@ export default {
         api.diseaseBaseSave(this.reparams(param)).then((res) => {
           const { data } = res
           if(data.code == '0') {
-            this.message(res.data.msg||'术语关系建立成功','success');
+            this.message(res.data.msg||'保存成功','success');
             this.$router.push({
               name: 'AboutDisease',
               params: Object.assign({}, this.$route.params, { currentPage: 1 })
@@ -277,6 +277,10 @@ export default {
       },
       searchConcept(txt) {
         let  excludedConceptIds = [];
+        if(!txt){
+          this.conceptList = []
+          return
+        }
         if(this.list.length>0) {
           this.excludedConceptIds = this.IteraNodeList(this.list[0].nodeList,excludedConceptIds, 2)
         }

+ 1 - 1
src/components/knowledgeExtra/KnowledgeAll.vue

@@ -181,7 +181,7 @@ export default {
         api.addTreeRelation(this.reparams(param)).then((res) => {
           const { data } = res
           if(data.code == '0') {
-            this.message(res.data.msg||'术语关系建立成功','success');
+            this.message(res.data.msg||'保存成功','success');
           } else {
             this.message(data.msg);
           }