reaper 4 gadi atpakaļ
vecāks
revīzija
2832cb05d8

+ 1 - 0
src/components/knowledgeExtra/AddNewRule.vue

@@ -622,6 +622,7 @@ export default {
       }
       this.$nextTick(() => {
         this.$refs.tableView.scrollFun();
+        
       });
     },
     // 删除分组

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

@@ -810,20 +810,27 @@ export default {
         this.klRuleByIdSub[index].dataType === "2"
         ? "医学内容"
         : "正则表达式";
-    }
+    },
+    blurRef() {
+      console.log('11111');
+      this.$nextTick(() => {
+        console.log("???", this.$refs[this.theRef]);
+        this.$refs[this.theRef].handleClose();
+      });
+    },
   },
   components: {},
   mounted() {
     // this.theRef
     // FIXME 滚动问题BUG 暂无解决办法
-    // let that = this;
-    // this.$refs.table.bodyWrapper.addEventListener("scroll", function () {
-    //   console.log("scroll");
-    //   if (that.theRef) {
-    //     console.log("theRef", that.theRef);
-    //     that.$refs[that.theRef].blur();
-    //   }
-    // });
+    let that = this;
+    this.$refs.table.bodyWrapper.addEventListener("scroll", function () {
+      console.log("scroll");
+      if (that.theRef) {
+        console.log("theRef", that.theRef);
+        that.blurRef();
+      }
+    });
   },
   created() {
     this.numTypes = localStorage.getItem("zskNumDict");
@@ -833,46 +840,6 @@ export default {
     this.getSpanArr(this.klRuleByIdSub);
   },
 
-  // watch: {
-  //   klRuleByIdSub: {
-  //     handler() {
-  //       let that = this;
-
-  //       this.$refs.table.bodyWrapper.addEventListener("scroll", function (e) {
-  //         // console.log(that.klRuleByIdSub.length);
-  //         // console.log('subType',that.$refs[`klRuleByIdSub[1].subType`]);
-  //         that.$nextTick(() => {
-  //           that.klRuleByIdSub.forEach((ite, index) => {
-  //             console.log(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();
-  //           });
-  //         });
-  //       });
-  //     },
-  //     deep: true
-  //   }
-  // },
   updated() {},
   props: {
     klRuleByIdSub: {