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/securityAnalysis/child/loginRecord.vue |  108 +++++++++++++++++++++++++++++-------------------------
 1 files changed, 58 insertions(+), 50 deletions(-)

diff --git a/src/views/securityAnalysis/child/loginRecord.vue b/src/views/securityAnalysis/child/loginRecord.vue
index c573352..3ae3092 100644
--- a/src/views/securityAnalysis/child/loginRecord.vue
+++ b/src/views/securityAnalysis/child/loginRecord.vue
@@ -2,29 +2,31 @@
   <div
     :class="[
       'certificateTJ',
-      $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"
       :data="data"
       :page.sync="page"
       :search.sync="search"
       :table-loading="loading"
-      @on-load="onLoad(page)"
+      @on-load="onLoad"
       @search-change="searchChange"
       @search-reset="searchReset"
       @refresh-change="refreshChange"
     >
       <template slot="menuLeft">
-      <el-button
-              type="warning"
-              size="small"
-              plain
-              icon="el-icon-download"
-              @click="handleExportLoginRecord"
-              >导出
-            </el-button>
+        <el-button
+          type="warning"
+          size="small"
+          plain
+          icon="el-icon-download"
+          @click="handleExportLoginRecord"
+          >导出
+        </el-button>
       </template>
     </avue-crud>
   </div>
@@ -46,7 +48,7 @@
         pageSize: 10,
         currentPage: 1,
         total: 0,
-        ...this.$store.state.control.changePageSize,
+        ...this.$store.state.control.changePageSize
       },
       query: {},
       search: {},
@@ -78,9 +80,9 @@
               {
                 required: true,
                 message: "请输入登录时间",
-                trigger: "blur",
-              },
-            ],
+                trigger: "blur"
+              }
+            ]
           },
           {
             label: "企业名称",
@@ -88,12 +90,12 @@
             disabled: true,
             overHidden: true,
             searchSpan: 5,
-            search: true,
+            search: true
           },
           {
             label: "所属辖区",
             prop: "jurisdictionName",
-            display: false,
+            display: false
           },
           {
             label: "企业属性",
@@ -103,68 +105,72 @@
             dicUrl: "/api/blade-system/dict-biz/dictionary?code=stats",
             props: {
               label: "dictValue",
-              value: "dictKey",
+              value: "dictKey"
             },
             type: "select",
             rules: [
               {
                 required: true,
                 message: "请选择企业属性",
-                trigger: "blur",
-              },
-            ],
+                trigger: "blur"
+              }
+            ]
           },
           {
             label: "最近一次登录时间",
             prop: "createTime",
             minWidth: 100,
-            display: false,
+            display: false
           },
           {
             label: "登录次数",
             prop: "num",
-            disabled: false,
+            disabled: false
           },
           {
             label: "是否有登录",
             prop: "types",
             search: true,
             disabled: false,
-            searchLabelWidth:110,
+            searchLabelWidth: 110,
             type: "select",
             searchSpan: 5,
-            hide:true,
+            hide: true,
             dicData: [
               {
                 label: "全部",
-                value: 3,
+                value: 3
               },
               {
                 label: "是",
-                value: 2,
+                value: 2
               },
               {
                 label: "否",
-                value: 1,
-              },
-            ],
-          },
-        ],
-      },
+                value: 1
+              }
+            ]
+          }
+        ]
+      }
     };
   },
-  computed:{
-    ...mapGetters(["userInfo", "permission"]),
+  computed: {
+    ...mapGetters(["userInfo", "permission"])
+  },
+  mounted() {
+    this.$store.commit("setWindowSizeHeightAdd");
   },
   methods: {
     onLoad(page, params = {}) {
+      this.loading = true;
       params = this.search;
-      params['jurisdiction'] = this.userInfo.jurisdiction;
+      params["jurisdiction"] = this.userInfo.jurisdiction;
 
       const { releaseTimeRange } = this.query;
 
       let values = {
-        ...params,
+        ...params
       };
       if (releaseTimeRange) {
         values = {
@@ -172,17 +178,20 @@
           ...params,
           startTime: releaseTimeRange[0],
           endTime: releaseTimeRange[1],
-          ...this.query,
+          ...this.query
         };
         values.releaseTimeRange = null;
       }
 
-      getInformationLoginPage(page.currentPage, page.pageSize, values).then((res) => {
-        const data = res.data.data;
-        this.data = data.records;
-        this.page.total = data.total;
-        this.loading = false;
-      });
+      getInformationLoginPage(page.currentPage, page.pageSize, values).then(
+        res => {
+          const data = res.data.data;
+          this.data = data.records;
+          this.page.total = data.total;
+          this.$store.commit("setWindowSizeHeightAdd");
+          this.loading = false;
+        }
+      );
     },
     refreshChange() {
       this.onLoad(this.page, this.query);
@@ -203,7 +212,7 @@
       this.$confirm("是否导出企业登录记录数据?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       }).then(() => {
         //获取查询条件
         const { releaseTimeRange } = this.search;
@@ -212,12 +221,12 @@
           this.search["endTime"] = releaseTimeRange[1];
         }
         var data = {
-          jurisdiction:this.userInfo.jurisdiction,
+          jurisdiction: this.userInfo.jurisdiction,
           stats: this.search.stats,
           deptName: this.search.deptName,
           types: this.search.types,
           startTime: this.search.startTime,
-          endTime: this.search.endTime,
+          endTime: this.search.endTime
         };
         // console.log(data,123);
         //序列号url形式,用&拼接
@@ -228,10 +237,9 @@
           }=${getToken()}&` + data
         );
       });
-    },
-  },
+    }
+  }
 };
 </script>
 
-<style scoped>
-</style>
\ No newline at end of file
+<style scoped></style>

--
Gitblit v1.9.3