From cc1c0a396698648256c350f6f0fe2cb2f0b02c7e Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Wed, 27 Mar 2024 15:44:10 +0800
Subject: [PATCH] 许可按钮放出,备案审批按钮放出

---
 src/views/securityGuardManagement/register.vue |  334 ++++++++++++++++++++++++++++++-------------------------
 1 files changed, 181 insertions(+), 153 deletions(-)

diff --git a/src/views/securityGuardManagement/register.vue b/src/views/securityGuardManagement/register.vue
index a5992f0..d323e14 100644
--- a/src/views/securityGuardManagement/register.vue
+++ b/src/views/securityGuardManagement/register.vue
@@ -1,15 +1,10 @@
-/*
- * @Author: Morpheus
- * @Date: 2021-07-05 16:31:54
- * @Last Modified by: liu
- * @Last Modified time: 2021-09-09 09:53:49
- * menu-name 保安员注册查询
- */
+/* * @Author: Morpheus * @Date: 2021-07-05 16:31:54 * @Last Modified by: liu *
+@Last Modified time: 2021-10-21 15:31:24 * menu-name 保安员注册查询 */
 <template>
   <div>
     <el-row class="registersss">
       <el-col :span="3">
-        <div class="box">
+        <div class="box changeBoxs">
           <el-scrollbar>
             <basic-container>
               <avue-tree
@@ -21,9 +16,17 @@
           </el-scrollbar>
         </div>
       </el-col>
-      <el-col :span="21">
-        <basic-container>
+      <el-col :span="21" class="clearBottomMargin">
+        <basic-container
+          :class="[
+            $store.state.control.screenSize == 1366
+              ? 'smallSize'
+              : 'normalSize',
+            $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : '',
+          ]"
+        >
           <avue-crud
+            class="tablesss"
             :option="option"
             :search.sync="search"
             :table-loading="loading"
@@ -69,49 +72,104 @@
                   : ""
               }}
             </template>
-            <template slot-scope="{ row }" slot="deptId">
+            <template slot-scope="{ row }" slot="deptName">
               <el-tag
                 class="rowClickSelf"
                 title="点击查看所属公司情况"
                 @click="rowClickSelf(row.deptId)"
-                >{{ row.$deptId }}</el-tag
+                >{{ row.deptName }}</el-tag
               >
             </template>
             <template slot-scope="{ type, size, row }" slot="menu">
-              <el-button
-                :size="size"
-                :type="type"
-                class="zhengJian-icon"
-                @click.stop="handleRowClick(row)"
-                >详情</el-button
+              <el-tooltip
+                placement="bottom"
+                effect="light"
+                transition="el-collapse-transition"
+                popper-class="caozuolanpopper"
+                v-if="$store.state.control.changeMenuSize"
               >
-              <el-button
-                :size="size"
-                :type="type"
-                class="zhengJian-icon"
-                @click.stop="honor(row)"
-                >荣誉录入</el-button
-              >
-              <el-button
-                :size="size"
-                :type="type"
-                class="zhengJian-icon"
-                :disabled="row.hold != 1"
-                :title="row.hold != 1 ? '暂无证件或已吊销' : ''"
-                @click.stop="handleViewCredentials(row)"
-                >打印证件</el-button
-              >
+                <div slot="content">
+                  <el-button
+                    icon="el-icon-user"
+                    :size="size"
+                    :type="type"
+                    class="zhengJian-icon"
+                    @click.stop="handleRowClick(row)"
+                    >查看详情</el-button
+                  >
+                  <br />
+                  <el-button
+                    icon="el-icon-mobile"
+                    :size="size"
+                    :type="type"
+                    class="zhengJian-icon"
+                    @click.stop="honor(row)"
+                    >荣誉录入</el-button
+                  >
+                  <br />
+                  <el-button
+                    icon="el-icon-printer"
+                    :size="size"
+                    :type="type"
+                    class="zhengJian-icon"
+                    :disabled="row.hold != 1"
+                    :title="row.hold != 1 ? '暂无证件或已吊销' : ''"
+                    @click.stop="handleViewCredentials(row)"
+                    >打印证件</el-button
+                  >
 
