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/securityUnitChild/shareholder.vue |  102 +++++++++++++++++++++++++--------------------------
 1 files changed, 50 insertions(+), 52 deletions(-)

diff --git a/src/views/securityUnitChild/shareholder.vue b/src/views/securityUnitChild/shareholder.vue
index c86f816..d9f321d 100644
--- a/src/views/securityUnitChild/shareholder.vue
+++ b/src/views/securityUnitChild/shareholder.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"
       v-if="visible"
       :option="option"
       :table-loading="loading"
@@ -70,7 +74,7 @@
   getDetail1,
   adddata1,
   update1,
-  remove1,
+  remove1
 } from "@/api/securityUnit/securityUnit";
 import { mapGetters } from "vuex";
 import { getToken } from "@/util/auth";
@@ -103,7 +107,7 @@
         pageSize: 10,
         currentPage: 1,
         total: 0,
-        ...this.$store.state.control.changePageSize,
+        ...this.$store.state.control.changePageSize
       },
       selectionList: [],
       option: {
@@ -122,7 +126,7 @@
             prop: "shareholder",
             searchLabelWidth: 55,
             search: true,
-            labelWidth:130,
+            labelWidth: 130
           },
           {
             label: "持股比例(%)",
@@ -131,10 +135,10 @@
               {
                 required: true,
                 validator: validatePassNumber,
-                trigger: "blur",
-              },
+                trigger: "blur"
+              }
             ],
-            labelWidth:130,
+            labelWidth: 130
           },
           {
             label: "出资金额(万元)",
@@ -143,10 +147,10 @@
               {
                 required: true,
                 validator: validatePassNumber,
-                trigger: "blur",
-              },
+                trigger: "blur"
+              }
             ],
-            labelWidth:130,
+            labelWidth: 130
           },
           {
             label: "出资时间",
@@ -154,18 +158,18 @@
             type: "date",
             format: "yyyy-MM-dd",
             valueFormat: "yyyy-MM-dd",
-            labelWidth:130,
+            labelWidth: 130
           },
           {
             label: "身份证",
             prop: "cardid",
             search: true,
-            labelWidth:130,
+            labelWidth: 130
           },
           {
             label: "联系电话",
             prop: "cell",
-            labelWidth:130,
+            labelWidth: 130
           },
           {
             label: "统一社会信用代码",
@@ -173,9 +177,9 @@
             hide: true,
             addDisplay: false,
             editDisplay: false,
-            labelWidth:130,
-          },
-        ],
+            labelWidth: 130
+          }
+        ]
       },
       data: [],
       excelForm: {},
@@ -191,31 +195,20 @@
             loadText: "模板上传中,请稍等",
             span: 24,
             propsHttp: {
-              res: "data",
+              res: "data"
             },
             tip: "请上传 .xls,.xlsx 标准格式文件",
-            action: "/api/shareholder/import-share",
+            action: "/api/shareholder/import-share"
           },
           {
             label: "模板下载",
             prop: "excelTemplate",
             formslot: true,
-            span: 24,
-          },
-        ],
-      },
+            span: 24
+          }
+        ]
+      }
     };
-  },
-  watch: {
-    windowHeight() {
-      console.log(this.windowHeight);
-      this.option.height = this.windowHeight - 320;
-      this.visible = false;
-      this.$nextTick(() => {
-        this.visible = true;
-        this.refreshChange();
-      });
-    },
   },
   created() {
     this.option.height = this.windowHeight - 320;
@@ -232,42 +225,45 @@
     // },
     ids() {
       let ids = [];
-      this.selectionList.forEach((ele) => {
+      this.selectionList.forEach(ele => {
         ids.push(ele.id);
       });
       return ids.join(",");
-    },
+    }
+  },
+  mounted() {
+    this.$store.commit("setWindowSizeHeightAdd");
   },
   methods: {
     rowSave(row, done, loading) {
-      row['deptId'] = this.deptid;
+      row["deptId"] = this.deptid;
       adddata1(row).then(
         () => {
           this.onLoad(this.page);
           this.$message({
             type: "success",
-            message: "操作成功!",
+            message: "操作成功!"
           });
           done();
         },
-        (error) => {
+        error => {
           loading();
           window.console.log(error);
         }
       );
     },
     rowUpdate(row, index, done, loading) {
-      row['deptId'] = this.deptid;
+      row["deptId"] = this.deptid;
       update1(row).then(
         () => {
           this.onLoad(this.page);
           this.$message({
             type: "success",
-            message: "操作成功!",
+            message: "操作成功!"
           });
           done();
         },
-        (error) => {
+        error => {
           loading();
           console.log(error);
         }
@@ -277,7 +273,7 @@
       this.$confirm("确定将选择数据删除?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       })
         .then(() => {
           return remove1(row.id);
@@ -286,13 +282,15 @@
           this.onLoad(this.page);
           this.$message({
             type: "success",
-            message: "操作成功!",
+            message: "操作成功!"
           });
         });
     },
     handleTemplate() {
       window.open(
-        `/api/shareholder/export-template?${this.website.tokenHeader}=${getToken()}`
+        `/api/shareholder/export-template?${
+          this.website.tokenHeader
+        }=${getToken()}`
       );
     },
     uploadAfter(res, done, loading, column) {
@@ -312,7 +310,7 @@
       this.$confirm("确定将选择数据删除?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       })
         .then(() => {
           return remove1(this.ids);
@@ -321,14 +319,14 @@
           this.onLoad(this.page);
           this.$message({
             type: "success",
-            message: "操作成功!",
+            message: "操作成功!"
           });
           this.$refs.crud.toggleSelection();
         });
     },
     beforeOpen(done, type) {
       if (["edit", "view"].includes(type)) {
-        getDetail1(this.form.id).then((res) => {
+        getDetail1(this.form.id).then(res => {
           this.form = res.data.data;
         });
       }
@@ -367,17 +365,17 @@
         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();
       });
-    },
-  },
+    }
+  }
 };
 </script>
 
-<style>
-</style>
+<style></style>

--
Gitblit v1.9.3