zhulizhen1111 4 éve
szülő
commit
a7d5bb3aaf

+ 18 - 2
src/views/equipment/table/recordDialog.vue

@@ -2,10 +2,10 @@
     <!-- 记录事项 -->
     <div class='detail-dialog'>
         <el-dialog :title='`${major}${tabName}记录事项`' width='80%' :visible.sync='visible' style='height:900px;overflow-y:scroll;'>
-            <div class='bottom-table' style='height:600px'>
+            <div class='bottom-table' :style='`height:${height}`'>
                 <el-table
                     :data='tableData'
-                    height='560'
+                    :height='tableHeight'
                     :border='true'
                     style='width: 100%;margin-bottom:12px;'
                     :span-method='objectSpanMethod'
@@ -39,6 +39,22 @@ export default {
             tableData: []
         }
     },
+    computed: {
+        tableHeight() {
+            if (window.screen.height <= 768) {
+                return 450
+            } else {
+                return 560
+            }
+        },
+        height() {
+            if (window.screen.height <= 768) {
+                return 500
+            } else {
+                return 600
+            }
+        }
+    },
     methods: {
         open(smsxt) {
             // console.log(major)

+ 25 - 2
src/views/other/zhsxDialog.vue

@@ -7,8 +7,15 @@
                 <p>2.广场消防安全培训、消防演习</p>
                 <p>3.相关政府强制性检测的按时完成情况及检测中提出的问题</p>
                 <p>4.广场安全质量第三方检测过程中列出的整改事项</p>
-                <div class='bottom-table'>
-                    <el-table :data='tableData' height='480' style='width:100%;' :span-method='objectSpanMethod' border v-if='tableData.length>0'>
+                <div class='bottom-table' :style='`height:${height}`'>
+                    <el-table
+                        :data='tableData'
+                        :height='tableHeight'
+                        style='width:100%;'
+                        :span-method='objectSpanMethod'
+                        border
+                        v-if='tableData.length>0'
+                    >
                         <el-table-column label='序号' type='index' width='60'></el-table-column>
                         <el-table-column prop='jcsx' label='检测事项' :show-overflow-tooltip='true' width='400'></el-table-column>
                         <el-table-column prop='zgbm' label='主管部门' :show-overflow-tooltip='true'></el-table-column>
@@ -27,6 +34,22 @@ export default {
             visible: false
         }
     },
+    computed: {
+        tableHeight() {
+            if (window.screen.height <= 768) {
+                return 350
+            } else {
+                return 440
+            }
+        },
+        height() {
+            if (window.screen.height <= 768) {
+                return 300
+            } else {
+                return 400
+            }
+        }
+    },
     methods: {
         open() {
             this.visible = true