liuyg
2021-09-17 700a583507614593f4c1d5d5df57a9cf2a77c3c5
保安公司同步
2 files modified
1 files added
1213 ■■■■■ changed files
src/views/securityCompany/companyDetails.vue 41 ●●●●● patch | view | raw | blame | history
src/views/securityGuardManagement/registerOnce copy.vue 1087 ●●●●● patch | view | raw | blame | history
src/views/securityGuardManagement/registerOnce.vue 85 ●●●●● patch | view | raw | blame | history
src/views/securityCompany/companyDetails.vue
@@ -2,7 +2,7 @@
 * @Author: Morpheus
 * @Date: 2021-07-05 16:31:54
 * @Last Modified by: liu
 * @Last Modified time: 2021-09-17 15:15:53
 * @Last Modified time: 2021-09-17 16:46:18
 * menu-name 保安公司详细资料
 */
<template>
@@ -212,7 +212,7 @@
                </el-row>
                <el-row>
                  <el-col span="12">
                  <!-- <el-col span="12">
                    <el-form-item label="实缴资金">
                      <el-input
                        disabled="true"
@@ -220,21 +220,16 @@
                        autocomplete="off"
                      ></el-input>
                    </el-form-item>
                  </el-col>
                  </el-col> -->
                  <el-col span="12">
                    <el-col span="12">
                      <el-form-item label="注册时间">
                        <el-input
                          disabled="true"
                          v-model="form.establishtime"
                          autocomplete="off"
                        ></el-input>
                      </el-form-item>
                    </el-col>
                    <el-form-item label="注册时间">
                      <el-input
                        disabled="true"
                        v-model="form.establishtime"
                        autocomplete="off"
                      ></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row>
                  <el-col span="12">
                    <el-form-item label="工商注册号">
                      <el-input
@@ -245,6 +240,18 @@
                    </el-form-item>
                  </el-col>
                </el-row>
                <!-- <el-row>
                  <el-col span="12">
                    <el-form-item label="工商注册号">
                      <el-input
                        disabled="true"
                        v-model="form.registrationnumber"
                        autocomplete="off"
                      ></el-input>
                    </el-form-item>
                  </el-col>
                </el-row> -->
              </el-form>
            </el-tab-pane>
            <el-tab-pane label="投资人信息" name="third">
@@ -573,7 +580,10 @@
      // })
    } else {
      this.form = this.$route.query;
      // console.log(this.$route.query, "this.$route.query.");
      // console.log(this.form, "obj1");
      this.businessLicenseUrl = this.form.businessLicense;
      this.licenceUrl = this.form.licence;
    }
    // usejurisdiction().then((res) => {
    //   const data = res.data.data;
