From 76d5a3e9f27f0e438417534dfb09d94f834e3458 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Thu, 11 Nov 2021 20:47:27 +0800
Subject: [PATCH] 制证管理修改

---
 src/views/accreditationRecords/accreditationRecordsPaper.vue | 1187 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/views/securityGuard/securityGuard.vue                    |   28 
 src/api/accreditationRecords/accreditationRecords.js         |   18 
 3 files changed, 1,219 insertions(+), 14 deletions(-)

diff --git a/src/api/accreditationRecords/accreditationRecords.js b/src/api/accreditationRecords/accreditationRecords.js
index d67b8c3..f67bd8d 100644
--- a/src/api/accreditationRecords/accreditationRecords.js
+++ b/src/api/accreditationRecords/accreditationRecords.js
@@ -51,6 +51,24 @@
 }
 
 
+export const audit = (row) => {
+    return request({
+        url: '/api/accreditationRecords/audit',
+        method: 'post',
+        data: row
+    })
+}
+
+
+export const batchAudit = (row) => {
+    return request({
+        url: '/api/accreditationRecords/batchAudit',
+        method: 'post',
+        data: row
+    })
+}
+
+
 export const securityApply = (row) => {
     return request({
         url: '/api/accreditationRecords/securityApply',
diff --git a/src/views/accreditationRecords/accreditationRecordsPaper.vue b/src/views/accreditationRecords/accreditationRecordsPaper.vue
new file mode 100644
index 0000000..e940080
--- /dev/null
+++ b/src/views/accreditationRecords/accreditationRecordsPaper.vue
@@ -0,0 +1,1187 @@
+<template>
+  <basic-container class="desk1">
+    <avue-crud
+      :option="option"
+      :table-loading="loading"
+      :data="data"
+      :page.sync="page"
+      ref="crud"
+      @row-del="rowDel"
+      v-model="form"
+      :permission="permissionList"
+      :search.sync="questionBankSearch"
+      @row-update="rowUpdate"
+      @row-save="rowSave"
+      :before-open="beforeOpen"
+      @filter="filterChange"
+      @search-change="searchChange"
+      @search-reset="searchReset"
+      @selection-change="selectionChange"
+      @current-change="currentChange"
+      @size-change="sizeChange"
+      @refresh-change="refreshChange"
+      @on-load="onLoad"
+    >
+      <template slot="menuLeft">
+        <el-button
+          style="display: none"
+          type="danger"
+          size="small"
+          icon="el-icon-delete"
+          v-if="permission.notice_delete"
+          plain
+          @click="handleDelete"
+          >删 除
+        </el-button>
+        <el-button
+          style="display:none"
+          type="warning"
+          size="small"
+          plain
+          icon="el-icon-download"
+          v-if="permission.accreditationRecords_export"
+          @click="handleExport"
+          >保安员证信息导出
+        </el-button>
+        <el-button
+              type="primary"
+              size="small"
+              plain
+              
+              icon="el-icon-collection-tag"
+              @click="handleSecurityAudit"
+              >批量审批
+        </el-button>
+        <!-- v-if="permission.securityGuard_security_audit" -->
+      </template>
+      <template slot-scope="{ row }" slot="category">
+        <el-tag>{{ row.categoryName }}</el-tag>
+      </template>
+      <template slot-scope="{ type, size, row }" slot="menu">
+        <el-button
+          style="display: none"
+          :size="size"
+          :type="type"
+          v-if="permission.notice_upload"
+          @click="handleUploadPage(row)"
+          >附件上传
+        </el-button>
+        <!-- <el-button
+          v-if="!deptCategory"
+          :size="size"
+          :type="type"
+          @click="handleUploadPage(row)"
+          >附件查看
+        </el-button> -->
+        <el-button
+          :type="type"
+          :size="size"
+          icon="el-icon-folder-checked"
+          @click="handleAudit(row)"
+          >审核
+        </el-button>
+        <el-button
+          icon="el-icon-edit"
+          :size="size"
+          :type="type"
+          v-if="permission.securityGuard_paper"
+          :disabled="row.auditStatus != 2"
+          @click.stop="certificateClick(row)"
+          >纸质证书制作
+        </el-button>
+        <!-- v-if="permission.paper_audit_check" -->
+      </template>
+      <template slot-scope="{ row }" slot="deptName">
+        <el-tag>{{ row.deptName }}</el-tag>
+      </template>
+      <template slot-scope="{ row }" slot="sex">
+        <el-tag>{{
+          row.sex == "1" ? "男" : row.sex == "2" ? "女" : ""
+        }}</el-tag>
+      </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="批量审批"
+      append-to-body
+      :visible.sync="dialogBatchAudit"
+      width="900px"
+      @close="closeDialog"
+    >
+      <avue-form
+        ref="formBatchAudit"
+        v-model="batchAudit"
+        :option="optionBatchAudit"
+        @reset-change="emptytChange"
+        @submit="submitBatchAudit"
+      ></avue-form>
+    </el-dialog>
+      <div style="position: fixed; top: 9999px; width: 100%; height: 100%">
+          <div class="certificate_box" id="certificateDom">
+            <div class="security_main" ref="certificateBox">
+              <div class="security_m_l_titleName widt">
+                {{ certificateObj.realName }}
+              </div>
+              <div class="security_m_r_o_jg widt">南昌市公安局</div>
+              <div class="security_m_l_titlepaperTimenian widt">
+                {{ certificateYear }}
+              </div>
+              <div class="security_m_l_titlepaperTimeyue widt">
+                {{ certificateMonth }}
+              </div>
+              <div class="security_m_l_downsecuritynumber widt">
+                {{ certificateObj.securityNumber }}
+              </div>
+              <div class="security_m_r_o_right widt">
+                {{ certificateObj.realName }}
+              </div>
+              <div class="security_m_r_o_rightbirthday widt">
+                {{
+                  certificateObj.idCardNo
+                    ? certificateObj.idCardNo.slice(6, 10) +
+                      "." +
+                      certificateObj.idCardNo.slice(10, 12) +
+                      "." +
+                      certificateObj.idCardNo.slice(12, 14)
+                    : ""
+                }}
+              </div>
+              <div class="security_m_r_o_rightaddress security_m_r_o_l_r widt">
+                {{ certificateObj.registered }}
+              </div>
+              <div class="security_m_r_o_rightcardid">
+                {{ certificateObj.idCardNo }}
+              </div>
+            </div>
+          </div>
+        </div>
+  </basic-container>
+</template>
+
+<script>
+import {
+  getList,
+  remove,
+  update,
+  add,
+  getAccreditationRecords,
+  audit,
+  batchAudit
+} from "@/api/accreditationRecords/accreditationRecords";
+import { updatePaperTime } from "@/api/system/user";
+import { getDept } from "@/api/system/dept";
+import { mapGetters } from "vuex";
+import { mapState } from "vuex";
+import Qs from "qs";
+export default {
+  data() {
+    return {
+      certificateYear: null,
+      certificateMonth: null,
+      certificateFlag: false,
+      certificateObj: {
+        realName: "",
+        securityNumber: "",
+        idCardNo: "",
+        registered: "",
+      },
+      Audit: {},
+      dialogFormVisible: false,
+      dialogBatchAudit:false,
+      optionAudit: {
+        height: "auto",
+        calcHeight: 30,
+        dialogWidth: 1000,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        border: true, //liu
+        index: true,
+        stripe: true,
+        viewBtn: false,
+        addBtn: false,
+        editBtn: false,
+        selection: true,
+        excelBtn: false,
+        menuWidth: 230,
+        dialogClickModal: false,
+        column: [
+          {
+            label: "审核状态",
+            search: true,
+            searchSpan: 5,
+            span: 24,
+            prop: "auditStatus",
+            slot: true,
+            editDisplay: false,
+            addDisplay: false,
+            type: "select",
+            rules: [
+              {
+                required: true,
+                message: "请选择审核类型",
+                trigger: "blur",
+              },
+            ],
+            dicData: [
+              {
+                label: "待审核",
+                value: 1,
+              },
+              {
+                label: "审核通过",
+                value: 2,
+              },
+              {
+                label: "审核不通过",
+                value: 3,
+              },
+            ],
+          },
+          {
+            label: "审核明细",
+            span: 24,
+            type: "textarea",
+            prop: "auditDetail",
+          },
+        ],
+      },
+      batchAudit: {
+        number: 0,
+      },
+      optionBatchAudit: {
+        height: "auto",
+        filterBtn: true,
+        calcHeight: 30,
+        dialogWidth: 950,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        border: true, //liu
+        index: true,
+        stripe: true,
+        viewBtn: true,
+        selection: false,
+        excelBtn: false,
+        menuWidth: 380,
+        dialogClickModal: false,
+        column: [
+          {
+            label: "所选保安人数",
+            prop: "number",
+            span: 24,
+            value: 0,
+            disabled: true,
+            labelWidth: 110,
+          },
+          {
+            label: "审核状态",
+            search: true,
+            searchSpan: 5,
+            span: 24,
+            prop: "auditStatus",
+            slot: true,
+            editDisplay: false,
+            addDisplay: false,
+            type: "select",
+            rules: [
+              {
+                required: true,
+                message: "请选择审核类型",
+                trigger: "blur",
+              },
+            ],
+            dicData: [
+              {
+                label: "待审核",
+                value: 1,
+              },
+              {
+                label: "审核通过",
+                value: 2,
+              },
+              {
+                label: "审核不通过",
+                value: 3,
+              },
+            ],
+          },
+          {
+            label: "审核明细",
+            span: 24,
+            type: "textarea",
+            prop: "auditDetail",
+          },
+        ],
+      },
+      choiceList: [],
+      form: {},
+      query: {},
+      questionBankSearch: {},
+      loading: true,
+      deptCategory: "",
+      deptId: "",
+      permissionAdd: "",
+      permissionDelete: "",
+      permissionView: "",
+      permissionEdit: "",
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0,
+      },
+      selectionList: [],
+      option: {
+        height: "auto",
+        filterBtn: true,
+        calcHeight: 30,
+        dialogWidth: 950,
+        searchShow: true,
+        searchMenuSpan: 6,
+        selection: true,
+        reserveSelection: true,
+        tip: true,
+        border: true,
+        index: true,
+        stripe: true,
+        viewBtn: true,
+        // selection: true,
+        excelBtn: false,
+        addBtnText: "发布",
+        addTitle: "发布",
+        saveBtnText: "发布",
+        menuWidth: 180,
+        dialogClickModal: false,
+        column: [
+          {
+            label: "申请时间",
+            prop: "releaseTimeRange",
+            type: "datetime",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd",
+            searchRange: true,
+            hide: true,
+            addDisplay: false,
+            editDisplay: false,
+            viewDisplay: false,
+            search: true,
+            searchSpan: 5,
+            rules: [
+              {
+                required: true,
+                message: "请输入申请时间",
+                trigger: "blur",
+              },
+            ],
+          },
+          {
+            label: "姓名",
+            prop: "realName",
+            search: true,
+            searchSpan: 3,
+            width: 90,
+            searchLabelWidth: 50,
+            // display: false,
+          },
+          // {
+          //   label: "所属保安公司",
+          //   searchLabelWidth: "110",
+          //   // prop: "deptName",
+          //   prop: "deptId",
+          //   type: "tree",
+          //   dicUrl:
+          //     "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
+          //   props: {
+          //     label: "title",
+          //     value: "id",
+          //   },
+          //   // hide: true,
+          //   slot: true,
+          //   searchSpan: 5,
+          //   display: false,
+          //   search: true,
+          //   minWidth: 260,
+          // },
+          {
+            label: "所属保安公司",
+            searchLabelWidth: "110",
+            prop: "deptName",
+            // type: "tree",
+            // dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
+            // props: {
+            //     label: "title",
+            //     value: "id",
+            // },
+            slot: true,
+            searchSpan: 5,
+            search: true,
+            overHidden: true,
+            minWidth: 200,
+          },
+          {
+            label: "性别",
+            prop: "sex",
+            width: 60,
+            type: "select",
+            display: false,
+          },
+          {
+            label: "身份证号码",
+            prop: "idCardNo",
+            search: true,
+            searchLabelWidth: 90,
+            minWidth: 110,
+            searchSpan: 4,
+          },
+          {
+            label: "年龄",
+            prop: "age",
+            width: 50,
+          },
+          {
+            label: "照片",
+            prop: "avatar",
+            type: "upload",
+            listType: "picture-img",
+          },
+          {
+            label: "保安证编号",
+            prop: "securityNumber",
+            search: true,
+            searchLabelWidth: 90,
+            minWidth: 90,
+            searchSpan: 3,
+            addDisplay: false,
+            editDisplay: false,
+            // hide: true,
+          },
+          {
+            label: "申请人",
+            prop: "applyName",
+            // search: true,
+            searchLabelWidth: 90,
+            width: 80,
+            // searchSpan: 4,
+            addDisplay: false,
+            editDisplay: false,
+            // hide: true,
+          },
+          {
+            label: "申请人所在单位",
+            prop: "applyUnit",
+            search: true,
+            searchLabelWidth: 120,
+            minWidth: 105,
+            searchSpan: 4,
+            addDisplay: false,
+            editDisplay: false,
+            // hide: true,
+          },
+          {
+            label: "申请时间",
+            prop: "createTime",
+            // search: true,
+            searchLabelWidth: 90,
+            minWidth: 105,
+            // searchSpan: 4,
+            addDisplay: false,
+            editDisplay: false,
+            // hide: true,
+          },
+          {
+            label: "审核状态",
+            prop: "auditStatus",
+            type: "select",
+            search: true,
+            searchLabelWidth: 90,
+            width: 90,
+            searchSpan: 3,
+            addDisplay: false,
+            editDisplay: false,
+            hide: false,
+            display: false,
+            dicData: [
+              {
+                label: "待审核",
+                value: 1,
+              },
+              {
+                label: "审核通过",
+                value: 2,
+              },
+              {
+                label: "审核不通过",
+                value: 3,
+              },
+            ],
+          },
+          {
+            label: "审核明细",
+            prop: "auditDetail",
+            minWidth: 105,
+            addDisplay: false,
+            editDisplay: false,
+            hide: false,
+            display: false,
+          },
+          {
+            label: "是否制证",
+            prop: "userType",
+            type: "select",
+            slot: true,
+            search: true,
+            editDisplay: false,
+            addDisplay: false,
+            searchSpan: 3,
+            width: 69,
+            dicData: [
+              {
+                label: "已制证",
+                value: 6,
+              },
+              {
+                label: "未制证",
+                value: 7,
+              },
+            ],
+          },
+        ],
+      },
+      data: [],
+    };
+  },
+  computed: {
+    ...mapGetters(["userInfo", "permission"]),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(null, false),
+        viewBtn: this.vaildData(
+          this.permission.accreditationRecords_view,
+          false
+        ),
+        delBtn: this.vaildData(null, false),
+        editBtn: this.vaildData(null, false),
+      };
+    },
+    ids() {
+      let ids = [];
+      this.selectionList.forEach((ele) => {
+        ids.push(ele.id);
+      });
+      return ids.join(",");
+    },
+    ...mapState({
+      userInfo: (state) => state.user.userInfo,
+    }),
+  },
+  mounted() {
+    this.getDeptInfo(this.userInfo.dept_id);
+  },
+  methods: {
+    //获取当前用户部门信息
+    getDeptInfo(deptId) {
+      var that = this;
+      getDept(deptId).then((res) => {
+        var deptCategory = res.data.data.deptCategory;
+        deptCategory == 1
+          ? (that.deptCategory = true)
+          : (that.deptCategory = false);
+      });
+    },
+    //跳转到附件列表页面
+    handleUploadPage(row) {
+      this.$router.push({
+        path: `/resource/uploadNotice`,
+        query: {
+          deptId: row.deptId,
+          noticeId: row.id,
+        },
+      });
+    },
+    rowSave(row, done, loading) {
+      if (this.deptCategory) {
+        row.category = 1;
+      } else {
+        row.category = 2;
+      }
+      row["type"] = 1;
+      row.deptId = this.deptId;
+      add(row).then(
+        () => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!",
+          });
+          done();
+        },
+        (error) => {
+          window.console.log(error);
+          loading();
+        }
+      );
+    },
+    //行点击事件
+    certificateClick(row) {
+      if (row) {
+        var time = this.getNewTime();
+        this.certificateYear = time[0];
+        this.certificateMonth = time[1];
+        this.certificateObj = row;
+        setTimeout(() => {
+          this.Print();
+        }, 500);
+      }
+    },
+
+    Print() {
+      if (
+        this.certificateObj.registered == "" ||
+        this.certificateObj.registered == null
+      ) {
+        this.$message({ message: "请完善住址信息", type: "warning" });
+        return;
+      }
+      //更新发证时间
+      var printDom = document.getElementById("certificateDom");
+      printDom.style.position = "absolute";
+      printDom.style.top = "-25.0%";
+      printDom.style.left = "-23%";
+      printDom.style.width = "120%";
+      printDom.style.height = "100%";
+      printDom.style.fontFamily = "SimSun";
+
+      this.$print("#certificateDom", {
+        noPrint: ".noPrint",
+        onStart: () => {
+          // console.log('打印开始', Date.parse(new Date()));
+        },
+        onEnd: () => {
+          this.updateUserInfo();
+          // console.log('打印完成', Date.parse(new Date()));
+        },
+      });
+    },
+    getNewTime() {
+      var nowTime = new Date();
+
+      var oneHoursAgo = new Date(
+        new Date(nowTime).getTime() - 1 * 60 * 60 * 1000
+      );
+      var oneHoursAgoY = oneHoursAgo.getFullYear();
+      var oneHoursAgoM =
+        oneHoursAgo.getMonth() + 1 < 10
+          ? "0" + (oneHoursAgo.getMonth() + 1)
+          : oneHoursAgo.getMonth() + 1;
+
+      /**
+       * @return 返回1小时,2小时,3小时,4小时,24小时
+       */
+      return [oneHoursAgoY, oneHoursAgoM];
+    },
+    //更新用户发证时间
+    updateUserInfo() {
+      var nowTime = new Date();
+      var oneHoursAgo = new Date(
+        new Date(nowTime).getTime() - 1 * 60 * 60 * 1000
+      );
+      var oneHoursAgoY = oneHoursAgo.getFullYear();
+      var oneHoursAgoM =
+        oneHoursAgo.getMonth() + 1 < 10
+          ? "0" + (oneHoursAgo.getMonth() + 1)
+          : oneHoursAgo.getMonth() + 1;
+      var day = oneHoursAgo.getDay();
+      var date = oneHoursAgoY + "-" + oneHoursAgoM + "-" + day;
+      const data = {
+        id: this.certificateObj.userId,
+        userType: 6,
+        paperTime: date,
+      };
+      updatePaperTime(data);
+      this.onLoad(this.page);
+    },
+    //批量审批
+    submitBatchAudit(row, done, loading) {
+      var that = this;
+      let cho = this.choiceList;
+      let str = "";
+      for (let k in cho) {
+        str += cho[k].id;
+        if (k != cho.length - 1) {
+          str += ",";
+        }
+      }
+      const data = {
+        ids:str,
+        auditStatus:row.auditStatus,
+        auditDetail:row.auditDetail,
+        auditUser:this.userInfo.Id,
+      }
+      //提交申请
+      batchAudit(data).then(
+        () => {
+          this.onLoad(this.page);
+          that.$refs.formBatchAudit.resetFields();
+          that.dialogBatchAudit = false;
+          this.$message({
+            type: "success",
+            message: "操作成功",
+          });
+          //清除选项
+          that.$refs.crud.toggleSelection();
+          done();
+        },
+        (error) => {
+          window.console.log(error);
+          loading();
+        }
+      );
+    },
+    rowUpdate(row, index, done, loading) {
+      // if (this.deptCategory) {
+      //   row.category = 1;
+      // }else{
+      //   row.category = 2;
+      // }
+      row.deptId = this.deptId;
+      update(row).then(
+        () => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!",
+          });
+          done();
+        },
+        (error) => {
+          window.console.log(error);
+          loading();
+        }
+      );
+    },
+    //证书批量审核
+    handleSecurityAudit() {
+      if (this.choiceList.length == 0) {
+        this.$message({
+          message: "未选择保安员",
+          type: "warning",
+        });
+        return;
+      }
+      this.dialogBatchAudit = true;
+      this.batchAudit.number = this.choiceList.length;
+    },
+    rowDel(row) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          return remove(row.id);
+        })
+        .then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!",
+          });
+        });
+    },
+    searchReset() {
+      this.query = {};
+      this.onLoad(this.page);
+    },
+    //审核
+    handleAudit(row) {
+      this.dialogFormVisible = true;
+      this.Audit = row;
+    },
+    //审核
+    submit(row, done, loading) {
+      const data = {
+        id: row.id,
+        auditStatus: row.auditStatus,
+        auditDetail: row.auditDetail,
+        auditUser: this.userInfo.Id,
+      };
+
+      audit(data).then(
+        () => {
+          this.dialogFormVisible = false;
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!",
+          });
+          done();
+        },
+        (error) => {
+          window.console.log(error);
+          loading();
+        }
+      );
+    },
+    searchChange(params, done) {
+      this.query = params;
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    selectionChange(list) {
+      // this.selectionList = list;
+      this.choiceList = [];
+      for (let k in list) {
+        this.choiceList.push({
+          id: list[k].id,
+        });
+      }
+    },
+    selectionClear() {
+      this.selectionList = [];
+      //下面注释防止翻页后选中的数据被清除
+      // this.$refs.crud.toggleSelection();
+    },
+    handleDelete() {
+      if (this.selectionList.length === 0) {
+        this.$message.warning("请选择至少一条数据");
+        return;
+      }
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          return remove(this.ids);
+        })
+        .then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!",
+          });
+          this.$refs.crud.toggleSelection();
+        });
+    },
+    beforeOpen(done, type) {
+      if (["edit", "view"].includes(type)) {
+        getAccreditationRecords(this.form.id).then((res) => {
+          this.form = res.data.data;
+        });
+      }
+      done();
+    },
+    currentChange(currentPage) {
+      this.page.currentPage = currentPage;
+    },
+    sizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.query);
+    },
+    onLoad(page, params = {}) {
+      this.deptId = JSON.parse(
+        window.localStorage.getItem("saber-userInfo")
+      ).content.dept_id;
+
+      //获取当前用户部门信息,判断是否为公安,如果是公安,则只能查看公告信息
+      var that = this;
+      getDept(this.deptId).then((res) => {
+        var deptCategory = res.data.data.deptCategory;
+        deptCategory == 1
+          ? (that.deptCategory = true)
+          : (that.deptCategory = false);
+
+        const { releaseTimeRange } = this.query;
+        params["jurisdiction"] = this.jurisdiction;
+        params["type"] = 2;
+        let values = {
+          ...params,
+        };
+        if (releaseTimeRange) {
+          values = {
+            ...params,
+            startTime: releaseTimeRange[0],
+            endTime: releaseTimeRange[1],
+            ...this.query,
+          };
+          values.releaseTimeRange = null;
+        }
+        this.loading = true;
+        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.selectionClear();
+        });
+      });
+    },
+    //保安员证信息导出
+    handleExport() {
+      this.$confirm("是否导出保安员证信息数据?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        //获取查询条件
+        const { releaseTimeRange } = this.questionBankSearch;
+        if (releaseTimeRange) {
+          this.questionBankSearch["startTime"] = releaseTimeRange[0];
+          this.questionBankSearch["endTime"] = releaseTimeRange[1];
+        }
+        var data = {
+          deptName: this.questionBankSearch.deptName,
+          idCardNo: this.questionBankSearch.idCardNo,
+          realName: this.questionBankSearch.realName,
+          securityNumber: this.questionBankSearch.securityNumber,
+          startTime: this.questionBankSearch.startTime,
+          endTime: this.questionBankSearch.endTime,
+        };
+        //导出
+        // if (
+        //   this.userInfo.role_name == "保安公司管理员" ||
+        //   this.userInfo.role_name == "保安"
+        // ) {
+        //   //如果是保安公司管理员
+        //   data["deptId"] = this.userInfo.dept_id;
+        // }
+        if (this.userInfo.role_name == "培训公司管理员") {
+          //如果是培训公司管理员
+          data["trainUnitId"] = this.userInfo.dept_id;
+        }
+        // data["examType"] = 2;
+        //序列号url形式,用&拼接
+        data = Qs.stringify(data);
+        window.open(`/api/accreditationRecords/export-security-paper?` + data);
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.box {
+  height: 800px;
+}
+
+.el-scrollbar {
+  height: 100%;
+}
+
+.box .el-scrollbar__wrap {
+  overflow: scroll;
+}
+.rowClickSelf {
+  &:hover {
+    cursor: pointer;
+  }
+}
+//保安证  本子
+.certificate_box {
+  width: 100%;
+  height: 90%;
+  background-color: #fff;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+  font: normal 18px "SimSuncss" !important;
+}
+.security_main {
+  width: 630px;
+  height: 512px;
+  //   border: 1px solid rgba($color: #a5a5a5, $alpha: 0.5);
+  // display: flex;
+  // align-items: center;
+  // justify-content: space-around;
+  // background-size: 100% 100%;
+  // background-repeat: no-repeat;
+  position: relative;
+}
+// 标题
+$upTop: 45px;
+$downTop: 265px; //整体高度
+//经国家保安员考试审查合格。<br />特颁此证。
+.security_main-title {
+  position: absolute;
+  top: $upTop;
+  left: 34px;
+  line-height: 45px;
+  letter-spacing: 3px;
+}
+//发证公安机关&nbsp;(印章)
+.security_m_l_center {
+  position: absolute;
+  top: 270px;
+  left: 30px;
+  line-height: 40px;
+}
+//证件编号 &nbsp;
+.security_m_l_down {
+  position: absolute;
+  top: 379px;
+  left: 32px;
+}
+
+$rightLeft: 343px;
+$rightFontSize: 18px;
+$rightWidth: 77px;
+
+$lineHigeht: 30px;
+//姓名
+.security_m_r_a {
+  position: absolute;
+  top: $downTop;
+  left: $rightLeft;
+  width: $rightWidth;
+  text-align: justify;
+  text-align-last: justify;
+}
+//出生年月
+.security_m_r_b {
+  position: absolute;
+  top: $downTop + $lineHigeht * 1;
+  left: $rightLeft;
+  width: $rightWidth;
+  text-align: justify;
+  text-align-last: justify;
+}
+//地址
+.security_m_r_c {
+  position: absolute;
+  top: $downTop + $lineHigeht * 2;
+  left: $rightLeft;
+  width: $rightWidth;
+  text-align: justify;
+  text-align-last: justify;
+}
+//公民身份证
+.security_m_r_d {
+  position: absolute;
+  top: 363px;
+  left: $rightLeft;
+  width: $rightWidth;
+  text-align: justify;
+  text-align-last: justify;
+}
+//照片
+// width: calc(358px / 22px);
+// height: calc(441px / 22px);
+.security_m_r_imgs {
+  width: calc(358px / 3);
+  height: calc(441px / 3);
+  position: absolute;
+  top: $upTop;
+  left: 421px;
+  img {
+    width: 100%;
+    height: 100%;
+  }
+}
+
+// 内容
+// 抬头名字
+.security_m_l_titleName {
+  position: absolute;
+  top: 45px;
+  left: 121px;
+  right: 0;
+  line-height: 45px;
+  letter-spacing: 3px;
+}
+//发证时间
+$timeTop: 312px; //整体高度
+//年
+.security_m_l_titlepaperTimenian {
+  position: absolute;
+  top: $timeTop;
+  left: 109px;
+  line-height: 40px;
+}
+//月
+.security_m_l_titlepaperTimeyue {
+  position: absolute;
+  top: $timeTop;
+  left: 168px;
+  line-height: 40px;
+}
+//日
+.security_m_l_titlepaperTimeri {
+  position: absolute;
+  top: $timeTop;
+  left: 159px;
+  line-height: 40px;
+}
+//证件编号
+.security_m_l_downsecuritynumber {
+  position: absolute;
+  top: 386px; //整体高度
+  left: 145px;
+}
+
+//内容
+// 姓名
+$centerLeft: 458px;
+.security_m_r_o_right {
+  position: absolute;
+  top: $downTop + $lineHigeht * 0-2px;
+  left: $centerLeft;
+  // width: $rightWidth;
+}
+// 生日
+.security_m_r_o_rightbirthday {
+  position: absolute;
+  top: $downTop + $lineHigeht * 1-4px;
+  left: $centerLeft;
+  // width: $rightWidth;
+}
+// 地址
+.security_m_r_o_rightaddress {
+  position: absolute;
+  top: $downTop + $lineHigeht * 2 -6px;
+  left: $centerLeft;
+  width: 185px;
+}
+// 身份证
+.security_m_r_o_rightcardid {
+  position: absolute;
+  top: $downTop + $lineHigeht * 4 +10px;
+  left: $centerLeft;
+  // width: $rightWidth;
+}
+//背景图
+.security_main_backImge {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  background-image: url(/img/securityCertificate/bazsss.png);
+  background-size: 100% 100%;
+  background-repeat: no-repeat;
+}
+
+.security_m_r_o_jg {
+  position: absolute;
+  top: 267px;
+  left: 210px;
+  line-height: 40px;
+  letter-spacing: 2px;
+}
+</style>
diff --git a/src/views/securityGuard/securityGuard.vue b/src/views/securityGuard/securityGuard.vue
index bad5cde..facef62 100644
--- a/src/views/securityGuard/securityGuard.vue
+++ b/src/views/securityGuard/securityGuard.vue
@@ -922,13 +922,13 @@
               {
                 label: "住址",
                 prop: "registered",
-                // rules: [
-                //   {
-                //     required: true,
-                //     message: "请输入住址",
-                //     trigger: "click",
-                //   },
-                // ],
+                rules: [
+                  {
+                    required: true,
+                    message: "请输入住址",
+                    trigger: "click",
+                  },
+                ],
               },
               {
                 label: "所属辖区",
@@ -956,13 +956,13 @@
                 type: "date",
                 format: "yyyy-MM-dd",
                 valueFormat: "yyyy-MM-dd",
-                // rules: [
-                //   {
-                //     required: true,
-                //     message: "请输入入职时间",
-                //     trigger: "click",
-                //   },
-                // ],
+                rules: [
+                  {
+                    required: true,
+                    message: "请输入入职时间",
+                    trigger: "click",
+                  },
+                ],
               },
               {
                 label: "性别",

--
Gitblit v1.9.3