reaper 4 år sedan
förälder
incheckning
151c910350
1 ändrade filer med 52 tillägg och 3 borttagningar
  1. 52 3
      src/components/knowledgeExtra/AddNewRuleTable.vue

+ 52 - 3
src/components/knowledgeExtra/AddNewRuleTable.vue

@@ -100,6 +100,9 @@
   // /deep/ .el-table__body tr.current-row>td{
   //   background: #fff;
   // }
+  /deep/ .el-table .cell {
+    // overflow: initial;
+  }
 }
 </style>
 
@@ -204,6 +207,7 @@
               :disabled="scope.row.disabled"
               placeholder="请选择"
               @change="subTypeChange($event, scope.$index)"
+              :ref="`klRuleByIdSub[${scope.$index}].subType`"
             >
               <el-option
                 v-for="item in scope.row.baseTypes"
@@ -230,6 +234,7 @@
               :disabled="scope.row.disabled"
               v-model="scope.row.subLenCode"
               placeholder="请选择"
+              :ref="`klRuleByIdSub[${scope.$index}].subLenCode`"
               @change="subCodeChange($event, scope.$index)"
             >
               <el-option
@@ -261,6 +266,7 @@
               @focus="subConceptIdfocus(scope.$index)"
               :remote-method="searchConcept"
               v-model.trim="scope.row.subConceptId"
+              :ref="`klRuleByIdSub[${scope.$index}].subConceptId`"
             >
               <el-option
                 v-for="item in scope.row.conceptList"
@@ -286,6 +292,7 @@
                 v-model="scope.row.dataType"
                 placeholder="选择类型"
                 @change="dataTypeChange($event, scope.$index)"
+                :ref="`klRuleByIdSub[${scope.$index}].dataType`"
               >
                 <el-option label="数值类型" value="1"> </el-option>
                 <el-option label="文本类型" value="2"> </el-option>
@@ -316,6 +323,7 @@
                       v-model="scope.row.subMaxOperator"
                       placeholder="请选择"
                       clearable
+                      :ref="`klRuleByIdSub[${scope.$index}].subMaxOperator`"
                     >
                       <el-option
                         v-for="item in operMaxList"
@@ -384,6 +392,7 @@
                       v-model="scope.row.subMinOperator"
                       placeholder="请选择"
                       clearable
+                      :ref="`klRuleByIdSub[${scope.$index}].subMinOperator`"
                     >
                       <el-option
                         v-for="item in operMinList"
@@ -724,9 +733,49 @@ export default {
     this.numTypes = localStorage.getItem("zskNumDict");
     this.getSpanArr(this.klRuleByIdSub);
   },
-  beforeUpdate() {
-    this.getSpanArr(this.klRuleByIdSub);
-  },
+  mounted() {},
+  // beforeUpdate() {
+  //   this.getSpanArr(this.klRuleByIdSub);
+  //   console.log("boxxxxxxx", this.box);
+  //   // if (this.box) {
+  //   //   this.box.removeEventListener("scroll");
+  //   // }
+  //   // console.log(box);
+  //   // if (!this.box) {
+  //     this.box = document.querySelector(".el-table__body-wrapper");
+  //   // }
+
+  //   let that = this;
+  //   this.box.addEventListener("scroll", function (e) {
+  //     console.log(that.klRuleByIdSub.length);
+  //     console.log('subType',that.$refs[`klRuleByIdSub[1].subType`]);
+  //     that.klRuleByIdSub.forEach((ite, index) => {
+  //       // console.log(
+  //       //   that.$refs[`klRuleByIdSub[${index}].subType`],
+  //       //   that.$refs[`klRuleByIdSub[${index}].subLenCode`],
+  //       //   that.$refs[`klRuleByIdSub[${index}].subConceptId`],
+  //       //   that.$refs[`klRuleByIdSub[${index}].subMaxOperator`],
+  //       //   that.$refs[`klRuleByIdSub[${index}].subMinOperator`],
+  //       //   that.$refs[`klRuleByIdSub[${index}].subMinOperator`]
+  //       // );
+  //       that.$refs[`klRuleByIdSub[${index}].subType`] &&
+  //         that.$refs[`klRuleByIdSub[${index}].subType`].blur();
+  //       that.$refs[`klRuleByIdSub[${index}].subLenCode`] &&
+  //         that.$refs[`klRuleByIdSub[${index}].subLenCode`].blur();
+  //       that.$refs[`klRuleByIdSub[${index}].subConceptId`] &&
+  //         that.$refs[`klRuleByIdSub[${index}].subConceptId`].blur();
+  //       that.$refs[`klRuleByIdSub[${index}].dataType`] &&
+  //         that.$refs[`klRuleByIdSub[${index}].dataType`].blur();
+  //       that.$refs[`klRuleByIdSub[${index}].subMaxOperator`] &&
+  //         that.$refs[`klRuleByIdSub[${index}].subMaxOperator`].blur();
+  //       that.$refs[`klRuleByIdSub[${index}].subMinOperator`] &&
+  //         that.$refs[`klRuleByIdSub[${index}].subMinOperator`].blur();
+  //       that.$refs[`klRuleByIdSub[${index}]subMinOperator`] &&
+  //         that.$refs[`klRuleByIdSub[${index}]subMinOperator`].blur();
+  //     });
+  //   });
+  // },
+  updated() {},
   props: {
     klRuleByIdSub: {
       type: Array,