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/accreditationRecords/accreditationRecords.vue |  223 ++++++++++++++++++++++++++++---------------------------
 1 files changed, 112 insertions(+), 111 deletions(-)

diff --git a/src/views/accreditationRecords/accreditationRecords.vue b/src/views/accreditationRecords/accreditationRecords.vue
index 1ba60fc..f0180b0 100644
--- a/src/views/accreditationRecords/accreditationRecords.vue
+++ b/src/views/accreditationRecords/accreditationRecords.vue
@@ -2,10 +2,12 @@
   <basic-container
     :class="[
       'desk1',
-      $store.state.control.windowWidth >= 1024 ? 'tooRowSearch' : '',
+      $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize',
+      $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : ''
     ]"
   >
     <avue-crud
+      class="tablesss"
       :option="option"
       :table-loading="loading"
       :data="data"
@@ -157,7 +159,7 @@
   getAccreditationRecords,
   batchAccreditation,
   audit,
-  batchAudit,
+  batchAudit
 } from "@/api/accreditationRecords/accreditationRecords";
 import { getDept } from "@/api/system/dept";
 import { mapGetters } from "vuex";
@@ -167,23 +169,23 @@
 import Legend from "@/components/liu-legend/Legend";
 export default {
   components: {
-    Legend,
+    Legend
   },
   data() {
     return {
       datalistLIU: [
         {
           color: "#29C093",
-          text: "审核通过",
+          text: "审核通过"
         },
         {
           color: "#F34A4A",
-          text: "审核不通过",
+          text: "审核不通过"
         },
         {
           color: "#F48F57",
-          text: "待审核",
-        },
+          text: "待审核"
+        }
       ],
       check: false,
       form: {},
@@ -200,7 +202,7 @@
         pageSize: 10,
         currentPage: 1,
         total: 0,
-        ...this.$store.state.control.changePageSize,
+        ...this.$store.state.control.changePageSize
       },
       Audit: {},
       dialogFormVisible: false,
@@ -238,34 +240,34 @@
               {
                 required: true,
                 message: "请选择审核类型",
-                trigger: "blur",
-              },
+                trigger: "blur"
+              }
             ],
             dicData: [
               {
                 label: "待审核",
-                value: 1,
+                value: 1
               },
               {
                 label: "审核通过",
-                value: 2,
+                value: 2
               },
               {
                 label: "审核不通过",
-                value: 3,
-              },
-            ],
+                value: 3
+              }
+            ]
           },
           {
             label: "审核明细",
             span: 24,
             type: "textarea",
-            prop: "auditDetail",
-          },
-        ],
+            prop: "auditDetail"
+          }
+        ]
       },
       batchAudit: {
-        number: 0,
+        number: 0
       },
       optionBatchAudit: {
         height: "auto",
@@ -291,7 +293,7 @@
             span: 24,
             value: 0,
             disabled: true,
-            labelWidth: 110,
+            labelWidth: 110
           },
           {
             label: "审核状态",
@@ -307,31 +309,31 @@
               {
                 required: true,
                 message: "请选择审核类型",
-                trigger: "blur",
-              },
+                trigger: "blur"
+              }
             ],
             dicData: [
               {
                 label: "待审核",
-                value: 1,
+                value: 1
               },
               {
                 label: "审核通过",
-                value: 2,
+                value: 2
               },
               {
                 label: "审核不通过",
-                value: 3,
-              },
-            ],
+                value: 3
+              }
+            ]
           },
           {
             label: "审核明细",
             span: 24,
             type: "textarea",
-            prop: "auditDetail",
-          },
-        ],
+            prop: "auditDetail"
+          }
+        ]
       },
       choiceList: [],
       selectionList: [],
@@ -357,6 +359,7 @@
         menuWidth: 210,
         dialogClickModal: false,
         ...this.$store.state.control.clearOtherBut,
+        searchIndex: 5, //收缩展示数量
         column: [
           {
             label: "申请时间",
@@ -375,9 +378,9 @@
               {
                 required: true,
                 message: "请输入申请时间",
-                trigger: "blur",
-              },
-            ],
+                trigger: "blur"
+              }
+            ]
           },
           {
             label: "姓名",
@@ -385,7 +388,7 @@
             search: true,
             searchSpan: 3,
             width: 100,
-            searchLabelWidth: 50,
+            searchLabelWidth: 50
             // display: false,
           },
           // {
