Sfoglia il codice sorgente

Merge branch 'bug0824' into test

1178232204@qq.com 2 anni fa
parent
commit
62920512d8

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

@@ -491,6 +491,29 @@ export default {
             }
           } else {
             this.$set(item, "disabled", true);
+            if (this.form.parLenCode == "108" && this.form.parRuleType == "8") {
+              const subobj = this.baseTypeList.find((it) => it.type == "2");
+              subobj.subMenuList.push({
+                code: "108",
+                creator: "0",
+                firstPlace: null,
+                gmtCreate: "1970-01-01 12:00:00",
+                gmtModified: "1970-01-01 12:00:00",
+                id: 27106,
+                isDeleted: "N",
+                modifier: "0",
+                name: "实验室检查子项目",
+                number: null,
+                orderNo: 1,
+                parentId: 27103,
+                planCode: "rule",
+                remark: "",
+                ruleType: 8,
+                subMenuList: [],
+                type: null,
+              });
+              this.$set(item, "baseTermTypeList", subobj.subMenuList);
+            }
           }
         }
         const dragDel =
@@ -862,6 +885,30 @@ export default {
               const subobj = this.baseTypeList.find(
                 (it) => it.type == types[2]
               );
+              if (
+                this.form.parLenCode == "108" &&
+                this.form.parRuleType == "8"
+              ) {
+                subobj.subMenuList.push({
+                  code: "108",
+                  creator: "0",
+                  firstPlace: null,
+                  gmtCreate: "1970-01-01 12:00:00",
+                  gmtModified: "1970-01-01 12:00:00",
+                  id: 27106,
+                  isDeleted: "N",
+                  modifier: "0",
+                  name: "实验室检查子项目",
+                  number: null,
+                  orderNo: 1,
+                  parentId: 27103,
+                  planCode: "rule",
+                  remark: "",
+                  ruleType: 8,
+                  subMenuList: [],
+                  type: null,
+                });
+              }
               this.$set(item, "baseTermTypeList", subobj.subMenuList);
               this.$set(item, "subLenCode", types[1]);
               this.$set(item, "subDescription", this.firstPlace.conceptName);
@@ -1009,6 +1056,11 @@ export default {
             return !types[3].includes(item.code);
           });
         }
+        if (this.form.parLenCode == "108" && this.form.parRuleType == "8") {
+          const subobj = this.baseTypeList.find((it) => it.type == "2");
+          subobj.subMenuList.splice(1, 1);
+          this.$set(obj, "baseTermTypeList", subobj.subMenuList);
+        }
       }
       this.$set(
         this.form.klRuleByIdSub[index],
@@ -1040,7 +1092,7 @@ export default {
       // this.form.klRuleByIdSub = data;
     },
     // 添加分组 || 规则
-    addGroup(date, key, arg = { index: null, groupId: null }) {
+    addGroup(date, key, arg = { index: null, groupId: null },index) {
       /**
        * @params
        *    date:存在则添加规则 不存在则添加分组
@@ -1073,7 +1125,33 @@ export default {
         subLenCode: "",
         dataType: dataType,
       };
-
+      if (
+        this.form.parLenCode == "108" &&
+        this.form.parRuleType == "8" &&
+        index == "1"
+      ) {
+        const subobj = this.baseTypeList.find((it) => it.type == "2");
+        subobj.subMenuList.push({
+          code: "108",
+          creator: "0",
+          firstPlace: null,
+          gmtCreate: "1970-01-01 12:00:00",
+          gmtModified: "1970-01-01 12:00:00",
+          id: 27106,
+          isDeleted: "N",
+          modifier: "0",
+          name: "实验室检查子项目",
+          number: null,
+          orderNo: 1,
+          parentId: 27103,
+          planCode: "rule",
+          remark: "",
+          ruleType: 8,
+          subMenuList: [],
+          type: null,
+        });
+        this.$set(obj, "baseTermTypeList", subobj.subMenuList);
+      }
       if (typeof arg.index == "number") {
         // 添加规则 直接在当前位置之后添加
         this.form.klRuleByIdSub.splice(arg.index + 1, 0, obj);

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

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