Explorar el Código

修改显示高度

695593266@qq.com hace 9 meses
padre
commit
5685fc8cf0

+ 10 - 2
src/views/inspectionTemplate/components/inspectionTemplateDialog.vue

@@ -12,12 +12,12 @@
       ref="table"
       :columns="columns"
       :datasource="datasource"
-      height="calc(100vh - 605px)"
-      full-height="calc(100vh -100px)"
+      :height="tableHeight"
       tool-class="ele-toolbar-form"
       row-key="qualityLevelId"
       v-if="equipmentdialog"
       :selection.sync="selection"
+      @fullscreen-change="fullscreenChange"
     >
       <template v-slot:status="{ row }">
         {{ row.status ? '启用' : '停用' }}
@@ -42,6 +42,7 @@
         type: '',
         equipmentdialog: false,
         selection: [],
+        tableHeight: 'calc(100vh - 605px)',
         columns: [
           {
             width: 45,
@@ -128,6 +129,13 @@
 
       search(where) {
         this.$refs.table.reload({ page: 1, where });
+      },
+      fullscreenChange(fullscreen) {
+        if (fullscreen) {
+          this.tableHeight = 'calc(100vh - 120px)';
+        } else {
+          this.tableHeight = 'calc(100vh - 605px)';
+        }
       }
     }
   };