Browse Source

Merge branch 'uiUpdate0507' into test

reaper 4 năm trước cách đây
mục cha
commit
2ed5a0535c

+ 35 - 25
src/components/knowledgeExtra/AddNewRule.vue

@@ -422,28 +422,33 @@ export default {
       this.tableShow = false;
       const date = new Date().valueOf();
       this.$nextTick(() => {
-        this.$set(this.form, "klRuleByIdSub", [
-          {
-            groupId: date,
-            groupChildId: "child" + new Date().valueOf(),
-            baseTypes: this.baseTypeList,
-            baseTermTypeList: [],
-            conceptList: [],
-            subDescription: "",
-            parRuleType: "",
-            subConceptId: "",
-            subType: "",
-            subMaxOperator: "",
-            subMaxUnit: "",
-            subMaxValue: "",
-            subMinOperator: "",
-            subMinUnit: "",
-            subMinValue: "",
-            subEqValue: "",
-            subLenCode: "",
-            dataType: ""
-          }
-        ]);
+        if (this.form.parHasSub && this.form.parHasSub != 0) {
+          this.$set(this.form, "klRuleByIdSub", [
+            {
+              groupId: date,
+              groupChildId: "child" + new Date().valueOf(),
+              baseTypes: this.baseTypeList,
+              baseTermTypeList: [],
+              conceptList: [],
+              subDescription: "",
+              parRuleType: "",
+              subConceptId: "",
+              subType: "",
+              subMaxOperator: "",
+              subMaxUnit: "",
+              subMaxValue: "",
+              subMinOperator: "",
+              subMinUnit: "",
+              subMinValue: "",
+              subEqValue: "",
+              subLenCode: "",
+              dataType: ""
+            }
+          ]);
+        } else {
+          this.$set(this.form, "klRuleByIdSub", []);
+        }
+
         if (!init) {
           this.form.parConceptId = ""; //医学标准术语清空
           this.conceptList = []; //下拉列表清空
@@ -631,9 +636,14 @@ export default {
       deep: true
     },
     "form.parHasSub"(val) {
-      if (!val || val == 0) {
-        this.form.klRuleByIdSub = [];
-      }
+      console.log(val);
+      console.log(this.form);
+      // if (!val || val == 0) {
+      //   // this.form.klRuleByIdSub = [];
+      //   this.$set(this.form, "klRuleByIdSub", []);
+
+      //   console.log(this.form);
+      // }
     }
   },
   computed: {

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

@@ -108,7 +108,7 @@
       :data="klRuleByIdSub"
       size="mini"
       style="min-height: 200px"
-      height="calc(100vh - 415px)"
+      height="calc(100vh - 403px)"
       :row-style="rowStyle"
       :header-row-style="{ background: '#E3EAF4' }"
       :cell-style="cellStyle"