From a38281e697cde9f45926a6af0c88bec14501fec0 Mon Sep 17 00:00:00 2001
From: liuyg <liuyg@qq.com>
Date: Tue, 15 Feb 2022 11:06:34 +0800
Subject: [PATCH] 68个表格在1366*768下的适配,保安单位情况智能分析中的图表的适配以及其按钮会被遮住不能点击

---
 src/views/workreport/workreply.vue |   70 ++++++++++++++++++----------------
 1 files changed, 37 insertions(+), 33 deletions(-)

diff --git a/src/views/workreport/workreply.vue b/src/views/workreport/workreply.vue
index 64f0386..cc1695b 100644
--- a/src/views/workreport/workreply.vue
+++ b/src/views/workreport/workreply.vue
@@ -1,8 +1,12 @@
 <template>
   <basic-container
-    :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+    :class="[
+      $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize',
+      $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : ''
+    ]"
   >
     <avue-crud
+      class="tablesss"
       :option="option"
       :table-loading="loading"
       :data="data"
@@ -49,7 +53,7 @@
   remove,
   update,
   add,
-  getDetail,
+  getDetail
 } from "@/api/workreport/workreport";
 import { getDept } from "@/api/system/dept";
 import { mapGetters } from "vuex";
@@ -71,7 +75,7 @@
         pageSize: 10,
         currentPage: 1,
         total: 0,
-        ...this.$store.state.control.changePageSize,
+        ...this.$store.state.control.changePageSize
       },
       selectionList: [],
       option: {
@@ -93,9 +97,9 @@
         menuWidth: 320,
         dialogClickModal: false,
         column: workreplyColumn,
-        ...this.$store.state.control.clearOtherBut,
+        ...this.$store.state.control.clearOtherBut
       },
-      data: [],
+      data: []
     };
   },
   computed: {
@@ -105,18 +109,20 @@
         addBtn: this.vaildData(null, false),
         viewBtn: this.vaildData(this.permission.workreply_view, false),
         delBtn: this.vaildData(null, false),
-        editBtn: this.vaildData(this.permission.workreply_edit, false),
+        editBtn: this.vaildData(this.permission.workreply_edit, false)
       };
     },
     ids() {
       let ids = [];
-      this.selectionList.forEach((ele) => {
+      this.selectionList.forEach(ele => {
         ids.push(ele.id);
       });
       return ids.join(",");
-    },
+    }
   },
-  mounted() {},
+  mounted() {
+    this.$store.commit("setWindowSizeHeightAdd");
+  },
   methods: {
     rowSave(row, done, loading) {
       row.category = 1;
@@ -126,11 +132,11 @@
           this.onLoad(this.page);
           this.$message({
             type: "success",
-            message: "操作成功!",
+            message: "操作成功!"
           });
           done();
         },
-        (error) => {
+        error => {
           window.console.log(error);
           loading();
         }
@@ -142,11 +148,11 @@
           this.onLoad(this.page);
           this.$message({
             type: "success",
-            message: "操作成功!",
+            message: "操作成功!"
           });
           done();
         },
-        (error) => {
+        error => {
           window.console.log(error);
           loading();
         }
@@ -156,7 +162,7 @@
       this.$confirm("确定将选择数据删除?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       })
         .then(() => {
           return remove(row.id);
@@ -165,7 +171,7 @@
           this.onLoad(this.page);
           this.$message({
             type: "success",
-            message: "操作成功!",
+            message: "操作成功!"
           });
         });
     },
@@ -194,7 +200,7 @@
       this.$confirm("确定将选择数据删除?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       })
         .then(() => {
           return remove(this.ids);
@@ -203,14 +209,14 @@
           this.onLoad(this.page);
           this.$message({
             type: "success",
-            message: "操作成功!",
+            message: "操作成功!"
           });
           this.$refs.crud.toggleSelection();
         });
     },
     beforeOpen(done, type) {
       if (["edit", "view"].includes(type)) {
-        getDetail(this.form.id).then((res) => {
+        getDetail(this.form.id).then(res => {
           this.form = res.data.data;
         });
       }
@@ -235,7 +241,7 @@
       ).content.user_id;
 
       var that = this;
-      getDept(this.deptId).then((res) => {
+      getDept(this.deptId).then(res => {
         var deptCategory = res.data.data.deptCategory;
         deptCategory == 1
           ? (that.deptCategory = true)
@@ -247,7 +253,7 @@
         params["userId"] = this.userId;
         // }
         let values = {
-          ...params,
+          ...params
         };
         // if (releaseTimeRange) {
         //   values = {
@@ -259,20 +265,18 @@
         //   values.releaseTimeRange = null;
         // }
         this.loading = true;
-        getListPageReply(page.currentPage, page.pageSize, values).then(
-          (res) => {
-            const data = res.data.data;
-            this.page.total = data.total;
-            this.data = data.records;
-            this.loading = false;
-            this.selectionClear();
-          }
-        );
+        getListPageReply(page.currentPage, page.pageSize, values).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.$store.commit("setWindowSizeHeightAdd");
+          this.selectionClear();
+        });
       });
-    },
-  },
+    }
+  }
 };
 </script>
 
-<style>
-</style>
+<style></style>

--
Gitblit v1.9.3