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/resource/attach.vue |   85 ++++++++++++++++++++++--------------------
 1 files changed, 44 insertions(+), 41 deletions(-)

diff --git a/src/views/resource/attach.vue b/src/views/resource/attach.vue
index de23d2f..8b8daf5 100644
--- a/src/views/resource/attach.vue
+++ b/src/views/resource/attach.vue
@@ -2,10 +2,12 @@
   <basic-container
     :class="[
       'hasButTwo',
-      $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+      $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize',
+      $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : ''
     ]"
   >
     <avue-crud
+      class="tablesss"
       :option="option"
       :table-loading="loading"
       :data="data"
@@ -108,7 +110,7 @@
         pageSize: 10,
         currentPage: 1,
         total: 0,
-        ...this.$store.state.control.changePageSize,
+        ...this.$store.state.control.changePageSize
       },
       attachBox: false,
       selectionList: [],
@@ -133,9 +135,9 @@
               {
                 required: true,
                 message: "请输入附件地址",
-                trigger: "blur",
-              },
-            ],
+                trigger: "blur"
+              }
+            ]
           },
           {
             label: "附件域名",
@@ -145,9 +147,9 @@
               {
                 required: true,
                 message: "请输入附件域名",
-                trigger: "blur",
-              },
-            ],
+                trigger: "blur"
+              }
+            ]
           },
           {
             label: "附件名称",
@@ -157,9 +159,9 @@
               {
                 required: true,
                 message: "请输入附件名称",
-                trigger: "blur",
-              },
-            ],
+                trigger: "blur"
+              }
+            ]
           },
           {
             label: "附件原名",
@@ -169,9 +171,9 @@
               {
                 required: true,
                 message: "请输入附件原名",
-                trigger: "blur",
-              },
-            ],
+                trigger: "blur"
+              }
+            ]
           },
           {
             label: "附件拓展名",
@@ -180,9 +182,9 @@
               {
                 required: true,
                 message: "请输入附件拓展名",
-                trigger: "blur",
-              },
-            ],
+                trigger: "blur"
+              }
+            ]
           },
           {
             label: "附件大小",
@@ -192,11 +194,11 @@
               {
                 required: true,
                 message: "请输入附件大小",
-                trigger: "blur",
-              },
-            ],
-          },
-        ],
+                trigger: "blur"
+              }
+            ]
+          }
+        ]
       },
       data: [],
       attachForm: {},
@@ -212,18 +214,18 @@
             loadText: "模板上传中,请稍等",
             span: 24,
             propsHttp: {
-              res: "data",
+              res: "data"
             },
             action:
               "/api/blade-resource/oss/endpoint/put-file-attach?type=" +
               type +
               "&deptid=" +
-              deptid,
-          },
-        ],
+              deptid
+          }
+        ]
       },
       imgSee: false,
-      imgUrl: "",
+      imgUrl: ""
     };
   },
   computed: {
@@ -233,18 +235,19 @@
         addBtn: false,
         editBtn: false,
         viewBtn: false,
-        delBtn: this.vaildData(this.permission.attach_delete, false),
+        delBtn: this.vaildData(this.permission.attach_delete, false)
       };
     },
     ids() {
       let ids = [];
-      this.selectionList.forEach((ele) => {
+      this.selectionList.forEach(ele => {
         ids.push(ele.id);
       });
       return ids.join(",");
-    },
+    }
   },
   mounted() {
+    this.$store.commit("setWindowSizeHeightAdd");
     var flag = false,
       i = 0,
       ind = null;
@@ -278,7 +281,7 @@
       this.$confirm("确定将选择数据删除?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       })
         .then(() => {
           return remove(row.id);
@@ -287,7 +290,7 @@
           this.onLoad(this.page);
           this.$message({
             type: "success",
-            message: "操作成功!",
+            message: "操作成功!"
           });
         });
     },
@@ -299,7 +302,7 @@
       this.$confirm("确定将选择数据删除?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       })
         .then(() => {
           return remove(this.ids);
@@ -308,14 +311,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;
         });
       }
@@ -355,11 +358,12 @@
         page.currentPage,
         page.pageSize,
         Object.assign(params, this.query)
-      ).then((res) => {
+      ).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();
       });
     },
@@ -385,13 +389,12 @@
           "webp",
           "psd",
           "svg",
-          "tiff",
+          "tiff"
         ].indexOf(ext.toLowerCase()) == -1
       );
-    },
-  },
+    }
+  }
 };
 </script>
 
-<style>
-</style>
+<style></style>

--
Gitblit v1.9.3