@@ -409,20 +412,20 @@
           // },
           {
             label: "企业名称",
-            searchLabelWidth: "110",
+            searchLabelWidth: "90",
             prop: "deptName",
             slot: true,
             searchSpan: 5,
             search: true,
             overHidden: true,
-            minWidth: 160,
+            minWidth: 160
           },
           {
             label: "性别",
             prop: "sex",
             width: 80,
             type: "select",
-            display: false,
+            display: false
           },
           {
             label: "身份证号码",
@@ -430,19 +433,19 @@
             search: true,
             searchLabelWidth: 90,
             searchSpan: 5,
-            width:140,
+            width: 140
           },
           {
             label: "年龄",
             prop: "age",
-            width:60,
+            width: 60
           },
           {
             label: "照片",
             prop: "avatar",
             type: "upload",
             listType: "picture-img",
-            width:60
+            width: 60
           },
           {
             label: "保安证编号",
@@ -450,9 +453,9 @@
             search: true,
             searchLabelWidth: 90,
             width: 110,
-            searchSpan: 5,
+            searchSpan: 4,
             addDisplay: false,
-            editDisplay: false,
+            editDisplay: false
             // hide: true,
           },
 
@@ -464,7 +467,7 @@
             minWidth: 80,
             // searchSpan: 4,
             addDisplay: false,
-            editDisplay: false,
+            editDisplay: false
             // hide: true,
           },
           {
@@ -473,9 +476,9 @@
             search: true,
             searchLabelWidth: 120,
             minWidth: 120,
-            searchSpan: 5,
+            searchSpan: 4,
             addDisplay: false,
-            editDisplay: false,
+            editDisplay: false
             // hide: true,
           },
           {
@@ -486,7 +489,7 @@
             width: 140,
             // searchSpan: 4,
             addDisplay: false,
-            editDisplay: false,
+            editDisplay: false
             // hide: true,
           },
           {
@@ -504,17 +507,17 @@
             dicData: [
               {
                 label: "全部",
-                value: 3,
+                value: 3
               },
               {
                 label: "有",
-                value: 1,
+                value: 1
               },
               {
                 label: "无",
-                value: 2,
-              },
-            ],
+                value: 2
+              }
+            ]
           },
           {
             label: "审核状态",
@@ -531,17 +534,17 @@
             dicData: [
               {
                 label: "待审核",
-                value: 1,
+                value: 1
               },
               {
                 label: "审核通过",
-                value: 2,
+                value: 2
               },
               {
                 label: "审核不通过",
-                value: 3,
-              },
-            ],
+                value: 3
+              }
+            ]
           },
           {
             label: "审核明细",
@@ -550,7 +553,7 @@
             addDisplay: false,
             editDisplay: false,
             hide: false,
-            display: false,
+            display: false
           },
           {
             label: "是否制证",
@@ -565,21 +568,21 @@
             dicData: [
               {
                 label: "全部",
-                value: 3,
+                value: 3
               },
               {
                 label: "已制证",
-                value: 2,
+                value: 2
               },
               {
                 label: "未制证",
-                value: 1,
-              },
-            ],
-          },
-        ],
+                value: 1
+              }
+            ]
+          }
+        ]
       },
-      data: [],
+      data: []
     };
   },
   computed: {
@@ -595,31 +598,31 @@
           this.permission.accreditationRecords_delete,
           false
         ),
