reaper před 4 roky
rodič
revize
6e0009fecb
1 změnil soubory, kde provedl 33 přidání a 28 odebrání
  1. 33 28
      src/components/knowledgeExtra/AddNewRule.vue

+ 33 - 28
src/components/knowledgeExtra/AddNewRule.vue

@@ -39,7 +39,7 @@
       linkTo="ZskRuleManager"
     ></crumbs>
     <div class="AddRuleContent">
-      <el-form size="mini" :model="form"  ref="ruleForm">
+      <el-form size="mini" :model="form" ref="ruleForm">
         <!-- <div class="table_form"> -->
         <el-row class="table_form">
           <el-col :span="6">
@@ -113,7 +113,7 @@
             <el-form-item
               label-width="130px"
               label="医学标准术语:"
-              style="margin-bottom:50px"
+              style="margin-bottom: 50px"
               :rules="rules.parConceptId"
               prop="parConceptId"
             >
@@ -176,7 +176,7 @@
         <!-- </div> -->
         <!-- 表格 -->
         <AddNewRuleTable
-          v-if="form.parHasSub"
+          v-if="form.parHasSub && tableShow"
           :klRuleByIdSub="form.klRuleByIdSub"
           :maxNum="subRuleMaxNum"
           @subTypeChange="subTypeChange"
@@ -219,6 +219,7 @@ export default {
       parId: null,
       msgDict: "", //显示附加信息的类型
       firstPlace: null,
+      tableShow: true,
       form: {
         parDescription: "",
         parRuleType: "",
@@ -414,33 +415,37 @@ export default {
     },
     // 初始化表格
     setInitGroupData(init) {
+      this.tableShow = false;
       const date = new Date().valueOf();
-      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: ""
+      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 (!init) {
+          this.form.parConceptId = ""; //医学标准术语清空
+          this.conceptList = []; //下拉列表清空
         }
-      ]);
-      if (!init) {
-        this.form.parConceptId = ""; //医学标准术语清空
-        this.conceptList = []; //下拉列表清空
-      }
+        this.tableShow = true;
+      });
     },
     // 有无子条件切换
     hasSubChange(val) {