@@ -667,7 +677,6 @@
    },
    investorOnLoad(page, params = {}) {
      this.investorLoading = true;
      console.log(this.form, "form");
      getInvestorList(
        page.currentPage,
        page.pageSize,
src/views/securityGuardManagement/registerOnce copy.vue
New file
@@ -0,0 +1,1087 @@
/*
 * @Author: Morpheus
 * @Date: 2021-07-05 16:31:54
 * @Last Modified by: liu
 * @Last Modified time: 2021-09-17 17:05:09
 * menu-name 保安员注册查询
 */
<template>
  <div>
    <el-row class="registersss">
      <el-col :span="spanLeft">
        <div class="box">
          <el-scrollbar>
            <basic-container>
              <avue-tree
                :option="treeOption"
                :data="treeData"
                @node-click="nodeClick"
              />
            </basic-container>
          </el-scrollbar>
        </div>
      </el-col>
      <el-col :span="spanRight">
        <basic-container>
          <avue-crud
            :option="option"
            :search.sync="search"
            :table-loading="loading"
            :data="data"
            ref="crud"
            v-model="form"
            :permission="permissionList"
            @row-save="rowSave"
            :before-open="beforeOpen"
            :page.sync="page"
            @search-change="searchChange"
            @search-reset="searchReset"
            @selection-change="selectionChange"
            @current-change="currentChange"
            @size-change="sizeChange"
            @refresh-change="refreshChange"
          >
            <!-- @on-load="onLoad" -->
            <!-- @row-click="handleRowClick" -->
            <!-- <template slot-scope="{row}"
                              slot="tenantName">
                        <el-tag>{{row.tenantName}}</el-tag>
                    </template>
                    <template slot-scope="{row}"
                              slot="roleName">
                        <el-tag>{{row.roleName}}</el-tag>
                    </template>
                    <template slot-scope="{row}"
                              slot="deptName">
                        <el-tag>{{row.deptName}}</el-tag>
                    </template>
                    <template slot-scope="{row}"
                              slot="userTypeName">
                        <el-tag>{{row.userTypeName}}</el-tag>
                    </template> -->
            <template slot-scope="{ row }" slot="deptId">
              <el-tag
                class="rowClickSelf"
                title="点击查看所属公司情况"
                @click="rowClickSelf(row.deptId)"
                >{{ row.$deptId }}</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-button
                :size="size"
                :type="type"
                class="zhengJian-icon"
                @click.stop="honor(row)"
                >荣誉录入</el-button
              >
              <el-button
                :size="size"
                :type="type"
                class="zhengJian-icon"
                @click.stop="handleViewCredentials(row)"
                >打印证件</el-button
              >
              <el-button
                icon="icon-zhengjian"
                :size="size"
                :type="type"
                class="zhengJian-icon"
                @click.stop="handleCredentials(row)"
                >证件吊销</el-button
              >
            </template>
          </avue-crud>
          <el-dialog
            title="用户数据导入"
            append-to-body
            :visible.sync="excelBox"
            width="555px"
          >
            <avue-form
              :option="excelOption"
              v-model="excelForm"
              :upload-after="uploadAfter"
            >
              <template slot="excelTemplate">
                <el-button type="primary" @click="handleTemplate">
                  点击下载<i class="el-icon-download el-icon--right"></i>
                </el-button>
              </template>
            </avue-form>
          </el-dialog>
        </basic-container>
      </el-col>
    </el-row>
    <el-dialog
      title="荣誉录入"
      :visible.sync="dialogVisible"
      width="60%"
      :before-close="handleClose"
      :modal-append-to-body="false"
      center
    >
      <!-- <span>这是一段信息</span> -->
      <avue-form
        :option="optionf"
        v-model="objf"
        @submit="submitf"
        @error="errorf"
      >
        <template slot-scope="{ type, size, row }" slot="menuForm">
          <el-button
            :size="size"
            icon="el-icon-error"
            :type="type"
            @click="close(row)"
            >关闭</el-button
          >
        </template>
      </avue-form>
      <!-- <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogVisible = false"
          >确 定</el-button
        >
      </span> -->
    </el-dialog>
    <div class="baoanzheng" v-if="dialogVisiblecertificates">
      <div class="baz-main">
        <div class="baz-m-body" ref="baoanzheng">
          <div class="bmb-heard">保安员证</div>
          <!-- <img src="/img/mock/card/card-1.jpg" alt="" /> -->
          <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>
        <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>
</template>
<script>
import { getUser, add, updateHold } from "@/api/management/user";
import { getListSecurity } from "@/api/system/user";
import { getDeptLazyTree } from "@/api/Jurs/jurs";
// import { getDeptTree, getDeptLazyTree } from "@/api/system/dept";
import { getDeptTree } from "@/api/system/dept";
import { getRoleTree } from "@/api/system/role";
import { getPostList } from "@/api/system/post";
import { mapGetters } from "vuex";
import website from "@/config/website";
import { getToken } from "@/util/auth";
import { addhonor } from "@/api/register/honor";
export default {
  data() {
    const validatePass = (rule, value, callback) => {
      if (value === "") {
        callback(new Error("请输入密码"));
      } else {
        callback();
      }
    };
    const validatePass2 = (rule, value, callback) => {
      if (value === "") {
        callback(new Error("请再次输入密码"));
      } else if (value !== this.form.password) {
        callback(new Error("两次输入密码不一致!"));
      } else {
        callback();
      }
    };
    return {
      spanLeft: 3,
      spanRight: 21,
      departmentid: "", //从保安公司进来
      dialogVisiblecertificates: false,
      objVisiblecertificates: {},
      objf: {},
      optionf: {
        column: [
          {
            label: "保安员名称",
            prop: "name",
            span: 24,
            labelWidth: 110,
            disabled: true,
            rules: [
              {
                required: true,
                message: "请输入身份证号码",
                trigger: "blur",
              },
            ],
          },
          {
            label: "身份证号码",
            prop: "cardid",
            span: 24,
            labelWidth: 110,
            disabled: true,
            rules: [
              {
                required: true,
                message: "请输入身份证号码",
                trigger: "blur",
              },
            ],
          },
          {
            label: "荣誉内容",
            prop: "honor",
            span: 24,
            type: "textarea",
            labelWidth: 110,
          },
          {
            label: "获取时间",
            prop: "honortime",
            span: 24,
            labelWidth: 110,
            type: "date",
            format: "yyyy-MM-dd",
            valueFormat: "yyyy-MM-dd",
          },
        ],
      },
      dialogVisible: false,
      form: {},
      search: {},
      excelBox: false,
      initFlag: true,
      selectionList: [],
      query: {},
      loading: true,
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
      },
      init: {
        roleTree: [],
        deptTree: [],
      },
      treeDeptId: "",
      jurisdiction: "",
      treeData: [],
      treeOption: {
        nodeKey: "id",
        defaultExpandAll: true,
        lazy: false,
        treeLoad: function (node, resolve) {
          const parentId = node.level === 0 ? 0 : node.data.id;
          getDeptLazyTree(parentId).then((res) => {
            resolve(
              res.data.data.map((item) => {
                return {
                  ...item,
                  leaf: !item.hasChildren,
                };
              })
            );
          });
        },
        addBtn: false,
        menu: false,
        size: "small",
        props: {
          labelText: "标题",
          label: "title",
          value: "value",
          children: "children",
        },
      },
      option: {
        // 操作栏多余按钮去除
        delBtn: false,
        editBtn: false,
        addBtn: false,
        selection: true,
        align: "center",
        height: "auto",
        calcHeight: 80,
        tip: false,
        searchShowBtn: false,
        searchShow: true,
        border: true,
        searchMenuSpan: 4,
        index: true,
        viewBtn: false,
        //dialogType: 'drawer',
        dialogClickModal: false,
        // 操作栏宽度
        menuWidth: 310,
        column: [
          {
            label: "姓名",
            prop: "realName",
            search: true,
            searchSpan: 3,
            width: 60,
            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",
            },
            slot: true,
            searchSpan: 5,
            display: false,
            overHidden: true,
            search: true,
            width: 280,
          },
          {
            label: "性别",
            prop: "sex",
            width: 55,
            type: "select",
            dicData: [
              {
                label: "男",
                value: 1,
              },
              {
                label: "女",
                value: 2,
              },
              {
                label: "未知",
                value: 3,
              },
            ],
            display: false,
          },
          {
            label: "身份证号码",
            prop: "cardid",
            search: true,
            searchLabelWidth: 90,
            searchSpan: 4,
            minWidth: 140,
            display: false,
          },
          {
            label: "籍贯",
            prop: "nativeplace",
            hide: true,
            display: false,
          },
          {
            label: "民族",
            prop: "nation",
            hide: true,
            width: 55,
            display: false,
          },
          {
            label: "出生日期",
            prop: "birthday",
            type: "date",
            format: "yyyy-MM-dd",
            valueFormat: "yyyy-MM-dd",
            display: false,
            hide: true,
          },
          {
            label: "年龄",
            prop: "age",
            width: 55,
            display: false,
          },
          {
            label: "学历",
            prop: "education",
            display: false,
            width: 90,
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
            props: {
              label: "dictValue",
              value: "dictKey",
            },
            type: "select",
            // hide: true,
            rules: [
              {
                required: true,
                message: "请选择学历",
                trigger: "blur",
              },
            ],
          },
          {
            label: "联系电话",
            prop: "phone",
            minWidth: 95,
            display: false,
          },
          {
            label: "健康状态",
            prop: "healstats",
            hide: true,
            display: false,
          },
          {
            label: "保安证编号",
            prop: "securitynumber",
            search: true,
            searchLabelWidth: 90,
            minWidth: 105,
            searchSpan: 4,
            addDisplay: false,
            editDisplay: false,
            // hide: true,
          },
          {
            label: "入职时间",
            prop: "rtime",
            hide: true,
            display: false,
          },
          // {
          //     label: "是否派遣",
          //     prop: "dispatch",
          //     // hide: true,
          //     type: 'select',
          //     // display: false,
          //     dicData: [
          //         {
          //             label: '未派遣',
          //             value: 1
          //         }, {
          //             label: '已派遣',
          //             value: 0
          //         }
          //     ]
          // },
          {
            label: "是否派遣",
            prop: "dispatch",
            type: "select",
            dicData: [
              {
                label: "未派遣",
                value: "1",
              },
              {
                label: "已派遣",
                value: "0",
              },
            ],
          },
          {
            label: "是否持证",
            prop: "hold",
            slot: true,
            search: true,
            searchSpan: 3,
            width: 72,
            display: false,
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=equipage",
            props: {
              label: "dictValue",
              value: "dictKey",
            },
            type: "select",
            rules: [
              {
                required: true,
                message: "请选择",
                trigger: "blur",
              },
            ],
          },
          // {
          //     label: "入职时间",
          //     prop: "rtime",
          //     type: "datetime",
          //     format: "yyyy-MM-dd",
          //     valueFormat: "yyyy-MM-dd",
          //     searchRange: true,
          //     searchSpan: 6,
          //     hide: true,
          //     addDisplay: false,
          //     editDisplay: false,
          //     viewDisplay: false,
          //     search: true,
          //     rules: [{
          //         required: true,
          //         message: "请输入时间",
          //         trigger: "blur"
          //     }]
          // },
          {
            label: "在职状态",
            prop: "status",
            type: "select",
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=workerState",
            props: {
              label: "dictValue",
              value: "dictKey",
            },
            dataType: "number",
            display: false,
            hide: true,
            searchSpan: 3,
            width: 80,
            search: false,
            rules: [
              {
                required: true,
                message: "请选择在职状态",
                trigger: "blur",
              },
            ],
          },
        ],
      },
      data: [],
      platformQuery: {},
      platformSelectionList: [],
      excelForm: {},
      excelOption: {
        submitBtn: false,
        emptyBtn: false,
        column: [
          {
            label: "模板上传",
            prop: "excelFile",
            type: "upload",
            drag: true,
            loadText: "模板上传中,请稍等",
            span: 24,
            propsHttp: {
              res: "data",
            },
            tip: "请上传 .xls,.xlsx 标准格式文件",
            action: "/api/blade-user/import-user",
          },
          {
            label: "数据覆盖",
            prop: "isCovered",
            type: "switch",
            align: "center",
            width: 80,
            dicData: [
              {
                label: "否",
                value: 0,
              },
              {
                label: "是",
                value: 1,
              },
            ],
            value: 0,
            slot: true,
            rules: [
              {
                required: true,
                message: "请选择是否覆盖",
                trigger: "blur",
              },
            ],
          },
          {
            label: "模板下载",
            prop: "excelTemplate",
            formslot: true,
            span: 24,
          },
        ],
      },
    };
  },
  watch: {
    "form.tenantId"() {
      if (this.form.tenantId !== "" && this.initFlag) {
        this.initData(this.form.tenantId);
      }
    },
    "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}`;
      }
    },
  },
  computed: {
    ...mapGetters(["permission"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.user_add, false),
        viewBtn: this.vaildData(this.permission.user_view, false),
        delBtn: this.vaildData(this.permission.user_delete, false),
        editBtn: this.vaildData(this.permission.user_edit, false),
      };
    },
    ids() {
      let ids = [];
      this.selectionList.forEach((ele) => {
        ids.push(ele.id);
      });
      return ids.join(",");
    },
  },
  mounted() {
    //重复菜单
    var flag = false,
      i = 0,
      ind = null;
    this.$store.state.tags.tagList.forEach((item, index) => {
      if (item.label == "公司保安员详情") {
        if (flag == false) {
          ind = index;
          flag = true;
        }
        i++;
      }
    });
    if (i > 1) {
      this.$store.state.tags.tagList.splice(ind, 1);
    }
    // 非租户模式默认加载管理组数据
    if (!website.tenantMode) {
      this.initData(website.tenantId);
    }
    // 判断是否从保安公司人数点击跳转
    if (this.$route.query.departmentid) {
      this.departmentid = this.$route.query.departmentid;
      console.log(this.departmentid, "ddddddddddddd");
      this.spanRight = 24;
      this.spanLeft = 0;
      var d = this.option.column;
      d[1]["search"] = false;
    } else {
      console.log("正常点击");
      this.spanRight = 21;
      this.spanLeft = 3;
      var d = this.option.column;
      d[1]["search"] = true;
    }
    this.onLoad(this.page);
  },
  methods: {
    rowClickSelf(row) {
      console.log(row, "baoan");
      this.$router.push({
        path: "/securityCompany/index",
        query: { fromSecunityGuardId: row },
      });
    },
    Print() {
      this.$Print(this.$refs.baoanzheng);
    },
    closePrint() {
      this.dialogVisiblecertificates = false;
    },
    close(row) {
      this.objf = {};
      this.dialogVisible = false;
    },
    submitf(form, done) {
      console.log(form);
      // this.$message.success(JSON.stringify(form));
      addhonor(form).then((res) => {
        console.log(res);
      });
      this.objf = {};
      this.dialogVisible = false;
      done();
    },
    errorf(err) {
      this.$message.success("请查看控制台");
      console.log(err);
    },
    handleClose(done) {
      this.objf = {};
      done();
    },
    honor(row) {
      this.objf = {};
      //打开荣誉录入
      console.log(this.objf);
      this.objf = {
        cardid: row.cardid,
        name: row.name,
        honor: "",
        honortime: "",
      };
      this.dialogVisible = true;
    },
    nodeClick(data) {
      //   this.treeDeptId = data.id;
      // console.log(data, 55555);
      if (data.title != "南昌市公安局") {
        this.jurisdiction = data.id;
      } else {
        this.jurisdiction = "";
      }
      this.page.currentPage = 1;
      this.onLoad(this.page);
    },
    initData(tenantId) {
      getRoleTree(tenantId).then((res) => {
        const column = this.findObject(this.option.group, "roleId");
        column.dicData = res.data.data;
      });
      getDeptTree(tenantId).then((res) => {
        const column = this.findObject(this.option.group, "deptId");
        column.dicData = res.data.data;
      });
      getPostList(tenantId).then((res) => {
        const column = this.findObject(this.option.group, "postId");
        column.dicData = res.data.data;
      });
    },
    rowSave(row, done, loading) {
      row.deptId = row.deptId.join(",");
      row.roleId = row.roleId.join(",");
      row.postId = row.postId.join(",");
      add(row).then(
        () => {
          this.initFlag = false;
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          window.console.log(error);
          loading();
        }
      );
    },
    searchReset() {
      this.query = {};
      this.treeDeptId = "";
      this.onLoad(this.page);
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      var deptId;
      if (params.deptId) {
        deptId = params.deptId;
      }
      this.onLoad(this.page, params, deptId);
      done();
    },
    selectionChange(list) {
      this.selectionList = list;
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
    },
    uploadAfter(res, done, loading, column) {
      window.console.log(column);
      this.excelBox = false;
      this.refreshChange();
      done();
    },
    handleTemplate() {
      window.open(
        `/api/blade-user/export-template?${
          this.website.tokenHeader
        }=${getToken()}`
      );
    },
    beforeOpen(done, type) {
      if (["edit", "view"].includes(type)) {
        getUser(this.form.id).then((res) => {
          this.form = res.data.data;
          if (this.form.hasOwnProperty("deptId")) {
            this.form.deptId = this.form.deptId.split(",");
          }
          if (this.form.hasOwnProperty("roleId")) {
            this.form.roleId = this.form.roleId.split(",");
          }
          if (this.form.hasOwnProperty("postId")) {
            this.form.postId = this.form.postId.split(",");
          }
        });
      }
      this.initFlag = true;
      done();
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}, deptId) {
      this.loading = true;
      params["jurisdiction"] = this.jurisdiction;
      if (this.departmentid) {
        params["deptId"] = this.departmentid;
      }
      getListSecurity(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        var d = data.records;
        var date = new Date();
        var datayear = date.getFullYear();
        for (const key in d) {
          var year = d[key].cardid.slice(6, 10);
          d[key]["age"] = +datayear - +year;
          // d[key].securitynumber = "赣洪202100009";
        }
        this.data = data.records;
        console.log(this.data);
        this.loading = false;
        this.selectionClear();
      });
    },
    platformSelectionClear() {
      this.platformSelectionList = [];
      this.$refs.platformCrud.toggleSelection();
    },
    // 行单击
    handleRowClick(row) {
      // delete (row["name"]);
      var obj = row;
      obj["name"] = "保安详细信息";
      this.$router.push({
        path: `/management/index`,
        query: obj,
      });
      // var flag = false,
      //   i = 0,
      //   ind = null;
      // this.$store.state.tags.tagList.forEach((item, index) => {
      //   if (item.label == "保安详细信息") {
      //     if (flag == false) {
      //       ind = index;
      //       flag = true;
      //     }
      //     i++;
      //   }
      // });
      // if (i > 1) {
      //   this.$store.state.tags.tagList.splice(ind, 1);
      // }
    },
    //证件查看
    handleViewCredentials(row) {
      var obj = row;
      // obj["name"] = "保安证件信息";
      // this.$router.push({
      //   path: `/management/idinformation`,
      //   query: obj,
      // });
      this.dialogVisiblecertificates = true;
      // // $("#certificatess").jqprint();
      // console.log($);
      // this.$Print("#certificatess");
      this.objVisiblecertificates = obj;
      console.log(this.objVisiblecertificates);
    },
    // 证件吊销事件
    handleCredentials(row) {
      if (row.hold == 1) {
        this.$message({
          type: "info",
          message: "证件未拥有!",
        });
      } else if (row.hold == 2) {
        this.$message({
          type: "info",
          message: "证件已吊销!",
        });
      } else {
        this.$confirm("是否吊销该人员的证件?", "提示", {
          confirmButtonText: "是",
          cancelButtonText: "否",
          type: "warning",
        })
          .then(() => {
            updateHold(2, row.cardid).then((res) => {
              console.log(res);
              this.$message({
                type: "success",
                message: "删除成功!",
              });
            });
          })
          .catch(() => {
            this.$message({
              type: "info",
              message: "已取消删除",
            });
          });
      }
    },
  },
};
</script>
<style lang='scss' scoped>
.box {
  height: 800px;
}
.el-scrollbar {
  height: 100%;
}
.box .el-scrollbar__wrap {
  overflow: scroll;
}
#certificatess {
  width: 600px;
  height: 300px;
  background-color: #fff;
  .certificates-main {
    width: 100%;
    height: 100%;
    background-image: url("/img/register/bazbj.png");
    background-size: 100% 100%;
  }
}
.baoanzheng {
  position: fixed;
  top: 0;
  left: -10%;
  height: 0;
  width: 120%;
  height: 100%;
  // background-color: rgba(0, 0, 0, 0.5);
  background-color: #fff;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.baz-main {
  position: relative;
  top: 15px;
  // width: 441px;
  // height: 358px;
  width: 491px;
  height: 468px;
  // background-color: #004ca7;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.baz-m-body {
  width: 461px;
  height: 308px;
  background-image: url("/img/register/bazbj.png");
  background-size: 100% 100%;
  .bmb-heard {
    font-size: 2rem;
    width: 100%;
    text-align: center;
    letter-spacing: 1rem;
    margin-bottom: 40px;
    position: relative;
    top: 20px;
  }
  img {
    width: 130px;
    height: 130px;
    border-radius: 130px;
    position: absolute;
    top: 110px;
    right: 60px;
  }
  .bmb-b {
    padding-left: 20px;
    box-sizing: border-box;
    height: 50px;
    margin-left: 10px;
    width: 100%;
    font-size: 1rem;
    font-weight: 400;
    .bmb-b-s {
      display: inline-block;
      width: 110px;
      font-size: 1.1rem;
      font-weight: 600;
    }
  }
}
.PrintBut {
  margin-top: 15px;
}
.rowClickSelf {
  &:hover {
    cursor: pointer;
  }
}
</style>
src/views/securityGuardManagement/registerOnce.vue
@@ -1,31 +1,17 @@
/*
 * @Author: Morpheus
 * @Date: 2021-07-05 16:31:54
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-07-10 15:41:13
 * @Last Modified by: liu
 * @Last Modified time: 2021-09-17 17:13:04
 * menu-name 保安员注册查询
 */
