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/companyApply/index.vue |  393 +++++++++++++++++++++++++++-----------------------------
 1 files changed, 190 insertions(+), 203 deletions(-)

diff --git a/src/views/companyApply/index.vue b/src/views/companyApply/index.vue
index 6c0cf6b..7235e73 100644
--- a/src/views/companyApply/index.vue
+++ b/src/views/companyApply/index.vue
@@ -1,130 +1,114 @@
-/*
- * @Author: Morpheus
- * @Date: 2021-07-05 16:31:54
- * @Last Modified by: liu
- * @Last Modified time: 2021-11-23 14:16:07
- * menu-name 报名考试
- */
+/* * @Author: Morpheus * @Date: 2021-07-05 16:31:54 * @Last Modified by: liu *
+@Last Modified time: 2021-11-23 14:16:07 * menu-name 报名考试 */
 <template>
-  <el-row class="morpheus-box-apply-exam">
-    <el-col
-      :span="24"
-      :class="[
-        'hasButOne',
-        $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
-      ]"
+  <basic-container
+    :class="[
+      'exam-card-body',
+      $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize',
+      $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : ''
+    ]"
+  >
+    <avue-crud
+      v-model="obj"
+      class="company-box tablesss"
+      :option="questionBankOption"
+      :search.sync="questionBankSearch"
+      :table-loading="questionBankLoading"
+      :data="questionBankData"
+      :permission="permissionList"
+      ref="questionBankCrud"
+      :page.sync="questionBankPage"
+      @on-load="questionBankOnLoad"
+      @selection-change="questionBankSelectionChange"
+      @search-change="questionBankSearchChange"
+      @search-reset="questionBankSearchReset"
+      @current-change="questionBankCurrentChange"
+      @size-change="questionBankSizeChange"
+      @row-save="questionBankRowSave"
+      @row-del="questionBankRowDel"
     >
-      <el-card>
-        <div
-          :class="[
-            'exam-card-body',
-            $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
-          ]"
-        >
-          <avue-crud
-            v-model="obj"
-            class="company-box"
-            :option="questionBankOption"
-            :search.sync="questionBankSearch"
-            :table-loading="questionBankLoading"
-            :data="questionBankData"
-            :permission="permissionList"
-            ref="questionBankCrud"
-            :page.sync="questionBankPage"
-            @on-load="questionBankOnLoad"
-            @selection-change="questionBankSelectionChange"
-            @search-change="questionBankSearchChange"
-            @search-reset="questionBankSearchReset"
-            @current-change="questionBankCurrentChange"
-            @size-change="questionBankSizeChange"
-            @row-save="questionBankRowSave"
-            @row-del="questionBankRowDel"
-          >
-            <!-- 自定义按钮 -->
-            <template slot="menuLeft">
-              <el-button
-                type="primary"
-                size="small"
-                plain
-                v-if="permission.company_batch_add"
-                icon="el-icon-folder-checked"
-                @click="handleBatchApply"
-                >批量报名
-              </el-button>
-            </template>
+      <!-- 自定义按钮 -->
+      <template slot="menuLeft">
+        <el-button
+          type="primary"
+          size="small"
+          plain
+          v-if="permission.company_batch_add"
+          icon="el-icon-folder-checked"
+          @click="handleBatchApply"
+          >批量报名
+        </el-button>
+      </template>
 
-            <template slot-scope="{ type, row }" slot="menu">
-              <el-button
-                :type="type"
-                size="small"
-                icon="el-icon-refresh-left"
-                v-if="row.isApply == 1 && permission.company_cancel"
-                @click="handleCancel(row)"
-                >取消报名
-              </el-button>
-              <el-button
-                :type="type"
-                size="small"
-                icon="el-icon-folder-checked"
-                v-if="row.isApply != 1 && permission.company_add"
-                :disabled="row.examinationType == '1'"
-                @click="questionBankRowSave(row)"
-                >报名
-              </el-button>
-              <el-button
-                :type="type"
-                style="display: none"
-                size="small"
-                icon="el-icon-receiving"
-                :disabled="row.isApply == 2"
-                @click="handlePrint(row)"
-                >准考证打印
-              </el-button>
-            </template>
-          </avue-crud>
+      <template slot-scope="{ type, row }" slot="menu">
+        <el-button
+          :type="type"
+          size="small"
+          icon="el-icon-refresh-left"
+          v-if="row.isApply == 1 && permission.company_cancel"
+          @click="handleCancel(row)"
+          >取消报名
+        </el-button>
+        <el-button
+          :type="type"
+          size="small"
+          icon="el-icon-folder-checked"
+          v-if="row.isApply != 1 && permission.company_add"
+          :disabled="row.examinationType == '1'"
+          @click="questionBankRowSave(row)"
+          >报名
+        </el-button>
+        <el-button
+          :type="type"
+          style="display: none"
+          size="small"
+          icon="el-icon-receiving"
+          :disabled="row.isApply == 2"
+          @click="handlePrint(row)"
+          >准考证打印
+        </el-button>
+      </template>
+    </avue-crud>
 
