wyq 3 роки тому
батько
коміт
e4acf09396
1 змінених файлів з 24 додано та 11 видалено
  1. 24 11
      src/components/knowledgeExtra/AddTermSet.vue

+ 24 - 11
src/components/knowledgeExtra/AddTermSet.vue

@@ -127,6 +127,9 @@
   /deep/ .el-table th.gutter {
     display: table-cell !important;
   }
+  /deep/.el-table--column--selection .cell {
+    padding-right: 14px;
+  }
 }
 .test_box {
   min-height: 300px;
@@ -595,17 +598,27 @@ export default {
     },
     // 移除术语
     showDelDialog(row) {
-      this.leftList.forEach((item, index) => {
-        if (item.conceptId == row.conceptId) {
-          this.leftList.splice(index, 1);
-        }
-      });
-      this.form.concepts.forEach((item, index) => {
-        if (item.conceptId == row.conceptId) {
-          this.form.concepts.splice(index, 1);
-          this.excludedConceptIds.splice(index, 1);
-        }
-      });
+      if (this.searchtext == '' && this.searchtext2 == '') {
+        this.form.concepts.forEach((item, index) => {
+          if (item.conceptId == row.conceptId) {
+            this.form.concepts.splice(index, 1);
+            this.excludedConceptIds.splice(index, 1);
+          }
+        });
+        this.leftList = this.form.concepts
+      } else {
+        this.leftList.forEach((item, index) => {
+          if (item.conceptId == row.conceptId) {
+            this.leftList.splice(index, 1);
+          }
+        });
+        this.form.concepts.forEach((item, index) => {
+          if (item.conceptId == row.conceptId) {
+            this.form.concepts.splice(index, 1);
+            this.excludedConceptIds.splice(index, 1);
+          }
+        });
+      }
       this.getTreeSearchList();
     },
     saveSet() {