Sfoglia il codice sorgente

选中为过滤条件置空

1178232204@qq.com 3 anni fa
parent
commit
3354697952
1 ha cambiato i file con 4 aggiunte e 2 eliminazioni
  1. 4 2
      src/components/knowledgeExtra/AddNewRule.vue

+ 4 - 2
src/components/knowledgeExtra/AddNewRule.vue

@@ -442,9 +442,9 @@ export default {
               .match(new RegExp(this.firstPlace.checkedType + '-\\d+', 'g')) ||
             [];
           const types = dict[0].split('-');
+          const delType = del[0].split('-');
           let screenArr;
           if (del.length > 0) {
-            const delType = del[0].split('-');
             const baseTypeList = JSON.parse(JSON.stringify(this.baseTypeList));
             screenArr = baseTypeList.filter(item => {
               return !delType[2].includes(item.type);
@@ -455,8 +455,10 @@ export default {
             if (arr[i - 1] && arr[i - 1].groupId == item.groupId) {
               this.$set(item, 'disabled', false);
               if (del.length > 0) {
-                this.$set(item, 'subType', '');
                 this.$set(item, 'baseTypes', screenArr);
+                if (item.subType == delType[2]) {
+                  this.$set(item, 'subType', '');
+                }
               }
             } else {
               this.$set(item, 'disabled', true);