<template>
  <div>
    <el-row class="registersss">
      <el-col :span="spanLeft">
        <div class="box">
          <el-scrollbar>
            <basic-container>
              <avue-tree
                :option="treeOption"
                :data="treeData"
                @node-click="nodeClick"
              />
            </basic-container>
          </el-scrollbar>
        </div>
      </el-col>
      <el-col :span="spanRight">
        <basic-container>
          <avue-crud
            :option="option"
            :search.sync="search"
            :table-loading="loading"
            :data="data"
            ref="crud"
@@ -41,24 +27,6 @@
            @size-change="sizeChange"
            @refresh-change="refreshChange"
          >
            <!-- @on-load="onLoad" -->
            <!-- @row-click="handleRowClick" -->
            <!-- <template slot-scope="{row}"
                              slot="tenantName">
                        <el-tag>{{row.tenantName}}</el-tag>
                    </template>
                    <template slot-scope="{row}"
                              slot="roleName">
                        <el-tag>{{row.roleName}}</el-tag>
                    </template>
                    <template slot-scope="{row}"
                              slot="deptName">
                        <el-tag>{{row.deptName}}</el-tag>
                    </template>
                    <template slot-scope="{row}"
                              slot="userTypeName">
                        <el-tag>{{row.userTypeName}}</el-tag>
                    </template> -->
            <template slot-scope="{ row }" slot="deptId">
              <el-tag
                class="rowClickSelf"