-        editBtn: this.vaildData(null, false),
+        editBtn: this.vaildData(null, false)
       };
     },
     ids() {
       let ids = [];
-      this.selectionList.forEach((ele) => {
+      this.selectionList.forEach(ele => {
         ids.push(ele.id);
       });
       return ids.join(",");
     },
     ...mapState({
-      userInfo: (state) => state.user.userInfo,
-    }),
+      userInfo: state => state.user.userInfo
+    })
   },
   mounted() {
     this.getDeptInfo(this.userInfo.dept_id);
+    this.$store.commit("setWindowSizeHeightAdd");
   },
   created() {
     if (this.userInfo.role_name == "上岗证办理管理员") {
       this.questionBankSearch["status"] = 1;
       this.questionBankSearch["auditStatus"] = 2;
-      this.option.reserveSelection= false;
-      this.option.tip= false;
-      this.option.selection= false;
-
+      this.option.reserveSelection = false;
+      this.option.tip = false;
+      this.option.selection = false;
     }
     if (this.userInfo.role_name == "公安管理员") {
       //判断是否为市局管理员
@@ -640,10 +643,10 @@
     submit(row, done, loading) {
       const data = {
         id: row.id,
-        type:1,
+        type: 1,
         auditStatus: row.auditStatus,
         auditDetail: row.auditDetail,
-        auditUser: this.userInfo.Id,
+        auditUser: this.userInfo.Id
       };
 
       audit(data).then(
@@ -652,11 +655,11 @@
           this.onLoad(this.page);
           this.$message({
             type: "success",
-            message: "操作成功!",
+            message: "操作成功!"
           });
           done();
         },
-        (error) => {
+        error => {
           window.console.log(error);
           loading();
         }
@@ -667,7 +670,7 @@
       if (this.choiceList.length == 0) {
         this.$message({
           message: "未选择保安员",
-          type: "warning",
+          type: "warning"
         });
         return;
       }
@@ -690,7 +693,7 @@
         type: 1,
         auditStatus: row.auditStatus,
         auditDetail: row.auditDetail,
-        auditUser: this.userInfo.Id,
+        auditUser: this.userInfo.Id
       };
       //提交申请
       batchAudit(data).then(
@@ -700,13 +703,13 @@
           that.dialogBatchAudit = false;
           this.$message({
             type: "success",
-            message: "操作成功",
+            message: "操作成功"
           });
           //清除选项
           that.$refs.crud.toggleSelection();
           done();
         },
-        (error) => {
+        error => {
           window.console.log(error);
           loading();
         }
@@ -718,14 +721,11 @@
         this.$message.warning("请勾选至少一位持证保安员");
         return;
       }
-      this.$confirm(
-        "共选择人数" + this.choiceList.length + "人,确定已制证?",
-        {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        }
-      )
+      this.$confirm("共选择人数" + this.choiceList.length + "人,确定已制证?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
         .then(() => {
           let cho = this.choiceList;
           let str = "";
@@ -738,7 +738,7 @@
           const data = {
             ids: str,
             createUser: this.userInfo.user_id,
-            type: 1,
+            type: 1
           };
           return batchAccreditation(data);
         })
@@ -747,14 +747,14 @@
           this.$refs.crud.toggleSelection();
           this.$message({
             type: "success",
-            message: "操作成功!",
+            message: "操作成功!"
           });
         });
     },
     //获取当前用户部门信息
     getDeptInfo(deptId) {
       var that = this;
-      getDept(deptId).then((res) => {
+      getDept(deptId).then(res => {
         var deptCategory = res.data.data.deptCategory;
         deptCategory == 1
           ? (that.deptCategory = true)
@@ -767,8 +767,8 @@
         path: `/resource/uploadNotice`,
         query: {
           deptId: row.deptId,
-          noticeId: row.id,
-        },
+          noticeId: row.id
+        }
       });
     },
     rowSave(row, done, loading) {
@@ -784,11 +784,11 @@
           this.onLoad(this.page);
           this.$message({
             type: "success",
-            message: "操作成功!",
+            message: "操作成功!"
           });
           done();
         },
-        (error) => {
+        error => {
           window.console.log(error);
           loading();
         }
@@ -806,11 +806,11 @@
           this.onLoad(this.page);
           this.$message({
             type: "success",
-            message: "操作成功!",
+            message: "操作成功!"
           });
           done();
         },
-        (error) => {
+        error => {
           window.console.log(error);
           loading();
         }
@@ -820,7 +820,7 @@
       this.$confirm("确定将选择数据删除?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       })
         .then(() => {
           return remove(row.id);
@@ -829,7 +829,7 @@
           this.onLoad(this.page);
           this.$message({
             type: "success",
-            message: "操作成功!",
+            message: "操作成功!"
           });
         });
     },
@@ -848,7 +848,7 @@
       this.choiceList = [];
       for (let k in list) {
         this.choiceList.push({
-          id: list[k].id,
+          id: list[k].id
         });
       }
     },
@@ -864,7 +864,7 @@
       this.$confirm("确定将选择数据删除?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       })
         .then(() => {
           return remove(this.ids);
@@ -873,14 +873,14 @@
           this.onLoad(this.page, this.questionBankSearch);
           this.$message({
             type: "success",
-            message: "操作成功!",
+            message: "操作成功!"
           });
           this.$refs.crud.toggleSelection();
         });
     },
     beforeOpen(done, type) {
       if (["edit", "view"].includes(type)) {
-        getAccreditationRecords(this.form.id).then((res) => {
+        getAccreditationRecords(this.form.id).then(res => {
           this.form = res.data.data;
         });
       }
@@ -916,23 +916,24 @@
         params["jurisdiction"] = this.userInfo.jurisdiction;
       }
       let values = {
-        ...params,
+        ...params
       };
       if (releaseTimeRange) {
         values = {
           ...params,
           startTime: releaseTimeRange[0],
           endTime: releaseTimeRange[1],
-          ...this.query,
+          ...this.query
         };
         values.releaseTimeRange = null;
       }
       this.loading = true;
-      getList(page.currentPage, page.pageSize, values).then((res) => {
+      getList(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();
       });
     },
@@ -941,7 +942,7 @@
       this.$confirm("是否导出保安员证信息数据?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       }).then(() => {
         //获取查询条件
         const { releaseTimeRange } = this.questionBankSearch;
@@ -960,7 +961,7 @@
           startTime: this.questionBankSearch.startTime,
           endTime: this.questionBankSearch.endTime,
           isAvatar: this.questionBankSearch.isAvatar,
-          status: this.questionBankSearch.status,
+          status: this.questionBankSearch.status
         };
         //导出
         if (this.userInfo.role_name == "保安公司管理员") {
@@ -983,8 +984,8 @@
           }=${getToken()}&` + data
         );
       });
-    },
-  },
+    }
+  }
 };
 </script>
 

--
Gitblit v1.9.3