1178232204@qq.com 3 years ago
parent
commit
30f2b632cd
1 changed files with 17 additions and 2 deletions
  1. 17 2
      src/components/knowledgeExtra/AddNewRule.vue

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

@@ -382,6 +382,17 @@ export default {
         if (dragDel.length > 0) {
           const obj = this.baseTypeList.find(it => it.type === 1);
           if (arr[i - 1] && arr[i - 1].groupId == item.groupId) {
+            let klRuleByIdSub = this.form.klRuleByIdSub;
+            klRuleByIdSub.forEach((item, i, arr) => {
+              if (arr[0].subType == 1) {
+                const arr = this.baseTypeList.filter(it => {
+                  return it.type == 1;
+                });
+                if (i > 0) {
+                  this.$set(item, 'baseTypes', arr);
+                }
+              }
+            });
             if (i == 2) {
               //获取互斥项code
               const list = obj.subMenuList.filter(it => {
@@ -638,7 +649,9 @@ export default {
             const arr = this.baseTypeList.filter(it => {
               return it.type == 1;
             });
-            this.$set(item, 'baseTypes', arr);
+            if (i > 0) {
+              this.$set(item, 'baseTypes', arr);
+            }
           }
         });
       }
@@ -733,7 +746,9 @@ export default {
               const arr = this.baseTypeList.filter(it => {
                 return it.type == 1;
               });
-              this.$set(item, 'baseTypes', arr);
+              if (i > 0) {
+                this.$set(item, 'baseTypes', arr);
+              }
             }
           });
         }