-          <el-dialog
-            title="考试资格审核"
-            :visible.sync="dialogFormVisible"
-            modal-append-to-body="false"
-            append-to-body="true"
-            :close-on-click-model="true"
-          >
-            <avue-form
-              ref="formAudit"
-              v-model="Audit"
-              :option="optionAudit"
-              @reset-change="emptytChange"
-              @submit="submit"
-            ></avue-form>
-          </el-dialog>
+    <el-dialog
+      title="考试资格审核"
+      :visible.sync="dialogFormVisible"
+      modal-append-to-body="false"
+      append-to-body="true"
+      :close-on-click-model="true"
+    >
+      <avue-form
+        ref="formAudit"
+        v-model="Audit"
+        :option="optionAudit"
+        @reset-change="emptytChange"
+        @submit="submit"
+      ></avue-form>
+    </el-dialog>
 
-          <el-dialog
-            title="报名"
-            append-to-body
-            :visible.sync="dialogBatchFormVisible"
-            width="1000px"
-            @close="closeDialog"
-          >
-            <avue-form
-              ref="formBatchApply"
-              v-model="BatchApply"
-              :option="optionBatchApply"
-              @reset-change="emptytChange"
-              @submit="submitBatchApply"
-            ></avue-form>
-          </el-dialog>
-        </div>
-      </el-card>
-    </el-col>
-  </el-row>
+    <el-dialog
+      title="报名"
+      append-to-body
+      :visible.sync="dialogBatchFormVisible"
+      width="1000px"
+      @close="closeDialog"
+    >
+      <avue-form
+        ref="formBatchApply"
+        v-model="BatchApply"
+        :option="optionBatchApply"
+        @reset-change="emptytChange"
+        @submit="submitBatchApply"
+      ></avue-form>
+    </el-dialog>
+  </basic-container>
 </template>
 
 <script>
 import {
   addApply,
   cancelApplyNotApplyId,
-  remove,
+  remove
 } from "@/api/examapi/applyexam";
 import { getListApply, addBatchApply } from "@/api/securityGuard/securityGuard";
 import { mapState } from "vuex";
@@ -133,17 +117,17 @@
   applyStatus: [
     {
       label: "已报名",
-      value: 1,
+      value: 1
     },
     {
       label: "已取消",
-      value: 2,
+      value: 2
     },
     {
       label: "考试结束",
-      value: 3,
-    },
-  ],
+      value: 3
+    }
+  ]
 };
 
 export default {
@@ -170,6 +154,7 @@
         menuWidth: 230,
         dialogClickModal: false,
         ...this.$store.state.control.clearOtherBut,
+        ...this.$store.state.control.searchOpen,
         column: [
           {
             label: "审核状态",
@@ -185,27 +170,27 @@
               {
                 required: true,
                 message: "请选择审核类型",
-                trigger: "blur",
-              },
+                trigger: "blur"
+              }
             ],
             dicData: [
               {
                 label: "审核通过",
-                value: 2,
+                value: 2
               },
               {
                 label: "不通过",
-                value: 3,
-              },
-            ],
+                value: 3
+              }
+            ]
           },
           {
             label: "审核明细",
             span: 24,
             type: "textarea",
-            prop: "auditDetail",
-          },
-        ],
+            prop: "auditDetail"
+          }
+        ]
       },
       optionBatchApply: {
         height: "auto",
@@ -233,7 +218,7 @@
             // dicUrl: "/api/blade-user/page-security-unit?deptId="+this.deptId,
             props: {
               label: "name",
-              value: "id",
+              value: "id"
             },
             //不包含父节点值
             leafOnly: true,
@@ -243,12 +228,12 @@
               {
                 required: true,
                 message: "请输入姓名",
-                trigger: "blur",
-              },
+                trigger: "blur"
+              }
             ],