@@ -298,36 +266,8 @@
        deptTree: [],
      },
      treeDeptId: "",
      jurisdiction: "",
      treeData: [],
      treeOption: {
        nodeKey: "id",
        defaultExpandAll: true,
        lazy: true,
        treeLoad: function (node, resolve) {
          const parentId = node.level === 0 ? 0 : node.data.id;
          getDeptLazyTree(parentId).then((res) => {
            resolve(
              res.data.data.map((item) => {
                return {
                  ...item,
                  leaf: !item.hasChildren,
                };
              })
            );
          });
        },
        addBtn: false,
        menu: false,
        size: "small",
        props: {
          labelText: "标题",
          label: "title",
          value: "value",
          children: "children",
        },
      },
      option: {
        // 操作栏多余按钮去除
        delBtn: false,
@@ -374,7 +314,7 @@
            searchSpan: 5,
            display: false,
            overHidden: true,
            search: true,
            // search: true,
            width: 280,
          },
          {
@@ -764,17 +704,6 @@
      };
      this.dialogVisible = true;
    },
    nodeClick(data) {
      //   this.treeDeptId = data.id;
      // console.log(data, 55555);
      if (data.title != "南昌市公安局") {
        this.jurisdiction = data.id;
      } else {
        this.jurisdiction = "";
      }
      this.page.currentPage = 1;
      this.onLoad(this.page);
    },
    initData(tenantId) {
      getRoleTree(tenantId).then((res) => {
        const column = this.findObject(this.option.group, "roleId");
@@ -877,13 +806,12 @@
      this.loading = true;
      params["jurisdiction"] = this.jurisdiction;
      if (this.departmentid) {
        deptId = this.departmentid;
        params["deptId"] = this.departmentid;
      }
      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;
@@ -901,7 +829,6 @@
        this.selectionClear();
      });
    },
    platformSelectionClear() {
      this.platformSelectionList = [];
      this.$refs.platformCrud.toggleSelection();