浏览代码

Merge branch 'dragTerm1025' into test

1178232204@qq.com 3 年之前
父节点
当前提交
f8fd72bd71
共有 1 个文件被更改,包括 13 次插入4 次删除
  1. 13 4
      src/components/knowledgeExtra/AddNewRule.vue

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

@@ -682,6 +682,7 @@ export default {
               (ele) => ele === item.code && item.remark.split("|")[0] == 3
             )
           );
+          console.log(123);
         } else {
           screenArr = obj.subMenuList.filter((item) => {
             if (item.remark == "") {
@@ -690,6 +691,7 @@ export default {
               return item.remark.split("|")[0] == (key % 3) + 1;
             }
           });
+          console.log(455);
         }
         // const klRuleByIdSub = this.form.klRuleByIdSub;
         // klRuleByIdSub.forEach((item, i) => {
@@ -810,8 +812,15 @@ export default {
               }
             });
           });
-          if (key == 1) {
+          if (key == 1 && len[1].subLenCode) {
             this.dragVal = len[1].subLenCode;
+            const subobj = this.baseTypeList.find((it) => it.type == 1);
+            const list = subobj.subMenuList.filter((it) => {
+              return it.code == len[1].subLenCode && it.remark.split("|")[0] == 3;
+            });
+            // //获取互斥项code
+            const dragArr = list[0].remark.split("|")[1].split(",");
+            this.dragArr = dragArr;
           }
         }
       } else {
@@ -858,7 +867,7 @@ export default {
       this.form.klRuleByIdSub = list;
     },
     // 删除规则
-    delGroupChild(groupChildId, index, groupId, del, key,lens) {
+    delGroupChild(groupChildId, index, groupId, del, key, lens) {
       let newGroupList;
       const dragDel =
         localStorage
@@ -929,8 +938,8 @@ export default {
             const obj = this.baseTypeList.find((it) => it.type === 1);
             const screenArr = obj.subMenuList.filter((item) => {
               return item.remark.split("|")[0] == 2;
-            })
-            newGroupList[1].baseTermTypeList = screenArr
+            });
+            newGroupList[1].baseTermTypeList = screenArr;
           }
           this.dragVal = len[1].subLenCode;
         }