-            span: 24,
-          },
-        ],
+            span: 24
+          }
+        ]
       },
       questionBankOption: {
         // 操作栏多余按钮去除
@@ -285,7 +270,7 @@
             search: true,
             searchSpan: 4,
             searchLabelWidth: 50,
-            display: false,
+            display: false
           },
           {
             label: "性别",
@@ -294,38 +279,38 @@
             dicData: [
               {
                 label: "男",
-                value: 1,
+                value: 1
               },
               {
                 label: "女",
-                value: 2,
+                value: 2
               },
               {
                 label: "未知",
-                value: 3,
+                value: 3
               },
               {
                 label: " ",
-                value: -1,
-              },
+                value: -1
+              }
             ],
-            display: false,
+            display: false
           },
 
           {
             label: "籍贯",
             prop: "nativeplace",
-            display: false,
+            display: false
           },
           {
             label: "联系电话",
             prop: "phone",
-            display: false,
+            display: false
           },
           {
             label: "入职时间",
             prop: "rtime",
-            display: false,
+            display: false
           },
           {
             label: "保安公司名称",
@@ -337,13 +322,13 @@
               "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
             props: {
               label: "title",
-              value: "id",
+              value: "id"
             },
             slot: true,
             searchSpan: 4,
             display: false,
             search: false,
-            width: 260,
+            width: 260
           },
           {
             label: "是否持证",
@@ -353,16 +338,16 @@
             dicUrl: "/api/blade-system/dict-biz/dictionary?code=equipage",
             props: {
               label: "dictValue",
-              value: "dictKey",
+              value: "dictKey"
             },
             type: "select",
             rules: [
               {
                 required: true,
                 message: "请选择",
-                trigger: "blur",
-              },
-            ],
+                trigger: "blur"
+              }
+            ]
           },
           {
             label: "在职状态",
@@ -371,7 +356,7 @@
             dicUrl: "/api/blade-system/dict-biz/dictionary?code=workerState",
             props: {
               label: "dictValue",
-              value: "dictKey",
+              value: "dictKey"
             },
             dataType: "number",
             display: false,
@@ -381,9 +366,9 @@
               {
                 required: true,
                 message: "请选择在职状态",
-                trigger: "blur",
-              },
-            ],
+                trigger: "blur"
+              }
+            ]
           },
           {
             label: "是否报名",
@@ -392,20 +377,20 @@
             dicData: [
               {
                 label: "是",
-                value: 1,
+                value: 1
               },
               {
                 label: "已取消",
-                value: 2,
+                value: 2
               },
               {
                 label: "考试结束",
-                value: 3,
+                value: 3
               },
               {
                 label: "否",
-                value: 4,
-              },
+                value: 4
+              }
             ],
             dataType: "number",
             display: false,
@@ -415,11 +400,11 @@
               {
                 required: true,
                 message: "请选择在职状态",
-                trigger: "blur",
-              },
-            ],
-          },
-        ],
+                trigger: "blur"
+              }
+            ]
+          }
+        ]
       },
       questionBankSearch: {},
       questionBankLoading: true,
@@ -428,10 +413,10 @@
         pageSize: 10,
         currentPage: 1,
         total: 16,
-        ...this.$store.state.control.changePageSize,
+        ...this.$store.state.control.changePageSize
       },
       questionBankQuery: {},
-      questionBankSelectionList: [],
+      questionBankSelectionList: []
     };
   },
   created() {
@@ -449,10 +434,12 @@
     this.optionBatchApply.column[0].dicUrl =
       "/api/blade-user/security-apply-tree?deptId=" + this.userInfo.dept_id;
   },
-  mounted() {},
+  mounted() {
+    this.$store.commit("setWindowSizeHeightAdd");
+  },
   computed: {
     ...mapState({
-      userInfo: (state) => state.user.userInfo,
+      userInfo: state => state.user.userInfo
     }),
     ...mapGetters(["userInfo", "permission"]),
     permissionList() {
@@ -460,16 +447,16 @@
         addBtn: this.vaildData(null, false),
         viewBtn: this.vaildData(null, false),
         delBtn: this.vaildData(null, false),
-        editBtn: this.vaildData(null, false),
+        editBtn: this.vaildData(null, false)
       };
     },
     ids() {
       let ids = [];
-      this.questionBankSelectionList.forEach((ele) => {
+      this.questionBankSelectionList.forEach(ele => {
         ids.push(ele.id);
       });
       return ids.join(",");
-    },
+    }
   },
   methods: {
     //准考证查看
@@ -478,7 +465,7 @@
       obj["name"] = "准考证信息";
       this.$router.push({
         path: `/applyexam/papers`,
-        query: obj,
+        query: obj
       });
     },
     questionBankOnLoad(page, params = {}) {
@@ -489,11 +476,12 @@
         page.currentPage,
         page.pageSize,
         Object.assign(params, this.questionBankQuery)
-      ).then((res) => {
+      ).then(res => {
         const data = res.data.data;
         this.questionBankPage.total = data.total;
         this.questionBankData = data.records;
         this.questionBankLoading = false;
+        this.$store.commit("setWindowSizeHeightAdd");
         this.questionBankSelectionClear();
       });
     },
