Переглянути джерело

Merge branch 'uiUpdate0507' into test

reaper 4 роки тому
батько
коміт
7f7e1f9cd6

+ 0 - 1
src/components/common/HomePage.vue

@@ -106,7 +106,6 @@ export default {
   methods: {
     collect() {
       this.onshow = !this.onshow;
-      
     },
     getMenuList() {
       api

+ 157 - 78
src/components/knowledgeExtra/AddDiagBase.vue

@@ -1,7 +1,6 @@
 <template>
-  <div style="min-height:100%">
+  <div style="min-height:100%" ref="viewBox">
     <crumbs :title="title" :param="$route.params" linkTo="ZskDiagBase"></crumbs>
-
     <div class="contents">
       <div class="content">
         <el-form
@@ -55,7 +54,7 @@
             :data="form.klDiagnoseTypeVO"
             :row-class-name="tableRowClassName"
             border
-            style="width: 100%"
+            max-height="500"
             :header-cell-style="{background:'#E3EAF4'}"
           >
             <el-table-column label="依据" width="100">
@@ -80,8 +79,7 @@
                     height="18"
                     width="18"
                     class="icon"
-                    :disabled="form.klDiagnoseTypeVO.length===1"
-                    @click="delDiag(scope.$index)"
+                    @click="delDiag(scope.row.depart_id,scope.$index)"
                   />
                 </el-form-item>
               </template>
@@ -133,7 +131,7 @@
                         height="18"
                         width="18"
                         class="icon"
-                        @click="delGroup(scope.$index)"
+                        @click="delGroup(scope.row.depart_id,scope.$index)"
                       />
                     </el-form-item>
                   </div>
@@ -192,10 +190,10 @@
                       <div class="box-2" v-if="v.title == '基础依据类型'">
                         <el-form-item
                           :prop="'klDiagnoseTypeVO.' +
-                        scope.$index +
-                        '.groupVO.' +
-                        index +
-                        '.klDiagnoseDetail.'+i+'.basType'"
+                          scope.$index +
+                          '.groupVO.' +
+                          index +
+                          '.klDiagnoseDetail.'+i+'.basType'"
                           :rules="[{required:true,message:'请选择基础依据类型',trigger:'change'}]"
                         >
                           <el-select
@@ -214,10 +212,10 @@
                       <div class="box-2" v-if="v.title == '基础依据术语类型'">
                         <el-form-item
                           :prop="'klDiagnoseTypeVO.' +
-                        scope.$index +
-                        '.groupVO.' +
-                        index +
-                        '.klDiagnoseDetail.'+i+'.basLibType'"
+                          scope.$index +
+                          '.groupVO.' +
+                          index +
+                          '.klDiagnoseDetail.'+i+'.basLibType'"
                           :rules="[{required:true,message:'请选择基础依据术语类型',trigger:'change'}]"
                           v-if="!items.basNameType"
                         >
@@ -240,14 +238,15 @@
                       <div
                         v-if="v.title == '医学标准术语'"
                         class="box-2"
-                        :class="(items.basType===3 || items.basType===4)? 'tmall' : 'taobao'"
+                        :class="items.basType===3 || items.basType===4? 'tmall' : 'taobao'"
                       >
                         <el-form-item
+                          v-if="items.basType==1 || items.basType==2"
                           :prop="'klDiagnoseTypeVO.' +
-                        scope.$index +
-                        '.groupVO.' +
-                        index +
-                        '.klDiagnoseDetail.'+i+'.basConceptId'"
+                          scope.$index +
+                          '.groupVO.' +
+                          index +
+                          '.klDiagnoseDetail.'+i+'.basConceptId'"
                           :rules="[{required:true,message:'请输入医学标准术语',trigger:'change'}]"
                         >
                           <el-select
@@ -270,10 +269,10 @@
                       <div class="last-box" v-if="v.title == '规则具体内容'">
                         <el-form-item
                           :prop="'klDiagnoseTypeVO.' +
-                        scope.$index +
-                        '.groupVO.' +
-                        index +
-                        '.klDiagnoseDetail.'+i+'.dataType'"
+                          scope.$index +
+                          '.groupVO.' +
+                          index +
+                          '.klDiagnoseDetail.'+i+'.dataType'"
                           :rules="[{required:true,message:'请选择类型',trigger:'change'}]"
                           v-if="items.basType===2&&!items.onlyNumType&&!items.onlyTxtType"
                         >
@@ -302,10 +301,10 @@
                           <div class="last-box-1">
                             <el-form-item
                               :prop="'klDiagnoseTypeVO.' +
-                            scope.$index +
-                            '.groupVO.' +
-                            index +
-                            '.klDiagnoseDetail.'+i+'.maxOperator'"
+                              scope.$index +
+                              '.groupVO.' +
+                              index +
+                              '.klDiagnoseDetail.'+i+'.maxOperator'"
                               :rules="[{required:true,message:'最大值和最小值至少完整填写一个,单位不必填',trigger:'change'}]"
                             >
                               <el-select
@@ -325,15 +324,14 @@
 
                             <el-form-item
                               :prop="'klDiagnoseTypeVO.' +
-                            scope.$index +
-                            '.groupVO.' +
-                            index +
-                            '.klDiagnoseDetail.'+i+'.maxVal'"
+                              scope.$index +
+                              '.groupVO.' +
+                              index +
+                              '.klDiagnoseDetail.'+i+'.maxVal'"
                               :rules="[{required:true,message:'最大值和最小值至少完整填写一个,单位不必填',trigger:'blur'}]"
                             >
                               <el-input v-model="items.maxVal" placeholder="填写数值"></el-input>
                             </el-form-item>
-
                             <el-form-item prop="minUnit">
                               <el-input v-model.trim="items.maxUnit" placeholder="填写单位"></el-input>
                             </el-form-item>
@@ -386,10 +384,10 @@
                         </el-form-item>
                         <el-form-item
                           :prop="'klDiagnoseTypeVO.' +
-                        scope.$index +
-                        '.groupVO.' +
-                        index +
-                        '.klDiagnoseDetail.'+i+'.eqValue'"
+                          scope.$index +
+                          '.groupVO.' +
+                          index +
+                          '.klDiagnoseDetail.'+i+'.eqValue'"
                           :rules="[{required:true,message:'请输入正则表达式',trigger:'blur'}]"
                           v-if="items.basType===4 || items.basType===3"
                           maxlength="200"
@@ -400,10 +398,10 @@
                         </el-form-item>
                         <el-form-item
                           :prop="'klDiagnoseTypeVO.' +
-                        scope.$index +
-                        '.groupVO.' +
-                        index +
-                        '.klDiagnoseDetail.'+i+'.eqValue'"
+                          scope.$index +
+                          '.groupVO.' +
+                          index +
+                          '.klDiagnoseDetail.'+i+'.eqValue'"
                           :rules="[{required:true,message:'不能为空~',trigger:'blur'}]"
                           maxlength="200"
                           v-if="(!items.onlyNumType&&!items.basNameType&&(items.basType===2 || items.basType===1)&&items.dataType==='2')||items.onlyTxtType"
@@ -422,7 +420,7 @@
         </el-form>
 
         <div class="Butn">
-          <el-button class="disclButn" size="small" type="primary" @click="confirm">保存</el-button>
+          <el-button class="disclButn" size="small" type="primary" @click="confirm">确定</el-button>
         </div>
       </div>
     </div>
@@ -444,7 +442,7 @@ export default {
         { title: '基础依据类型', width: 130, istar: true },
         { title: '基础依据术语类型', width: 160, istar: true },
         { title: '医学标准术语', width: 130, istar: true },
-        { title: '规则具体内容', width: 750 }
+        { title: '规则具体内容', width: 850 }
       ],
       dicts: {},
       baseTypes: [], //诊断数据类型
@@ -466,6 +464,7 @@ export default {
             depart_id: 0,
             groupVO: [
               {
+                inx: 0,
                 baseGroup: '',
                 conditionGroup: '',
                 fitNo: '',
@@ -551,7 +550,7 @@ export default {
       spanArr: [],
       list: [], //提交数据数组,
       i: 0,
-      imgshow: false
+      inx: 0
     };
   },
   created() {
@@ -571,6 +570,7 @@ export default {
         info.klDiagnoseTypeVO[i].depart_id = this.i;
         this.i++;
       }
+
       this.form = Object.assign({}, this.form, this.formatData(info));
       if (this.isCopy) {
         this.conceptList = [];
@@ -597,10 +597,10 @@ export default {
                 this.form.klDiagnoseTypeVO[i].groupVO[j].klDiagnoseDetail[k]
                   .basType
             );
-
             this.form.klDiagnoseTypeVO[i].groupVO[j].klDiagnoseDetail[
               k
             ].basLibTypeList = this.baseTermTypeList[index2].subMenuList;
+
             this.form.klDiagnoseTypeVO[i].groupVO[j].klDiagnoseDetail[
               k
             ].conceptList = [
@@ -628,7 +628,28 @@ export default {
                 k
               ].dataType = '2';
             }
-
+            if (
+              this.form.klDiagnoseTypeVO[i].groupVO[j].klDiagnoseDetail[k]
+                .basType == 3 ||
+              this.form.klDiagnoseTypeVO[i].groupVO[j].klDiagnoseDetail[k]
+                .basType == 4
+            ) {
+              this.form.klDiagnoseTypeVO[i].groupVO[j].klDiagnoseDetail[
+                k
+              ].basTypeName = this.form.klDiagnoseTypeVO[i].groupVO[
+                j
+              ].klDiagnoseDetail[k].basLibTypeList[0].name;
+              this.form.klDiagnoseTypeVO[i].groupVO[j].klDiagnoseDetail[
+                k
+              ].basNameType = true;
+            }else{
+              this.form.klDiagnoseTypeVO[i].groupVO[j].klDiagnoseDetail[
+                k
+              ].basTypeName = '';
+              this.form.klDiagnoseTypeVO[i].groupVO[j].klDiagnoseDetail[
+                k
+              ].basNameType = false;
+            }
             const onlyNum = this.dicts['onlyNum'] || '&';
             const onlyTxt = this.dicts['onlyTxt'] || '&';
             const codes = onlyNum + ',';
@@ -648,6 +669,7 @@ export default {
       }
     }
   },
+
   computed: {
     numArr() {
       let arr = [];
@@ -724,14 +746,12 @@ export default {
         };
       }
     },
-     tableRowClassName({row, column, rowIndex, columnIndex}) {
-       console.log(row.depart_id & 1)
-        if (row.depart_id & 1) {
-          console.log(3658)
-          return 'success-row';
-        } 
-        return '';
-      },
+    tableRowClassName({ row, column, rowIndex, columnIndex }) {
+      if (row.depart_id & 1) {
+        return 'success-row';
+      }
+      return '';
+    },
     getInitData() {
       this.i++;
       return {
@@ -784,18 +804,45 @@ export default {
       this.i++;
       let temp = JSON.parse(JSON.stringify(this.form.klDiagnoseTypeVO));
       let obj = temp.filter(v => v.depart_id === name);
-
       for (var i in obj.reverse()) {
-        obj[i].depart_id = '复制依据' + this.i; //问题点2
+        obj[i].depart_id = this.i; //问题点2
         this.form.klDiagnoseTypeVO.splice(index, 0, obj[i]);
       }
     },
     //删除依据
     delDiag(i) {
-      this.form.klDiagnoseTypeVO.splice(i, 1);
+      const formData = JSON.parse(JSON.stringify(this.form));
+      let map = {},
+        dest = [];
+      for (let i = 0; i < formData.klDiagnoseTypeVO.length; i++) {
+        let ai = formData.klDiagnoseTypeVO[i];
+        if (!map[ai.depart_id]) {
+          dest.push({
+            depart_id: ai.depart_id,
+            conditionType: ai.conditionType,
+            groupVO: ai.groupVO
+          });
+          map[ai.depart_id] = ai;
+        } else {
+          for (let j = 0; j < dest.length; j++) {
+            var dj = dest[j];
+            if (dj.depart_id == ai.depart_id) {
+              dj.groupVO = dj.groupVO.concat(ai.groupVO);
+              break;
+            }
+          }
+        }
+      }
+      if (dest.length == 1) {
+        return;
+      } else {
+        dest.splice(i, 1);
+      }
+      this.form.klDiagnoseTypeVO = dest;
     },
     //新增组
     addGroup(i) {
+      this.inx++;
       const temp = {
         baseGroup: '',
         conditionGroup: '',
@@ -827,8 +874,34 @@ export default {
       };
       this.form.klDiagnoseTypeVO[i].groupVO.splice(i + 1, 0, temp);
     },
-    delGroup(i) {
-      this.form.klDiagnoseTypeVO.splice(i, 1);
+    delGroup(id, i) {
+      const formData = JSON.parse(JSON.stringify(this.form));
+      let map = {},
+        dest = [];
+      for (let i = 0; i < formData.klDiagnoseTypeVO.length; i++) {
+        let ai = formData.klDiagnoseTypeVO[i];
+        if (!map[ai.depart_id]) {
+          dest.push({
+            depart_id: ai.depart_id,
+            conditionType: ai.conditionType,
+            groupVO: ai.groupVO
+          });
+          map[ai.depart_id] = ai;
+        } else {
+          for (let j = 0; j < dest.length; j++) {
+            var dj = dest[j];
+            if (dj.depart_id == ai.depart_id) {
+              dj.groupVO = dj.groupVO.concat(ai.groupVO);
+              break;
+            }
+          }
+        }
+      }
+      if (dest[id].groupVO.length == 1) {
+        return;
+      } else {
+        this.form.klDiagnoseTypeVO.splice(i, 1);
+      }
     },
     //新增基础依据
     addRule(row, index, i) {
@@ -856,10 +929,17 @@ export default {
       this.form.klDiagnoseTypeVO[index].groupVO[i].klDiagnoseDetail.push(temp);
     },
     delRule(row, inx, index, i) {
-      this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail.splice(
-        i,
-        1
-      );
+      if (
+        this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail
+          .length == 1
+      ) {
+        return;
+      } else {
+        this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail.splice(
+          i,
+          1
+        );
+      }
     },
     //诊断依据类型修改
     basTypeChange(val, inx) {
@@ -871,18 +951,18 @@ export default {
       this.baseTermTypeList = this.baseTypes[index2].subMenuList;
     },
     //基础依据类型修改
+    
     baseTermTypeChange(val, inx, index, i) {
       if (!val) {
-        this.basLibTypeList = [];
         return;
       }
       this.basType = val;
       this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
         i
       ].basType = val;
-      this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
-        i
-      ].basLibType = '';
+      // this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
+      //   i
+      // ].basLibType = '';
       this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
         i
       ].dataType = '';
@@ -1142,7 +1222,6 @@ export default {
           }
         }
       }
-
       formData.klDiagnoseTypeVO = dest;
       this.validateForms(function() {
         let params = formData;
@@ -1196,10 +1275,11 @@ export default {
     margin-top: 10px;
     padding: 20px 20px 50px;
     min-height: 600px;
-
-
+    .cell {
+      overflow: initial;
+    }
     .el-table .success-row {
-      background: #DFF7EF;
+      background: #dff7ef;
     }
     .content-2-header {
       padding: 20px 0;
@@ -1280,12 +1360,13 @@ export default {
       }
       .el-form-item__content {
         position: inherit !important;
+        line-height: 32px;
       }
       .last-box-1 {
         display: flex;
         .el-form-item__error {
-          top: 56px;
-          left: 10px;
+          top: 32px;
+          left: 160px;
           white-space: nowrap;
           background: #fff;
         }
@@ -1293,14 +1374,14 @@ export default {
       .last-box-s {
         position: absolute;
         .el-form-item__error {
-          top: 39px;
+          top: 32px;
           left: 0px;
           white-space: nowrap;
           background: #fff;
         }
       }
       .el-form-item__error {
-        top: 56px;
+        top: 32px;
         left: 10px;
         white-space: nowrap;
         background: #fff;
@@ -1309,7 +1390,7 @@ export default {
         display: inline;
         /deep/ .el-input,
         .el-input__inner {
-          width: 100px;
+          width: 80px;
         }
       }
       .inp {
@@ -1320,15 +1401,13 @@ export default {
       }
       .el-form-item {
         margin: 0;
-        width: 100%;
         overflow: hidden;
+        display: flex;
       }
-      .el-form-item__content;
     }
     .add-new-form {
       .el-input,
       .el-input__inner {
-        width: 100px;
         font-size: 12px;
         line-height: 32px;
         height: 32px;

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

@@ -25,7 +25,8 @@
   }
   .form_btn {
     width: 100%;
-    margin: 20px 0;
+    background: #fff;
+    padding: 20px 0;
     text-align: center;
   }
 }
@@ -38,14 +39,15 @@
       linkTo="ZskRuleManager"
     ></crumbs>
     <div class="AddRuleContent">
-      <el-form size="mini" :model="form" :rules="rules" ref="ruleForm">
+      <el-form size="mini" :model="form"  ref="ruleForm">
         <!-- <div class="table_form"> -->
         <el-row class="table_form">
-          <el-col :span="8">
+          <el-col :span="6">
             <!-- 规则名称 -->
             <el-form-item
               label-width="130px"
               label="规则名称:"
+              :rules="rules.parDescription"
               prop="parDescription"
             >
               <el-input
@@ -55,11 +57,12 @@
             </el-form-item>
           </el-col>
 
-          <el-col :span="8">
+          <el-col :span="6">
             <!-- 规则类型 -->
             <el-form-item
               label-width="130px"
               label="规则类型:"
+              :rules="rules.parRuleType"
               prop="parRuleType"
             >
               <el-select
@@ -80,11 +83,12 @@
               </div>
             </el-form-item>
           </el-col>
-          <el-col :span="8">
+          <el-col :span="6">
             <!-- 规则术语类型: -->
             <el-form-item
               label-width="130px"
               label="规则术语类型:"
+              :rules="rules.parLenCode"
               prop="parLenCode"
             >
               <el-select
@@ -105,10 +109,12 @@
               </div>
             </el-form-item>
           </el-col>
-          <el-col :span="8">
+          <el-col :span="6">
             <el-form-item
               label-width="130px"
               label="医学标准术语:"
+              style="margin-bottom:50px"
+              :rules="rules.parConceptId"
               prop="parConceptId"
             >
               <el-select
@@ -129,11 +135,12 @@
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="8">
+          <el-col :span="6">
             <el-form-item
               label-width="130px"
               v-if="showHasSub"
               label="有无子条件:"
+              :rules="rules.parHasSub"
               prop="parHasSub"
             >
               <el-select
@@ -146,17 +153,18 @@
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="8">
+          <el-col :span="12">
             <el-form-item
               style="flex: 1; minwidth: 500px"
               label-width="130px"
               v-if="showMsg"
               label="附加信息:"
+              :rules="rules.parMsg"
               prop="parMsg"
             >
               <el-input
                 type="textarea"
-                :rows="3"
+                :rows="1"
                 placeholder="请输入附加信息"
                 v-model.trim="form.parMsg"
               ></el-input>
@@ -405,7 +413,7 @@ export default {
       });
     },
     // 初始化表格
-    setInitGroupData() {
+    setInitGroupData(init) {
       const date = new Date().valueOf();
       this.$set(this.form, "klRuleByIdSub", [
         {
@@ -429,13 +437,15 @@ export default {
           dataType: ""
         }
       ]);
-      this.form.parConceptId = ""; //医学标准术语清空
-      this.conceptList = []; //下拉列表清空
+      if (!init) {
+        this.form.parConceptId = ""; //医学标准术语清空
+        this.conceptList = []; //下拉列表清空
+      }
     },
     // 有无子条件切换
     hasSubChange(val) {
       if (val) {
-        this.setInitGroupData();
+        this.setInitGroupData(true);
       } else {
         this.form.klRuleByIdSub = [];
       }
@@ -599,7 +609,6 @@ export default {
   watch: {
     "form.klRuleByIdSub": {
       handler(val) {
-        console.log("000000000");
         this.form.klRuleByIdSub.forEach((item, i, arr) => {
           if (i == 0) {
             item.rowIndex = 1;
@@ -609,9 +618,13 @@ export default {
             item.rowIndex = arr[i - 1].rowIndex + 1;
           }
         });
-        console.log(this.form.klRuleByIdSub);
       },
       deep: true
+    },
+    "form.parHasSub"(val) {
+      if (!val || val == 0) {
+        this.form.klRuleByIdSub = [];
+      }
     }
   },
   computed: {

+ 25 - 16
src/components/knowledgeExtra/AddNewRuleTable.vue

@@ -45,7 +45,7 @@
     display: flex;
     .type_content_item1 {
       /deep/ .el-form-item__content {
-        padding-bottom: 0px;
+        padding-bottom: 8px;
       }
       .row_box {
         .el-col {
@@ -86,6 +86,12 @@
   .table_cell_cls {
     vertical-align: top;
   }
+  /deep/ .el-table__body .el-table__row.hover-row td {
+    background-color: transparent;
+  }
+  /deep/ .el-form-item__label{
+    font-size: 12px;
+  }
 }
 </style>
 
@@ -96,14 +102,15 @@
     <el-table
       border
       :data="klRuleByIdSub"
-      style="width: 100%"
       size="mini"
+      style="min-height:200px"
+      height="calc(100vh - 480px)"
       :row-style="rowStyle"
       :header-row-style="{ background: '#E3EAF4' }"
       :cell-style="cellStyle"
       :span-method="ObjectSpanMethod"
     >
-      <el-table-column width="80px" label="组" prop="groupType">
+      <el-table-column width="80px" label="组" prop="groupType" fixed="left">
         <template slot-scope="scope">
           <div class="btn_box">
             <div class="btn_div">
@@ -126,6 +133,7 @@
       <el-table-column
         width="80px"
         v-if="maxNum && maxNum > 1"
+        fixed="left"
         label="基础规则"
         prop="groupType"
       >
@@ -292,7 +300,7 @@
                         validator: (rule, value, callback) => {
                           subMaxOperator(scope, rule, value, callback);
                         },
-                        trigger: 'blur'
+                        trigger: 'change'
                       }
                     ]"
                   >
@@ -421,6 +429,11 @@
               label-width="100px"
               :prop="`klRuleByIdSub[${scope.$index}].subEqValue`"
               :rules="[
+                {
+                  required: true,
+                  message: '请输入' + textName(scope.$index),
+                  trigger: 'blur'
+                },
                 {
                   validator: (rule, value, callback) => {
                     subEqValue(scope, rule, value, callback);
@@ -443,11 +456,16 @@
               label-width="120px"
               style="flex: 2"
               v-if="scope.row.subType === 6"
-              :prop="`klRuleByIdSub[${scope.$index}].subEqValue`"
+              :prop="`klRuleByIdSub[${scope.$index}].subEqValue1`"
               :rules="[
+                {
+                  required: true,
+                  message: '请输入' + textName(scope.$index),
+                  trigger: 'blur'
+                },
                 {
                   validator: (rule, value, callback) => {
-                    subEqValuerule(scope, rule, value, callback);
+                    subEqValue(scope, rule, value, callback);
                   },
                   trigger: 'blur'
                 }
@@ -550,6 +568,7 @@ export default {
     },
     // 医学内容rule
     subEqValue(scope, rule, value, callback) {
+      console.log(value);
       if (value === "") {
         callback(new Error("请输入" + this.textName(scope.$index)));
       } else if (value.length > 200) {
@@ -558,16 +577,6 @@ export default {
         callback();
       }
     },
-    // 正则rule
-    subEqValuerule(scope, rule, value, callback) {
-      if (value === "") {
-        callback(new Error("请输入" + this.textName));
-      } else if (value.length > 200) {
-        callback(new Error(this.textName + "不能超过200字"));
-      } else {
-        callback();
-      }
-    },
     // 判断是否为最后一条规则
     isLastDate(id) {
       const tableLength = this.klRuleByIdSub.filter(

+ 14 - 14
src/components/knowledgeExtra/rules.js

@@ -1,4 +1,4 @@
-export const formRules =  {
+export const formRules = {
   parDescription: [
     { required: true, message: "请输入规则名称", trigger: ["blur"] },
     {
@@ -9,23 +9,23 @@ export const formRules =  {
           callback();
         }
       },
-      trigger: "blur"
+      trigger: ["change"]
     }
   ],
   parRuleType: [
-    { required: true, message: "请选择规则类型", trigger: ["blur"] }
+    { required: true, message: "请选择规则类型", trigger: ["change"] }
   ],
   parLenCode: [
-    { required: true, message: "请选择规则术语类型", trigger: ["blur"] }
+    { required: true, message: "请选择规则术语类型", trigger: ["change"] }
   ],
   parConceptId: [
-    { required: true, message: "请输入医学标准术语", trigger: ["blur"] }
+    { required: true, message: "请输入医学标准术语", trigger: ["change"] }
   ],
   parHasSub: [
-    { required: true, message: "请选择有无子条件", trigger: ["blur"] }
+    { required: true, message: "请选择有无子条件", trigger: ["change"] }
   ],
   parMsg: [
-    { required: true, message: "请输入附加信息", trigger: ["blur"] },
+    { required: true, message: "请输入附加信息", trigger: ["change"] },
     {
       validator: (rule, value, callback) => {
         if (value.length > 100) {
@@ -34,7 +34,7 @@ export const formRules =  {
           callback();
         }
       },
-      trigger: "blur"
+      trigger: "change"
     }
   ],
 
@@ -42,7 +42,7 @@ export const formRules =  {
 
 export const tableRules = {
   subDescription: [
-    { required: true, message: "请输入基础规则名称", trigger: ["blur"] },
+    { required: true, message: "请输入基础规则名称", trigger: ["change","blur"] },
     {
       validator: (rule, value, callback) => {
         if (value && value.length > 100) {
@@ -51,11 +51,11 @@ export const tableRules = {
           callback();
         }
       },
-      trigger: "blur"
+      trigger: ["change","blur"]
     }
   ],
   subType: [
-    { required: true, message: "请选择基础规则类型", trigger: ["blur"] }
+    { required: true, message: "请选择基础规则类型", trigger: ["change"] }
   ],
   subLenCode: [
     {
@@ -68,10 +68,10 @@ export const tableRules = {
     { required: true, message: "请输入医学标准术语", trigger: ["blur"] }
   ],
   dataType: [
-    { required: true, message: "请选择类型", trigger: ["blur"] }
+    { required: true, message: "请选择类型", trigger: ["change"] }
   ],
-  
-  
+
+
   subEqValue: [
     {
       validator: (rule, value, callback) => {

BIN
src/images/icon-copy.png