-              <el-button
-                icon="icon-zhengjian"
-                :size="size"
-                :type="type"
-                class="zhengJian-icon"
-                :disabled="row.hold != 1"
-                :title="row.hold != 1 ? '暂无证件或已吊销' : ''"
-                @click.stop="handleCredentials(row)"
-                >证件吊销</el-button
-              >
+                  <br />
+                  <el-button
+                    icon="el-icon-brush"
+                    :size="size"
+                    :type="type"
+                    class="zhengJian-icon"
+                    :disabled="row.hold != 1"
+                    :title="row.hold != 1 ? '暂无证件或已吊销' : ''"
+                    @click.stop="handleCredentials(row)"
+                    >证件吊销</el-button
+                  >
+                </div>
+                <el-button icon="el-icon-s-operation" :size="size" :type="type"
+                  >操作
+                </el-button>
+              </el-tooltip>
+              <div v-if="!$store.state.control.changeMenuSize">
+                <el-button
+                  :size="size"
+                  :type="type"
+                  class="zhengJian-icon"
+                  @click.stop="handleRowClick(row)"
+                  >详情</el-button
+                >
+                <el-button
+                  :size="size"
+                  :type="type"
+                  class="zhengJian-icon"
+                  @click.stop="honor(row)"
+                  >荣誉录入</el-button
+                >
+                <el-button
+                  :size="size"
+                  :type="type"
+                  class="zhengJian-icon"
+                  :disabled="row.hold != 1"
+                  :title="row.hold != 1 ? '暂无证件或已吊销' : ''"
+                  @click.stop="handleViewCredentials(row)"
+                  >打印证件</el-button
+                >
+
+                <el-button
+                  icon="icon-zhengjian"
+                  :size="size"
+                  :type="type"
+                  class="zhengJian-icon"
+                  :disabled="row.hold != 1"
+                  :title="row.hold != 1 ? '暂无证件或已吊销' : ''"
+                  @click.stop="handleCredentials(row)"
+                  >证件吊销</el-button
+                >
+              </div>
             </template>
           </avue-crud>
           <el-dialog
@@ -170,8 +228,11 @@
 
     <div class="baoanzheng" v-if="dialogVisiblecertificates">
       <!-- 保安员证 -->
-      <!-- <div class="baoanzheng" id="baoanzheng"> -->
-      <div class="baz-main">
+      <baoanz
+        :data="objVisiblecertificates"
+        v-if="dialogVisiblecertificates"
+      ></baoanz>
+      <!-- <div class="baz-main">
         <div class="baz-m-body" ref="baoanzheng">
           <div class="bmb-heard">保安员证</div>
           <div class="img">
@@ -181,12 +242,8 @@
           <div class="imgs">
             <div v-if="erweima == ''">暂无二维码</div>
             <img :src="erweima" alt="" v-else />
-            <!-- <img src="/img/register/ewm.png" alt="" /> -->
-            <!-- logoSrc="/img/register/ewm.png" -->
-            <!-- <vue-qr :text="goToUrl" :size="200"></vue-qr> -->
           </div>
 