@@ -525,29 +513,29 @@
     questionBankRowSave(row, done, loading) {
       // debugger;
       addApply({
-        userId: row.id,
+        userId: row.id
       }).then(
-        (res) => {
+        res => {
           this.questionBankOnLoad(this.questionBankPage);
           if (res.data.data == 201) {
             this.$message({
               type: "warning",
-              message: "已报名,不能重复报名",
+              message: "已报名,不能重复报名"
             });
           } else if (res.data.data == 201) {
             this.$message({
               type: "warning",
-              message: "报名失败",
+              message: "报名失败"
             });
           } else {
             this.$message({
               type: "success",
-              message: "报名成功",
+              message: "报名成功"
             });
           }
           done();
         },
-        (error) => {
+        error => {
           window.console.log(error);
           loading();
         }
@@ -558,7 +546,7 @@
       this.$confirm("确定将选择数据删除?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       })
         .then(() => {
           return remove(row.id);
@@ -567,7 +555,7 @@
           this.questionBankOnLoad(this.questionBankPage);
           this.$message({
             type: "success",
-            message: "操作成功!",
+            message: "操作成功!"
           });
         });
     },
@@ -577,7 +565,7 @@
       this.$confirm("确定取消报名?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       })
         .then(() => {
           row.applyStatus = 4;
@@ -588,7 +576,7 @@
           this.questionBankOnLoad(this.questionBankPage);
           this.$message({
             type: "success",
-            message: "操作成功!",
+            message: "操作成功!"
           });
         });
     },
@@ -600,32 +588,32 @@
         this.$confirm("确定全部人员报名?", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
-          type: "warning",
+          type: "warning"
         }).then(() => {
           var userIds = "";
           addBatchApply(userIds, this.userInfo.dept_id).then(
-            (res) => {
+            res => {
               this.questionBankOnLoad(this.questionBankPage);
               if (res.data.data == 201) {
                 this.$message({
                   type: "warning",
-                  message: "已报名,不能重复报名",
+                  message: "已报名,不能重复报名"
                 });
               } else if (res.data.data == 201) {
                 this.$message({
                   type: "warning",
-                  message: "报名失败",
+                  message: "报名失败"
                 });
               } else {
                 this.$message({
                   type: "success",
-                  message: "报名成功",
+                  message: "报名成功"
                 });
                 this.$refs.formBatchApply.resetFields();
                 this.dialogBatchFormVisible = false;
               }
             },
-            (error) => {
+            error => {
               window.console.log(error);
             }
           );
@@ -634,31 +622,31 @@
         this.$confirm("确定选择人员报名?", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
-          type: "warning",
+          type: "warning"
         }).then(() => {
           addBatchApply(this.ids, this.userInfo.dept_id).then(
-            (res) => {
+            res => {
               this.questionBankOnLoad(this.questionBankPage);
               if (res.data.data == 201) {
                 this.$message({
                   type: "warning",
-                  message: "已报名,不能重复报名",
+                  message: "已报名,不能重复报名"
                 });
               } else if (res.data.data == 201) {
                 this.$message({
                   type: "warning",
-                  message: "报名失败",
+                  message: "报名失败"
                 });
               } else {
                 this.$message({
                   type: "success",
-                  message: "报名成功",
+                  message: "报名成功"
                 });
                 this.$refs.formBatchApply.resetFields();
                 this.dialogBatchFormVisible = false;
               }
             },
-            (error) => {
+            error => {
               window.console.log(error);
             }
           );
@@ -711,7 +699,7 @@
       this.$confirm("确定将选择数据删除?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       })
         .then(() => {
           return remove(this.ids);
@@ -720,7 +708,7 @@
           this.questionBankOnLoad(this.questionBankPage);
           this.$message({
             type: "success",
-            message: "操作成功!",
+            message: "操作成功!"
           });
           this.$refs.questionBankCrud.toggleSelection();
         });
@@ -728,10 +716,9 @@
     handleAudit(row) {
       this.dialogFormVisible = true;
       this.Audit = row;
-    },
-  },
+    }
+  }
 };
 </script>
 
-<style lang="scss" scoped>
-</style>
+<style lang="scss" scoped></style>

--
Gitblit v1.9.3