Browse Source

Merge branch 'uiUpdate0507' into test

wyq 4 years ago
parent
commit
22cd88e975

+ 14 - 7
src/components/knowledgeExtra/AddDiagBase.vue

@@ -49,7 +49,8 @@
             :span-method="dataSpanMethod"
             :span-method="dataSpanMethod"
             :data="form.klDiagnoseTypeVO"
             :data="form.klDiagnoseTypeVO"
             border
             border
-            height="500"
+            style="min-height: 200px"
+            height="calc(100vh - 450px)"
             :header-cell-style="{background:'#E3EAF4'}"
             :header-cell-style="{background:'#E3EAF4'}"
           >
           >
             <el-table-column label="依据" width="100" fixed>
             <el-table-column label="依据" width="100" fixed>
@@ -663,12 +664,12 @@ export default {
           }
           }
         }
         }
       }
       }
-      this.i = this.form.klDiagnoseTypeVO.slice(-1).depart_id;
+      this.i = this.form.klDiagnoseTypeVO.slice(-1)[0].depart_id+1;
+      console.log(this.i)
     }
     }
-
+  
     this.setRules();
     this.setRules();
   },
   },
-
   computed: {
   computed: {
     numArr() {
     numArr() {
       let arr = [];
       let arr = [];
@@ -842,14 +843,17 @@ export default {
     addDiag(id) {
     addDiag(id) {
       let temp = this.getInitData();
       let temp = this.getInitData();
       var i = -1;
       var i = -1;
+      console.log(id)
       this.form.klDiagnoseTypeVO.forEach((item, inx) => {
       this.form.klDiagnoseTypeVO.forEach((item, inx) => {
         if (item.depart_id == id) {
         if (item.depart_id == id) {
           i = inx;
           i = inx;
+          console.log(inx)
         }
         }
       });
       });
+      
       this.form.klDiagnoseTypeVO.splice(i + 1, 0, temp);
       this.form.klDiagnoseTypeVO.splice(i + 1, 0, temp);
       this.setRules();
       this.setRules();
-      console.log(this.form.klDiagnoseTypeVO);
+      console.log(this.form.klDiagnoseTypeVO)
     },
     },
     //复制依据
     //复制依据
     copyDiag(id, inx) {
     copyDiag(id, inx) {
@@ -1420,7 +1424,7 @@ export default {
 <style lang="less" scoped>
 <style lang="less" scoped>
 @import '../../less/admin.less';
 @import '../../less/admin.less';
 .contents {
 .contents {
-  height: 780px;
+  height: 100%;
   .content {
   .content {
     background: #fff;
     background: #fff;
     padding: 20px 20px;
     padding: 20px 20px;
@@ -1440,6 +1444,9 @@ export default {
         background: #ebedf1;
         background: #ebedf1;
       }
       }
     }
     }
+    .el-table--scrollable-y .el-table__body-wrapper {
+      height: calc(100vh - 370px);
+    }
     /deep/ .el-input {
     /deep/ .el-input {
       height: 30px;
       height: 30px;
       line-height: 30px;
       line-height: 30px;
@@ -1459,7 +1466,7 @@ export default {
   .content-2 {
   .content-2 {
     margin-top: 10px;
     margin-top: 10px;
     padding: 20px 20px;
     padding: 20px 20px;
-    max-height: 650px;
+    height: calc(100vh - 370px);
     .cell {
     .cell {
       overflow: initial;
       overflow: initial;
     }
     }

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

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

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

@@ -810,20 +810,27 @@ export default {
         this.klRuleByIdSub[index].dataType === "2"
         this.klRuleByIdSub[index].dataType === "2"
         ? "医学内容"
         ? "医学内容"
         : "正则表达式";
         : "正则表达式";
-    }
+    },
+    blurRef() {
+      console.log('11111');
+      this.$nextTick(() => {
+        console.log("???", this.$refs[this.theRef]);
+        this.$refs[this.theRef].handleClose();
+      });
+    },
   },
   },
   components: {},
   components: {},
   mounted() {
   mounted() {
     // this.theRef
     // this.theRef
     // FIXME 滚动问题BUG 暂无解决办法
     // 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() {
   created() {
     this.numTypes = localStorage.getItem("zskNumDict");
     this.numTypes = localStorage.getItem("zskNumDict");
@@ -833,46 +840,6 @@ export default {
     this.getSpanArr(this.klRuleByIdSub);
     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() {},
   updated() {},
   props: {
   props: {
     klRuleByIdSub: {
     klRuleByIdSub: {