-          <!-- <img src="/img/mock/card/card-1.jpg" alt="" /> -->
           <div class="bmb-b">
             姓名:<span class="bmb-b-s">{{
               objVisiblecertificates.realName
@@ -206,45 +263,6 @@
           <div class="bmb-b">
             发证日期:<span class="bmb-b-s">{{
               objVisiblecertificates.paperTime.slice(0, 10)
-            }}</span>
-          </div>
-          <!-- <div class="bmb-b">
-              发证机关:<span class="bmb-b-s" style="margin-right: 15px"
-                >南昌市公安局</span
-              >发证日期:<span class="bmb-b-s">{{
-                obj0.createTime.slice(0, 10)
-              }}</span>
-            </div> -->
-        </div>
-        <span slot="footer" class="dialog-footer no-print PrintBut">
-          <el-button type="primary" @click="Print">打 印</el-button>
-          <el-button type="primary" @click="closePrint"> 取 消 </el-button>
-        </span>
-      </div>
-      <!-- </div> -->
-      <!-- <div class="baz-main">
-        <div class="baz-m-body" ref="baoanzheng">
-          <div class="bmb-heard">保安员证</div>
-          <div class="bmb-b">
-            姓名:<span class="bmb-b-s">{{
-              objVisiblecertificates.realName
-            }}</span>
-          </div>
-          <div class="bmb-b">
-            性别:<span class="bmb-b-s">{{
-              objVisiblecertificates.sexName
-            }}</span>
-          </div>
-          <div class="bmb-b">
-            编号:<span class="bmb-b-s">{{
-              objVisiblecertificates.securitynumber
-            }}</span>
-          </div>
-          <div class="bmb-b">
-            发证机关:<span class="bmb-b-s" style="margin-right: 15px"
-              >南昌市公安局</span
-            >发证日期:<span class="bmb-b-s">{{
-              objVisiblecertificates.createTime.slice(0, 10)
             }}</span>
           </div>
         </div>
@@ -269,8 +287,12 @@
 import website from "@/config/website";
 import { getToken } from "@/util/auth";
 import { addhonor, getER } from "@/api/register/honor";
-
+import baoanz from "./baoanz.vue";
+import { getInformationDetails } from "@/api/securityCompany/security"; 
 export default {
+  components: {
+    baoanz,
+  },
   data() {
     const validatePass = (rule, value, callback) => {
       if (value === "") {
@@ -288,6 +310,8 @@
         callback();
       }
     };
+
+    let menuSize = this.$store.state.control.changeMenuSize ? 90 : 310;
     return {
       dialogVisiblecertificates: false,
       objVisiblecertificates: {},
@@ -354,6 +378,7 @@
         pageSize: 10,
         currentPage: 1,
         total: 0,
+        ...this.$store.state.control.changePageSize,
       },
 
       init: {
@@ -371,63 +396,41 @@
         treeLoad: function (node, resolve) {
           const parentId = node.level === 0 ? 0 : node.data.id;
 
-
-
           if (parentId == 0) {
             getDeptLazyTree(parentId).then((res) => {
-
               resolve(
-
                 res.data.data.map((item) => {
-
                   return {
                     ...item,
                     leaf: !item.hasChildren,
                   };
-
                 })
-
               );
-
             });
-          } else if (parentId == '1372091709474910209') {
-
+          } else if (parentId == "1372091709474910209") {
             getDeptLazyTree(parentId).then((res) => {
-
               resolve(
-
                 res.data.data[0].children.map((item) => {
-
                   return {
                     ...item,
                     leaf: !item.hasChildren,
                   };
-
                 })
-
               );
-
             });
           } else {
             getDeptLazyTree(parentId).then((res) => {
               res.data.data = [];
               resolve(
-
                 res.data.data.map((item) => {
-
                   return {
                     ...item,
                     leaf: !item.hasChildren,
                   };
-
                 })
-
               );
-
             });
           }
-
-
         },
         addBtn: false,
         menu: false,
@@ -458,19 +461,20 @@
         //dialogType: 'drawer',
         dialogClickModal: false,
         // 操作栏宽度
-        menuWidth: 310,
+        menuWidth: menuSize,
+        ...this.$store.state.control.clearOtherBut,
         column: [
           {
             label: "姓名",
             prop: "realName",
             search: true,
             searchSpan: 3,
-            width: 60,
+            width: 69,
             searchLabelWidth: 50,
             display: false,
           },
           {
-            label: "所属保安公司",
+            label: "企业名称",
             searchLabelWidth: "110",
             // prop: "deptName",
             prop: "deptId",
@@ -482,10 +486,18 @@
               value: "id",
             },
             slot: true,
+            hide:true,
             searchSpan: 5,
             display: false,
             overHidden: true,
             search: true,
+          },
+          {
+            label: "企业名称",
+            prop: "deptName",
+            slot: true,
+            display: false,
+            overHidden: true,
             width: 198,
           },
           {
@@ -515,8 +527,8 @@
             prop: "cardid",
             search: true,
             searchLabelWidth: 90,
-            searchSpan: 4,
-            minWidth: 140,
+            searchSpan: 5,
+            minWidth: 165,
 
             display: false,
           },
@@ -575,7 +587,7 @@
           {
             label: "联系电话",
             prop: "phone",
-            minWidth: 95,
+            minWidth: 110,
             display: false,
           },
           {
@@ -590,7 +602,7 @@
             search: true,
             searchLabelWidth: 90,
             minWidth: 105,
-            searchSpan: 4,
+            searchSpan: 5,
             addDisplay: false,
             editDisplay: false,
             // hide: true,
@@ -637,8 +649,8 @@
             prop: "hold",
             slot: true,
             search: true,
-            searchSpan: 3,
-            width: 72,
+            searchSpan: 4,
+            width: 100,
             display: false,
             dicData: [
               {
@@ -779,8 +791,10 @@
     },
     "excelForm.isCovered"() {
       if (this.excelForm.isCovered !== "") {
-        const column = this.findObject(this.excelOption.column, "excelFile");
-        column.action = `/api/blade-user/import-user?isCovered=${this.excelForm.isCovered}`;
+        try {
+          const column = this.findObject(this.excelOption.column, "excelFile");
+          column.action = `/api/blade-user/import-user?isCovered=${this.excelForm.isCovered}`;
+        } catch {}
       }
     },
   },
@@ -808,14 +822,23 @@
     if (!website.tenantMode) {
       this.initData(website.tenantId);
     }
+    this.$store.commit("setWindowSizeHeightAdd");
   },
   methods: {
-    rowClickSelf(row) {
-      console.log(row, "baoan");
-      this.$router.push({
-        path: "/securityCompany/index",
-        query: { fromSecunityGuardId: row },
-      });
+    rowClickSelf(deptId) {
+      var data = {
+        departmentid:deptId
+      }
+      getInformationDetails(data).then((res) => {
+        var obj = res.data.data;
+        obj["name"] = "保安公司详细信息";
+        var data = JSON.stringify(obj);
+        this.$router.push({
+          path: "/securityCompany/index",
+          query: { data: data },
+        });
+      })
+      
     },
     Print() {
       this.$Print(this.$refs.baoanzheng);
@@ -828,7 +851,7 @@
       this.dialogVisible = false;
     },
     submitf(form, done) {
-      console.log(form);
+      // console.log(form);
       // this.$message.success(JSON.stringify(form));
       addhonor(form).then(
         (res) => {
@@ -851,7 +874,7 @@
     },
     errorf(err) {
       this.$message.success("请查看控制台");
-      console.log(err);
+      // console.log(err);
     },
     handleClose(done) {
       this.objf = {};
@@ -866,13 +889,11 @@
         honor: "",
         honortime: "",
       };
-      console.log(this.objf);
-      console.log(row);
+      // console.log(this.objf);
+      // console.log(row);
       this.dialogVisible = true;
     },
     nodeClick(data) {
-      //   this.treeDeptId = data.id;
-      // console.log(data, 55555);
       if (data.title != "南昌市公安局") {
         this.jurisdiction = data.id;
       } else {
@@ -883,16 +904,22 @@
     },
     initData(tenantId) {
       getRoleTree(tenantId).then((res) => {
-        const column = this.findObject(this.option.group, "roleId");
-        column.dicData = res.data.data;
+        try {
+          const column = this.findObject(this.option.group, "roleId");
+          column.dicData = res.data.data;
+        } catch {}
       });
       getDeptTree(tenantId).then((res) => {
-        const column = this.findObject(this.option.group, "deptId");
-        column.dicData = res.data.data;
+        try {
+          const column = this.findObject(this.option.group, "deptId");
+          column.dicData = res.data.data;
+        } catch {}
       });
       getPostList(tenantId).then((res) => {
-        const column = this.findObject(this.option.group, "postId");
-        column.dicData = res.data.data;
+        try {
+          const column = this.findObject(this.option.group, "postId");
+          column.dicData = res.data.data;
+        } catch {}
       });
     },
 
@@ -924,11 +951,11 @@
     searchChange(params, done) {
       this.query = params;
       this.page.currentPage = 1;
-      var deptId;
+      // var deptId;
       if (params.deptId) {
-        deptId = params.deptId;
+        this.query["deptId"] = params.deptId;
       }
-      this.onLoad(this.page, params, deptId);
+      this.onLoad(this.page, params);
       done();
     },
     selectionChange(list) {
@@ -979,14 +1006,14 @@
     refreshChange() {
       this.onLoad(this.page, this.query);
     },
-    onLoad(page, params = {}, deptId) {
+    onLoad(page, params = {}) {
       this.loading = true;
+      // console.log(this.jurisdiction,33333);
       params["jurisdiction"] = this.jurisdiction;
       getListSecurity(
         page.currentPage,
         page.pageSize,
-        Object.assign(params, this.query),
-        deptId
+        Object.assign(params, this.query)
       ).then((res) => {
         const data = res.data.data;
         this.page.total = data.total;
@@ -1001,6 +1028,7 @@
         this.data = data.records;
         // console.log(this.data);
         this.loading = false;
+        this.$store.commit("setWindowSizeHeightAdd");
         this.selectionClear();
       });
     },
@@ -1050,7 +1078,7 @@
       // console.log($);
       // this.$Print("#certificatess");
       this.objVisiblecertificates = obj;
-      console.log(this.objVisiblecertificates);
+      // console.log(this.objVisiblecertificates);
       getER(this.objVisiblecertificates.securitynumber).then((res) => {
         this.erweima = res.data;
         // console.log(res.data);
@@ -1058,7 +1086,7 @@
     },
     // 证件吊销事件
     handleCredentials(row) {
-      console.log(row);
+      // console.log(row);
       // return;
       if (row.hold == 2) {
         this.$message({
@@ -1078,7 +1106,7 @@
         })
           .then(() => {
             updateHold(3, row.cardid).then((res) => {
-              console.log(res);
+              // console.log(res);
               this.$message({
                 type: "success",
                 message: "吊销成功!",
@@ -1098,9 +1126,9 @@
 };
 </script>
 
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .box {
-  height: 800px;
+  height: auto;
 }
 
 .el-scrollbar {

--
Gitblit v1.9.3