Преглед изворни кода

危急值默认选第一个

wyq пре 4 година
родитељ
комит
5a369d23a4
1 измењених фајлова са 166 додато и 200 уклоњено
  1. 166 200
      src/components/knowledgeExtra/AddNewRule.vue

+ 166 - 200
src/components/knowledgeExtra/AddNewRule.vue

@@ -74,11 +74,7 @@
 </style>
 <template>
   <div>
-    <crumbs
-      :title="title"
-      :param="$route.params"
-      linkTo="ZskRuleManager"
-    ></crumbs>
+    <crumbs :title="title" :param="$route.params" linkTo="ZskRuleManager"></crumbs>
     <div id="AddRuleContent">
       <el-form size="mini" :model="form" ref="ruleForm">
         <div class="table_form">
@@ -90,10 +86,7 @@
               :rules="rules.parDescription"
               prop="parDescription"
             >
-              <el-input
-                style="width: 100%"
-                v-model.trim="form.parDescription"
-              />
+              <el-input style="width: 100%" v-model.trim="form.parDescription" />
             </el-form-item>
           </div>
 
@@ -105,18 +98,13 @@
               :rules="rules.parRuleType"
               prop="parRuleType"
             >
-              <el-select
-                v-model="form.parRuleType"
-                placeholder="请选择"
-                @change="ruleTypeChange"
-              >
+              <el-select v-model="form.parRuleType" placeholder="请选择" @change="ruleTypeChange">
                 <el-option
                   v-for="item in ruleTypeList"
                   :key="item.id"
                   :label="item.name"
                   :value="item.id"
-                >
-                </el-option>
+                ></el-option>
               </el-select>
               <template slot="error" slot-scope="scope">
                 <div class="my_error">
@@ -127,13 +115,11 @@
                     placement="top-start"
                     popper-class="popper_class"
                   >
-                    <img src="../../images/exclamationpoint.png" alt="" />
+                    <img src="../../images/exclamationpoint.png" alt />
                   </el-tooltip>
                 </div>
               </template>
-              <div class="tip_text">
-                注:更改规则类型,将会清空已填写的规则内容~
-              </div>
+              <div class="tip_text">注:更改规则类型,将会清空已填写的规则内容~</div>
             </el-form-item>
           </div>
           <div class="table_cell">
@@ -153,26 +139,19 @@
                     placement="top-start"
                     popper-class="popper_class"
                   >
-                    <img src="../../images/exclamationpoint.png" alt="" />
+                    <img src="../../images/exclamationpoint.png" alt />
                   </el-tooltip>
                 </div>
               </template>
-              <el-select
-                v-model="form.parLenCode"
-                placeholder="请选择"
-                @change="ruleTermChange"
-              >
+              <el-select v-model="form.parLenCode" placeholder="请选择" @change="ruleTermChange">
                 <el-option
                   v-for="item in ruleTermTypeList"
                   :key="item.id"
                   :label="item.name"
                   :value="item.code"
-                >
-                </el-option>
+                ></el-option>
               </el-select>
-              <div class="tip_text">
-                注:更改规则术语类型,将会清空已填写的规则内容~
-              </div>
+              <div class="tip_text">注:更改规则术语类型,将会清空已填写的规则内容~</div>
             </el-form-item>
           </div>
           <div class="table_cell">
@@ -196,8 +175,7 @@
                   :key="item.conceptId"
                   :label="item.conceptName"
                   :value="item.conceptId"
-                >
-                </el-option>
+                ></el-option>
               </el-select>
             </el-form-item>
           </div>
@@ -208,11 +186,7 @@
               :rules="rules.parHasSub"
               prop="parHasSub"
             >
-              <el-select
-                v-model="form.parHasSub"
-                placeholder="请选择"
-                @change="hasSubChange"
-              >
+              <el-select v-model="form.parHasSub" placeholder="请选择" @change="hasSubChange">
                 <el-option label="有" :value="1"></el-option>
                 <el-option label="无" :value="0"></el-option>
               </el-select>
@@ -237,7 +211,7 @@
                 v-model.trim="form.parMsg"
               ></el-input>
             </el-form-item>
