From 41d6da7f5f8f0ce37c3521f6c4d639ab77ed9aac Mon Sep 17 00:00:00 2001
From: 付延余 <f-yanyu@outlook.com>
Date: 星期五, 29 四月 2022 14:49:52 +0800
Subject: [PATCH] 其他业务

---
 src/pages/components/shebaoZhengjiShouru/shebaoZhengjiShouruTotal.vue |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/pages/components/shebaoZhengjiShouru/shebaoZhengjiShouruTotal.vue b/src/pages/components/shebaoZhengjiShouru/shebaoZhengjiShouruTotal.vue
index 59dc2dd..6178120 100644
--- a/src/pages/components/shebaoZhengjiShouru/shebaoZhengjiShouruTotal.vue
+++ b/src/pages/components/shebaoZhengjiShouru/shebaoZhengjiShouruTotal.vue
@@ -3,6 +3,8 @@
      <div class="danwei-box">鍗曚綅锛氫汉</div>
      <div class="shebaoZhengjiShouruForm-table">
        <el-table
+         :cell-style="handleCellStyle"
+         :max-height="tableHeight"
          border
          style="width: 100%"
          :data="totalTableData">
@@ -38,6 +40,7 @@
 </template>
 
 <script>
+  import nowSize from "../../../libs/nowSize";
     export default {
         name: "shebaoZhengjiShouruTotal",
         props: {
@@ -50,7 +53,24 @@
         },
         data() {
             return {
+                tableHeight: window.innerHeight - nowSize(380)
             }
+        },
+        methods: {
+            getHeight() {
+                this.tableHeight = window.innerHeight - nowSize(350)
+            },
+            handleCellStyle({rowIndex, columnIndex}) {
+                if(columnIndex == 0) {
+                    return { background:'#51D2FF' }
+                }
+            },
+        },
+        created() {
+            window.addEventListener('resize', this.getHeight)
+        },
+        destroy() {
+            window.addEventListener('resize', this.getHeight)
         }
     }
 </script>

--
Gitblit v1.9.1