wyq 4 年 前
コミット
275e3953e6
1 ファイル変更14 行追加7 行削除
  1. 14 7
      src/components/knowledgeExtra/AddDiagBase.vue

+ 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;
     }
     }