-          </div> -->
+          </div>-->
         </div>
         <!-- 表格 -->
         <AddNewRuleTable
@@ -262,12 +236,7 @@
         />
         <el-form-item>
           <div class="form_btn">
-            <el-button
-              type="primary"
-              size="medium "
-              @click="submitForm('ruleForm')"
-              >确定</el-button
-            >
+            <el-button type="primary" size="medium " @click="submitForm('ruleForm')">确定</el-button>
           </div>
         </el-form-item>
       </el-form>
@@ -275,14 +244,14 @@
   </div>
 </template>
 <script type="text/javascript">
-import api from "@api/knowledgeLib.js";
-import { formRules } from "./rules";
-import AddNewRuleTable from "./AddNewRuleTable";
+import api from '@api/knowledgeLib.js';
+import { formRules } from './rules';
+import AddNewRuleTable from './AddNewRuleTable';
 export default {
-  name: "AddRule",
+  name: 'AddRule',
   data() {
     return {
-      title: "规则维护-添加规则",
+      title: '规则维护-添加规则',
       ruleTypeList: [], //规则类型列表  1
       ruleTermTypeList: [], //规则术语类型列表  2
       conceptList: [], //医学标准术语列表 3
@@ -291,17 +260,17 @@ export default {
       subRuleMaxNum: null, //规则内容中规则的限制个数
       isCopy: false,
       parId: null,
-      msgDict: "", //显示附加信息的类型
+      msgDict: '', //显示附加信息的类型
       firstPlace: null,
       tableShow: true,
       form: {
-        parDescription: "",
-        parRuleType: "",
-        parConceptId: "",
-        parlibName: "",
-        parLenName: "",
+        parDescription: '',
+        parRuleType: '',
+        parConceptId: '',
+        parlibName: '',
+        parLenName: '',
         parHasSub: undefined,
-        parLenCode: "",
+        parLenCode: '',
         klRuleByIdSub: []
       },
       rules: formRules
@@ -315,7 +284,7 @@ export default {
     if (info) {
       this.parId = info.parId;
       this.isCopy = param.copy;
-      this.title = "规则维护-" + (this.isCopy ? "复制" : "修改") + "规则";
+      this.title = '规则维护-' + (this.isCopy ? '复制' : '修改') + '规则';
       this.form = JSON.parse(JSON.stringify(info));
       // 编辑初始化选择框
       this.initEdidData();
@@ -329,12 +298,12 @@ export default {
     async initEdidData() {
       // 规则术语类型初始化
       const newruleTermTypeList = await this.ruleTypeList.find(
-        (it) => it.id == this.form.parRuleType
+        it => it.id == this.form.parRuleType
       );
       this.ruleTermTypeList = await newruleTermTypeList.subMenuList;
       // 基础规则类型初始化
       const obj = await this.ruleTermTypeList.find(
-        (it1) => it1.code == this.form.parLenCode
+        it1 => it1.code == this.form.parLenCode
       );
       this.baseTypeList = obj.subMenuList;
       this.subRuleMaxNum = obj.number;
@@ -344,10 +313,10 @@ export default {
       ];
       if (this.form.parConceptId && this.checkFirstPlace && this.conceptList) {
         this.firstPlace = this.conceptList.find(
-          (it) => it.conceptId === this.form.parConceptId
+          it => it.conceptId === this.form.parConceptId
         );
         if (this.firstPlace) {
-          this.firstPlace["checkedType"] = this.ruleTermCodeStr;
+          this.firstPlace['checkedType'] = this.ruleTermCodeStrs;
         }
       } else if (!this.form.parConceptId) {
         this.setInitGroupData();
@@ -356,40 +325,40 @@ export default {
         this.firstPlace = null;
       }
       await this.form.klRuleByIdSub.forEach((item, i, arr) => {
-        item.groupId = "groupId" + item.groupType;
-        item.groupChildId = "child" + item.subId;
+        item.groupId = 'groupId' + item.groupType;
+        item.groupChildId = 'child' + item.subId;
         //TODO => 赋值时一定要注意set更新页面
-        this.$set(item, "baseTypes", [...this.baseTypeList]);
+        this.$set(item, 'baseTypes', [...this.baseTypeList]);
         this.$set(
           item,
-          "baseTermTypeList",
-          item.baseTypes.find((it2) => it2.type === item.subType).subMenuList
+          'baseTermTypeList',
+          item.baseTypes.find(it2 => it2.type === item.subType).subMenuList
         );
-        this.$set(item, "conceptList", [
+        this.$set(item, 'conceptList', [
           {
             conceptName: item.subLibName || item.subConceptName,
             conceptId: item.subConceptId
           }
         ]);
         if (item.subMaxOperator || item.subMinOperator) {
-          item.dataType = "1";
+          item.dataType = '1';
         } else if (item.subEqValue) {
-          item.dataType = "2";
+          item.dataType = '2';
         }
 
         // disable
         if (this.form.parHasSub && this.firstPlace) {
           if (arr[i - 1] && arr[i - 1].groupId == item.groupId) {
-            this.$set(item, "disabled", false);
+            this.$set(item, 'disabled', false);
           } else {
-            this.$set(item, "disabled", true);
+            this.$set(item, 'disabled', true);
           }
         }
       });
     },
     // 提交
     submitForm(formName) {
-      this.$refs[formName].validate((valid) => {
+      this.$refs[formName].validate(valid => {
         if (valid) {
           let params = JSON.parse(JSON.stringify(this.form));
           params.klRuleInfoSaveSub = params.klRuleByIdSub;
@@ -406,7 +375,7 @@ export default {
               }
             }
           });
-          params.klRuleInfoSaveSub.forEach((ite) => {
+          params.klRuleInfoSaveSub.forEach(ite => {
             delete ite.groupId;
             delete ite.groupChildId;
             delete ite.rowIndex;
@@ -426,19 +395,19 @@ export default {
     },
     // 子集修改父级的数组
     setFormData(index, data) {
-      this.$set(this.form.klRuleByIdSub[index], "conceptList", data);
+      this.$set(this.form.klRuleByIdSub[index], 'conceptList', data);
     },
     // table_form 规则类型选中
     ruleTypeChange(val) {
-      this.form.parLenCode = "";
-      const obj = this.ruleTypeList.find((it) => it.id === val);
+      this.form.parLenCode = '';
+      const obj = this.ruleTypeList.find(it => it.id === val);
       this.ruleTermTypeList = obj.subMenuList;
       this.subRuleMaxNum = undefined;
       this.setInitGroupData();
     },
     // table_form 规则术语类型选中
     ruleTermChange(val) {
-      const obj = this.ruleTermTypeList.find((it) => it.code === val);
+      const obj = this.ruleTermTypeList.find(it => it.code === val);
       this.form.parLenName = obj.name;
       this.baseTypeList = obj.subMenuList;
       this.subRuleMaxNum = obj.number;
@@ -449,9 +418,9 @@ export default {
     parConceptIdChange(val) {
       this.$nextTick(() => {
         if (val && this.checkFirstPlace && this.conceptList) {
-          this.firstPlace = this.conceptList.find((it) => it.conceptId === val);
+          this.firstPlace = this.conceptList.find(it => it.conceptId === val);
           if (this.firstPlace) {
-            this.firstPlace["checkedType"] = this.ruleTermCodeStr;
+            this.firstPlace['checkedType'] = this.ruleTermCodeStrs;
           }
         } else if (!val) {
           this.setInitGroupData();
@@ -462,29 +431,27 @@ export default {
         if (this.form.parHasSub && this.firstPlace) {
           const dict =
             localStorage
-              .getItem("zskDicts")
-              .match(new RegExp(this.firstPlace.checkedType + "-\\d+", "g")) ||
+              .getItem('zskDicts')
+              .match(new RegExp(this.firstPlace.checkedType + '-\\d+', 'g')) ||
             [];
-          const types = dict[0].split("-");
+          const types = dict[0].split('-');
           let obj = this.form.klRuleByIdSub;
           obj.forEach((item, i, arr) => {
             if (arr[i - 1] && arr[i - 1].groupId == item.groupId) {
-              this.$set(item, "disabled", false);
+              this.$set(item, 'disabled', false);
             } else {
-              this.$set(item, "disabled", true);
-              this.$set(item, "subType", parseInt(types[2]));
-              const subobj = this.baseTypeList.find(
-                (it) => it.type == types[2]
-              );
-              this.$set(item, "baseTermTypeList", subobj.subMenuList);
-              this.$set(item, "subLenCode", types[1]);
-              this.$set(item, "subDescription", this.firstPlace.conceptName);
-              this.$set(item, "subConceptId", this.firstPlace.conceptId);
-              this.$set(item, "subConceptName", this.firstPlace.conceptName);
-              this.$set(item, "conceptList", [this.firstPlace]);
+              this.$set(item, 'disabled', true);
+              this.$set(item, 'subType', parseInt(types[2]));
+              const subobj = this.baseTypeList.find(it => it.type == types[2]);
+              this.$set(item, 'baseTermTypeList', subobj.subMenuList);
+              this.$set(item, 'subLenCode', types[1]);
+              this.$set(item, 'subDescription', this.firstPlace.conceptName);
+              this.$set(item, 'subConceptId', this.firstPlace.conceptId);
+              this.$set(item, 'subConceptName', this.firstPlace.conceptName);
+              this.$set(item, 'conceptList', [this.firstPlace]);
             }
           });
-          this.$set(this.form, "klRuleByIdSub", obj);
+          this.$set(this.form, 'klRuleByIdSub', obj);
         }
       });
     },
@@ -494,34 +461,34 @@ export default {
       const date = new Date().valueOf();
       this.$nextTick(() => {
         if (this.form.parHasSub && this.form.parHasSub != 0) {
-          this.$set(this.form, "klRuleByIdSub", [
+          this.$set(this.form, 'klRuleByIdSub', [
             {
               groupId: date,
-              groupChildId: "child" + new Date().valueOf(),
+              groupChildId: 'child' + new Date().valueOf(),
               baseTypes: this.baseTypeList,
               baseTermTypeList: [],
               conceptList: [],
-              subDescription: "",
-              parRuleType: "",
-              subConceptId: "",
-              subType: "",
-              subMaxOperator: "",
-              subMaxUnit: "",
-              subMaxValue: "",
-              subMinOperator: "",
-              subMinUnit: "",
-              subMinValue: "",
-              subEqValue: "",
-              subLenCode: "",
-              dataType: ""
+              subDescription: '',
+              parRuleType: '',
+              subConceptId: '',
+              subType: '',
+              subMaxOperator: '',
+              subMaxUnit: '',
+              subMaxValue: '',
+              subMinOperator: '',
+              subMinUnit: '',
+              subMinValue: '',
+              subEqValue: '',
+              subLenCode: '',
+              dataType: ''
             }
           ]);
         } else {
-          this.$set(this.form, "klRuleByIdSub", []);
+          this.$set(this.form, 'klRuleByIdSub', []);
         }
 
         if (!init) {
-          this.form.parConceptId = ""; //医学标准术语清空
+          this.form.parConceptId = ''; //医学标准术语清空
           this.conceptList = []; //下拉列表清空
           this.firstPlace = null;
         }
@@ -539,35 +506,35 @@ export default {
     // 基础规则类型切换
     subTypeChange(val, index) {
       // index
-      const obj = this.baseTypeList.find((it) => it.type === val);
+      const obj = this.baseTypeList.find(it => it.type === val);
 
       this.$set(
         this.form.klRuleByIdSub[index],
-        "baseTermTypeList",
+        'baseTermTypeList',
         obj.subMenuList
       );
-      this.$set(this.form.klRuleByIdSub[index], "subLenCode", "");
-      this.$set(this.form.klRuleByIdSub[index], "dataType", "");
+      this.$set(this.form.klRuleByIdSub[index], 'subLenCode', '');
+      this.$set(this.form.klRuleByIdSub[index], 'dataType', '');
 
       this.clearConcept(index);
       this.clearNumText(index);
     },
     clearConcept(index) {
-      this.$set(this.form.klRuleByIdSub[index], "subConceptId", "");
+      this.$set(this.form.klRuleByIdSub[index], 'subConceptId', '');
       this.conceptList = [];
     },
     clearNumText(index) {
-      this.$set(this.form.klRuleByIdSub[index], "subMaxOperator", "");
-      this.$set(this.form.klRuleByIdSub[index], "subMaxValue", "");
-      this.$set(this.form.klRuleByIdSub[index], "subMaxUnit", "");
-      this.$set(this.form.klRuleByIdSub[index], "subMinOperator", "");
-      this.$set(this.form.klRuleByIdSub[index], "subMinValue", "");
-      this.$set(this.form.klRuleByIdSub[index], "subMinUnit", "");
-      this.$set(this.form.klRuleByIdSub[index], "subEqValue", "");
-      this.$set(this.form.klRuleByIdSub[index], "subEqOperator", "");
+      this.$set(this.form.klRuleByIdSub[index], 'subMaxOperator', '');
+      this.$set(this.form.klRuleByIdSub[index], 'subMaxValue', '');
+      this.$set(this.form.klRuleByIdSub[index], 'subMaxUnit', '');
+      this.$set(this.form.klRuleByIdSub[index], 'subMinOperator', '');
+      this.$set(this.form.klRuleByIdSub[index], 'subMinValue', '');
+      this.$set(this.form.klRuleByIdSub[index], 'subMinUnit', '');
+      this.$set(this.form.klRuleByIdSub[index], 'subEqValue', '');
+      this.$set(this.form.klRuleByIdSub[index], 'subEqOperator', '');
     },
     editKlRuleByIdSub(data) {
-      this.$set(this.form, "klRuleByIdSub", data);
+      this.$set(this.form, 'klRuleByIdSub', data);
       // this.form.klRuleByIdSub = data;
     },
     // 添加分组 || 规则
@@ -580,25 +547,25 @@ export default {
       !date && (date = new Date().valueOf());
       const obj = {
         groupId: date,
-        groupChildId: "child" + new Date().valueOf(),
+        groupChildId: 'child' + new Date().valueOf(),
         baseTypes: this.baseTypeList,
         baseTermTypeList: [],
         conceptList: [],
-        subDescription: "",
-        parRuleType: "",
-        subConceptId: "",
-        subType: "",
-        subMaxOperator: "",
-        subMaxUnit: "",
-        subMaxValue: "",
-        subMinOperator: "",
-        subMinUnit: "",
-        subMinValue: "",
-        subEqValue: "",
-        subLenCode: "",
-        dataType: ""
+        subDescription: '',
+        parRuleType: '',
+        subConceptId: '',
+        subType: '',
+        subMaxOperator: '',
+        subMaxUnit: '',
+        subMaxValue: '',
+        subMinOperator: '',
+        subMinUnit: '',
+        subMinValue: '',
+        subEqValue: '',
+        subLenCode: '',
+        dataType: ''
       };
-      if (typeof arg.index == "number") {
+      if (typeof arg.index == 'number') {
         // 添加规则 直接在当前位置之后添加
         this.form.klRuleByIdSub.splice(arg.index + 1, 0, obj);
       } else {
@@ -609,19 +576,19 @@ export default {
           obj.disabled = true;
           const dict =
             localStorage
-              .getItem("zskDicts")
-              .match(new RegExp(this.firstPlace.checkedType + "-\\d+", "g")) ||
+              .getItem('zskDicts')
+              .match(new RegExp(this.firstPlace.checkedType + '-\\d+', 'g')) ||
             [];
-          const types = dict[0].split("-");
-          this.$set(obj, "disabled", true);
-          this.$set(obj, "subType", parseInt(types[2]));
-          const subobj = this.baseTypeList.find((it) => it.type == types[2]);
-          this.$set(obj, "baseTermTypeList", subobj.subMenuList);
-          this.$set(obj, "subLenCode", types[1]);
-          this.$set(obj, "subDescription", this.firstPlace.conceptName);
-          this.$set(obj, "subConceptId", this.firstPlace.conceptId);
-          this.$set(obj, "subConceptName", this.firstPlace.conceptName);
-          this.$set(obj, "conceptList", [this.firstPlace]);
+          const types = dict[0].split('-');
+          this.$set(obj, 'disabled', true);
+          this.$set(obj, 'subType', parseInt(types[2]));
+          const subobj = this.baseTypeList.find(it => it.type == types[2]);
+          this.$set(obj, 'baseTermTypeList', subobj.subMenuList);
+          this.$set(obj, 'subLenCode', types[1]);
+          this.$set(obj, 'subDescription', this.firstPlace.conceptName);
+          this.$set(obj, 'subConceptId', this.firstPlace.conceptId);
+          this.$set(obj, 'subConceptName', this.firstPlace.conceptName);
+          this.$set(obj, 'conceptList', [this.firstPlace]);
         }
         var i = -1;
         this.form.klRuleByIdSub.forEach((item, inx) => {
@@ -633,32 +600,31 @@ export default {
       }
       this.$nextTick(() => {
         this.$refs.tableView.scrollFun();
-        
       });
     },
     // 删除分组
     delGroup(groupId) {
       const list = this.form.klRuleByIdSub.filter(
-        (item) => item.groupId != groupId
+        item => item.groupId != groupId
       );
       this.form.klRuleByIdSub = list;
     },
     // 删除规则
     delGroupChild(groupChildId) {
       const newGroupList = this.form.klRuleByIdSub.filter(
-        (item) => item.groupChildId != groupChildId
+        item => item.groupChildId != groupChildId
       );
       this.form.klRuleByIdSub = newGroupList;
     },
     setDict() {
-      this.dict = localStorage.getItem("zskDicts");
-      this.msgDict = localStorage.getItem("zskMsgDict");
-      this.subDict = localStorage.getItem("zskSubDict");
+      this.dict = localStorage.getItem('zskDicts');
+      this.msgDict = localStorage.getItem('zskMsgDict');
+      this.subDict = localStorage.getItem('zskSubDict');
     },
     showConfirmDialog(msg, resolve) {
-      this.$alert(msg, "提示", {
-        confirmButtonText: "确定",
-        type: "warning"
+      this.$alert(msg, '提示', {
+        confirmButtonText: '确定',
+        type: 'warning'
       })
         .then(() => {
           resolve();
@@ -673,34 +639,34 @@ export default {
       };
       api
         .searchConcept(param)
-        .then((res) => {
-          if (res.data.code == "0") {
+        .then(res => {
+          if (res.data.code == '0') {
             const data = res.data.data;
             this.conceptList = data;
           }
         })
-        .catch((error) => {
+        .catch(error => {
           console.log(error);
         });
     },
     getTypeList() {
-      this.ruleTypeList = JSON.parse(localStorage.getItem("zskTypesList"));
+      this.ruleTypeList = JSON.parse(localStorage.getItem('zskTypesList'));
     },
     saveRule(params) {
-      api.saveRule(params).then((res) => {
+      api.saveRule(params).then(res => {
         if (res.data.code == 0) {
           this.$message({
-            message: "操作成功",
-            type: "success"
+            message: '操作成功',
+            type: 'success'
           });
           this.$router.push({
-            name: "ZskRuleManager",
+            name: 'ZskRuleManager',
             params: Object.assign({}, this.$route.params, { currentPage: 1 })
           });
         } else {
           this.$message({
             message: res.data.msg,
-            type: "warning"
+            type: 'warning'
           });
         }
       });
@@ -709,53 +675,53 @@ export default {
      * 子组件调用方法
      */
     childClearConcept(index) {
-      this.$set(this.form.klRuleByIdSub[index], "subConceptId", "");
-      this.$set(this.form.klRuleByIdSub[index], "conceptList", []);
+      this.$set(this.form.klRuleByIdSub[index], 'subConceptId', '');
+      this.$set(this.form.klRuleByIdSub[index], 'conceptList', []);
     },
     childClearNumText(index) {
       let obj = JSON.parse(JSON.stringify(this.form.klRuleByIdSub));
 
-      obj[index].subMaxOperator = "";
-      obj[index].subMaxValue = "";
-      obj[index].subMaxUnit = "";
-      obj[index].subMinOperator = "";
-      obj[index].subMinValue = "";
-      obj[index].subMinUnit = "";
-      obj[index].subEqValue = "";
+      obj[index].subMaxOperator = '';
+      obj[index].subMaxValue = '';
+      obj[index].subMaxUnit = '';
+      obj[index].subMinOperator = '';
+      obj[index].subMinValue = '';
+      obj[index].subMinUnit = '';
+      obj[index].subEqValue = '';
       // this.$set(obj[index], "subEqValue", "");
-      obj[index].subEqOperator = "";
+      obj[index].subEqOperator = '';
       // this.klRuleByIdSub = obj;
       // this.$emit("editKlRuleByIdSub", obj);
       this.editKlRuleByIdSub(obj);
     },
     ChildDataTypeChange(val, index) {
-      this.form.klRuleByIdSub[index].subEqOperator = val === "2" ? "=" : "";
+      this.form.klRuleByIdSub[index].subEqOperator = val === '2' ? '=' : '';
       this.$set(
         this.form.klRuleByIdSub[index],
-        "subEqOperator",
-        val === "2" ? "=" : ""
+        'subEqOperator',
+        val === '2' ? '=' : ''
       );
 
       this.childClearNumText(index);
       // TODO 新增的内容追踪不到
       this.form.klRuleByIdSub.forEach((item, i) => {
         if (index === i) {
-          this.$set(item, "dataType", val);
+          this.$set(item, 'dataType', val);
         }
       });
     },
     childSubCodeChange(val, index, numTypes) {
-      if ((numTypes + ",").indexOf(val + ",") > -1) {
-        this.$set(this.form.klRuleByIdSub[index], "dataType", "1");
+      if ((numTypes + ',').indexOf(val + ',') > -1) {
+        this.$set(this.form.klRuleByIdSub[index], 'dataType', '1');
       } else {
-        this.$set(this.form.klRuleByIdSub[index], "dataType", "");
+        this.$set(this.form.klRuleByIdSub[index], 'dataType', '');
       }
       this.childClearConcept(index);
       this.childClearNumText(index);
     }
   },
   watch: {
-    "form.klRuleByIdSub": {
+    'form.klRuleByIdSub': {
       handler(val) {
         this.form.klRuleByIdSub.forEach((item, i, arr) => {
           if (i == 0) {
@@ -771,24 +737,24 @@ export default {
     }
   },
   computed: {
-    disable: function () {
+    disable: function() {
       return Object.keys(this.firstPlace || {}).length > 0;
     },
-    ruleTermCodeStr: function () {
-      const str = this.form.parRuleType + "-" + this.form.parLenCode+ "-" + 1;
+    ruleTermCodeStr: function() {
+      const str = this.form.parRuleType + '-' + this.form.parLenCode + '-' + 1;
       if (str.length <= 1) {
-        return "";
+        return '';
       }
       return str;
     },
-    ruleTermCodeStrs: function () {
-      const str = this.form.parRuleType + "-" + this.form.parLenCode;
+    ruleTermCodeStrs: function() {
+      const str = this.form.parRuleType + '-' + this.form.parLenCode;
       if (str.length <= 1) {
-        return "";
+        return '';
       }
       return str;
     },
-    showMsg: function () {
+    showMsg: function() {
       return (
         this.ruleTermCodeStr.length > 2 &&
         this.msgDict.indexOf(this.ruleTermCodeStr) > -1
@@ -800,8 +766,8 @@ export default {
       }
       return false;
     },
-    checkFirstPlace: function () {
-      return this.dict.indexOf(this.ruleTermCodeStr) > -1;
+    checkFirstPlace: function() {
+      return this.dict.indexOf(this.ruleTermCodeStrs) > -1;
     }
   },
   components: { AddNewRuleTable }