فهرست منبع

Merge branch 'dragTerm1025' into test

1178232204@qq.com 3 سال پیش
والد
کامیت
593862f223
2فایلهای تغییر یافته به همراه7 افزوده شده و 4 حذف شده
  1. 5 2
      src/components/knowledgeExtra/AddNewRule.vue
  2. 2 2
      src/components/knowledgeExtra/AddNewRuleTable.vue

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

@@ -756,7 +756,7 @@ export default {
       // this.form.klRuleByIdSub = data;
       // this.form.klRuleByIdSub = data;
     },
     },
     // 添加分组 || 规则
     // 添加分组 || 规则
-    addGroup(date, arg = { index: null, groupId: null }) {
+    addGroup(date, key, arg = { index: null, groupId: null }) {
       /**
       /**
        * @params
        * @params
        *    date:存在则添加规则 不存在则添加分组
        *    date:存在则添加规则 不存在则添加分组
@@ -810,6 +810,9 @@ export default {
               }
               }
             });
             });
           });
           });
+          if (key == 1) {
+            this.dragVal = len[1].subLenCode;
+          }
         }
         }
       } else {
       } else {
         // 添加分组 在列表中相同groupId之后添加
         // 添加分组 在列表中相同groupId之后添加
@@ -1024,7 +1027,7 @@ export default {
         }
         }
       });
       });
     },
     },
-    childSubCodeChange(val, index, numTypes, groupId, key, code,lens) {
+    childSubCodeChange(val, index, numTypes, groupId, key, code, lens) {
       const dragDel =
       const dragDel =
         localStorage
         localStorage
           .getItem("zskDragDict")
           .getItem("zskDragDict")

+ 2 - 2
src/components/knowledgeExtra/AddNewRuleTable.vue

@@ -616,11 +616,11 @@ export default {
       this.setScrollRight();
       this.setScrollRight();
     },
     },
     addGroup(scope) {
     addGroup(scope) {
-      this.$emit("addGroup", null, { groupId: scope.row.groupId });
+      this.$emit("addGroup", null,scope.row.key, { groupId: scope.row.groupId });
       this.$refs.table.bodyWrapper.scrollLeft = 0;
       this.$refs.table.bodyWrapper.scrollLeft = 0;
     },
     },
     addChildGroup(scope) {
     addChildGroup(scope) {
-      this.$emit("addGroup", scope.row.groupId, { index: scope.$index });
+      this.$emit("addGroup", scope.row.groupId,scope.row.key, { index: scope.$index });
       this.$refs.table.bodyWrapper.scrollLeft = 0;
       this.$refs.table.bodyWrapper.scrollLeft = 0;
     },
     },
     scrollFun() {
     scrollFun() {