From 7434e5ccf889189d24e7f4e655fbf752a0883d5b Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Thu, 16 Dec 2021 19:23:58 +0800
Subject: [PATCH] 保安员查询修改

---
 src/views/securityUnitChild/index.vue |   73 +++++++++++++++++++++++++++---------
 1 files changed, 55 insertions(+), 18 deletions(-)

diff --git a/src/views/securityUnitChild/index.vue b/src/views/securityUnitChild/index.vue
index 7d3a1b6..cac55eb 100644
--- a/src/views/securityUnitChild/index.vue
+++ b/src/views/securityUnitChild/index.vue
@@ -142,9 +142,16 @@
         <!-- </span> -->
       </el-tab-pane>
       <!-- <span v-else-if="typeTABS.prop === 'tab2'" class="tab"> -->
-      <el-tab-pane label="保安单位出资人员" name="tab2">
+      <el-tab-pane
+        label="保安单位出资人员"
+        name="tab2"
+        :class="[
+          $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+        ]"
+      >
         <basic-container>
           <avue-crud
+            v-if="visible"
             :option="option1"
             :data="data1"
             :page.sync="page1"
@@ -182,9 +189,16 @@
         <!-- </span> -->
       </el-tab-pane>
       <!-- <span v-else-if="typeTABS.prop === 'tab3'" class="tab"> -->
-      <el-tab-pane label="主要管理人员信息" name="tab3">
+      <el-tab-pane
+        label="主要管理人员信息"
+        name="tab3"
+        :class="[
+          $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+        ]"
+      >
         <basic-container>
           <avue-crud
+            v-if="visible"
             :option="option2"
             :data="data2"
             :page.sync="page2"
@@ -224,13 +238,21 @@
       <!-- <span v-else-if="typeTABS.prop === 'tab4'" class="tab"> -->
       <el-tab-pane label="装备管理" name="tab4">
         <!-- 装备管理 -->
-        <equipments :fromDeptId="departmentid" v-if="overzb"></equipments>
+        <equipments
+          v-if="overzb"
+          :fromDeptId="departmentid"
+          :windowHeight="windowHeight"
+        ></equipments>
         <!-- </span> -->
       </el-tab-pane>
       <!-- <span v-else-if="typeTABS.prop === 'tab5'" class="tab"> -->
       <el-tab-pane label="车辆管理" name="tab5">
         <!-- 车辆管理 -->
-        <car :fromDeptId="departmentid" v-if="overcar"></car>
+        <car
+          :fromDeptId="departmentid"
+          v-if="overcar"
+          :windowHeight="windowHeight"
+        ></car>
         <!-- </span> -->
       </el-tab-pane>
       <!-- <span v-else-if="typeTABS.prop === 'tab6'" class="tab">
@@ -325,7 +347,7 @@
 import licence from "./licence.vue";
 import businessLicense from "./businessLicense.vue";
 import social from "./social.vue";
-import { mapState } from "vuex";
+import { mapGetters } from "vuex";
 import { getRoleDetail } from "@/api/system/role";
 
 export default {
@@ -361,6 +383,7 @@
       ],
     };
     return {
+      visible: false,
       overcar: false, //结决id传入、信息获取的优先级
       overzb: false, //结决id传入、信息获取的优先级
       overcar: false, //结决id传入、信息获取的优先级
@@ -405,6 +428,7 @@
       excelOption1: {
         submitBtn: false,
         emptyBtn: false,
+        ...this.$store.state.control.clearOtherBut,
         column: [
           {
             label: "文件上传",
@@ -512,6 +536,7 @@
         pageSize: 10,
         currentPage: 1,
         total: 0,
+        ...this.$store.state.control.changePageSize,
       },
       query1: {},
       data1: [],
@@ -520,10 +545,11 @@
         tip: false,
         searchSize: "mini",
         searchMenuSpan: 8,
-        height: 563,
+        height: "auto",
         menuWidth: 200,
         align: "center",
         selection: true,
+        ...this.$store.state.control.clearOtherBut,
         column: column1,
       },
 
@@ -533,6 +559,7 @@
         pageSize: 10,
         currentPage: 1,
         total: 0,
+        ...this.$store.state.control.changePageSize,
       },
       query2: {},
       data2: [],
@@ -541,19 +568,18 @@
         tip: false,
         searchSize: "mini",
         searchMenuSpan: 8,
-        height: 563,
+        height: "auto",
         menuWidth: 200,
         menuAlign: "center",
         align: "center",
         selection: true,
+        ...this.$store.state.control.clearOtherBut,
         column: column2,
       },
     };
   },
   computed: {
-    ...mapState({
-      userInfo: (state) => state.user.userInfo,
-    }),
+    ...mapGetters(["userInfo", "windowHeight"]),
     chuzitime() {
       return this.data1.capitaltime;
     },
@@ -797,7 +823,7 @@
     //
     onLoad1(page, params = {}) {
       this.loading1 = true;
-      console.log(page, params, 3435434);
+      // console.log(page, params, 3435434);
       params["deptId"] = this.departmentid;
       getdataOnce1(
         page.currentPage,
@@ -808,11 +834,11 @@
         const data = res.data.data;
         this.page1.total = data.total;
         this.data1 = data.records;
-        console.log(this.data1);
+        // console.log(this.data1);
         this.loading1 = false;
 
-        this.$refs.crudrec1.refreshTable();
-        this.$refs.crudrec1.doLayout();
+        // this.$refs.crudrec1.refreshTable();
+        // this.$refs.crudrec1.doLayout();
       });
       // onLoad1(page, params = {}) {
       //   this.loading1 = true;
@@ -958,7 +984,7 @@
         const data = res.data.data;
         this.page2.total = data.total;
         this.data2 = data.records;
-        console.log(this.data2);
+        // console.log(this.data2);
         this.loading2 = false;
         this.$refs.crudrec2.refreshTable();
         this.$refs.crudrec2.doLayout();
@@ -982,7 +1008,7 @@
         if (that.readLock("danweidata") != null) {
           row = JSON.parse(that.readLock("danweidata"));
           // that.obj0.title = row.enterprisename;
-          console.log(row, "rowneibu");
+          // console.log(row, "rowneibu");
           that.departmentid = row.departmentid;
           for (var k in row) {
             that.obj0[k] = row[k];
@@ -1095,9 +1121,20 @@
     this.onloads();
   },
   watch: {
-    // chuzitime() {
-    // console.log(this.chuzitime, "chuzitime");
+    // windowWidth() {
+    //   console.log(this.windowWidth, "windowWidth");
     // },
+    windowHeight() {
+      // console.log(this.windowHeight, "windowHeight");
+      this.option1.height = this.windowHeight - 320;
+      this.option2.height = this.windowHeight - 320;
+      this.visible = false;
+      this.$nextTick(() => {
+        this.visible = true;
+        this.refreshChange1();
+        this.refreshChange2();
+      });
+    },
   },
 };
 </script>

--
Gitblit v1.9.3