Browse Source

Merge branch 'dragTerm1025' into test

1178232204@qq.com 3 years atrás
parent
commit
593862f223

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

@@ -756,7 +756,7 @@ export default {
       // this.form.klRuleByIdSub = data;
     },
     // 添加分组 || 规则
-    addGroup(date, arg = { index: null, groupId: null }) {
+    addGroup(date, key, arg = { index: null, groupId: null }) {
       /**
        * @params
        *    date:存在则添加规则 不存在则添加分组
@@ -810,6 +810,9 @@ export default {
               }
             });
           });
+          if (key == 1) {
+            this.dragVal = len[1].subLenCode;
+          }
         }
       } else {
         // 添加分组 在列表中相同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 =
         localStorage
           .getItem("zskDragDict")

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

@@ -616,11 +616,11 @@ export default {
       this.setScrollRight();
     },
     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;
     },
     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;
     },
     scrollFun() {