liuyg
2021-08-27 c80c736772e5edfc611b18aed837b2835d2ebca8
保安员管理   公司管理   许可备案更改
13 files modified
11 files added
7607 ■■■■■ changed files
src/api/licenseApproval/permit.js 50 ●●●●● patch | view | raw | blame | history
src/api/licenseApproval/record.js 50 ●●●●● patch | view | raw | blame | history
src/api/licenseApproval/recordk.js 50 ●●●●● patch | view | raw | blame | history
src/api/licenseApproval/revoke.js 50 ●●●●● patch | view | raw | blame | history
src/api/securityCompany/security.js 13 ●●●●● patch | view | raw | blame | history
src/router/views/index.js 14 ●●●●● patch | view | raw | blame | history
src/styles/element-ui.scss 19 ●●●●● patch | view | raw | blame | history
src/views/licenseApproval/branchOffice.vue 888 ●●●●● patch | view | raw | blame | history
src/views/licenseApproval/cancellationOfFiling.vue 882 ●●●●● patch | view | raw | blame | history
src/views/licenseApproval/crossRegion.vue 882 ●●●●● patch | view | raw | blame | history
src/views/licenseApproval/securityGuard.vue 828 ●●●●● patch | view | raw | blame | history
src/views/licenseApproval/securityPermit.vue 888 ●●●●● patch | view | raw | blame | history
src/views/licenseApproval/securityTraining.vue 888 ●●●●● patch | view | raw | blame | history
src/views/securityCompany/armed.vue 261 ●●●● patch | view | raw | blame | history
src/views/securityCompany/column.js 175 ●●●● patch | view | raw | blame | history
src/views/securityCompany/computents/equipment.vue 2 ●●● patch | view | raw | blame | history
src/views/securityCompany/computents/punish.vue 16 ●●●●● patch | view | raw | blame | history
src/views/securityCompany/computents/service.vue 53 ●●●●● patch | view | raw | blame | history
src/views/securityCompany/computents/staff.vue 2 ●●● patch | view | raw | blame | history
src/views/securityCompany/confess.vue 143 ●●●●● patch | view | raw | blame | history
src/views/securityCompany/security.vue 117 ●●●● patch | view | raw | blame | history
src/views/securityCompany/securityCrossRegion.vue 128 ●●●● patch | view | raw | blame | history
src/views/securityCompany/train.vue 119 ●●●●● patch | view | raw | blame | history
src/views/securityGuardManagement/registerOnce.vue 1089 ●●●●● patch | view | raw | blame | history
src/api/licenseApproval/permit.js
New file
@@ -0,0 +1,50 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
  return request({
    url: '/api/permit/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
export const getDetail = (id) => {
  return request({
    url: '/api/permit/detail',
    method: 'get',
    params: {
      id
    }
  })
}
export const remove = (ids) => {
  return request({
    url: '/api/permit/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}
export const add = (row) => {
  return request({
    url: '/api/permit/save',
    method: 'post',
    data: row
  })
}
export const update = (row) => {
  return request({
    url: '/api/permit/update',
    method: 'post',
    data: row
  })
}
src/api/licenseApproval/record.js
New file
@@ -0,0 +1,50 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
  return request({
    url: '/api/record/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
export const getDetail = (id) => {
  return request({
    url: '/api/record/detail',
    method: 'get',
    params: {
      id
    }
  })
}
export const remove = (ids) => {
  return request({
    url: '/api/record/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}
export const add = (row) => {
  return request({
    url: '/api/record/submit',
    method: 'post',
    data: row
  })
}
export const update = (row) => {
  return request({
    url: '/api/record/update',
    method: 'post',
    data: row
  })
}
src/api/licenseApproval/recordk.js
New file
@@ -0,0 +1,50 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
  return request({
    url: '/api/recordk/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
export const getDetail = (id) => {
  return request({
    url: '/api/recordk/detail',
    method: 'get',
    params: {
      id
    }
  })
}
export const remove = (ids) => {
  return request({
    url: '/api/recordk/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}
export const add = (row) => {
  return request({
    url: '/api/recordk/submit',
    method: 'post',
    data: row
  })
}
export const update = (row) => {
  return request({
    url: '/api/recordk/submit',
    method: 'post',
    data: row
  })
}
src/api/licenseApproval/revoke.js
New file
@@ -0,0 +1,50 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
  return request({
    url: '/api/revoke/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
export const getDetail = (id) => {
  return request({
    url: '/api/revoke/detail',
    method: 'get',
    params: {
      id
    }
  })
}
export const remove = (ids) => {
  return request({
    url: '/api/revoke/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}
export const add = (row) => {
  return request({
    url: '/api/revoke/submit',
    method: 'post',
    data: row
  })
}
export const update = (row) => {
  return request({
    url: '/api/revoke/submit',
    method: 'post',
    data: row
  })
}
src/api/securityCompany/security.js
@@ -2,6 +2,19 @@
export const getList = (current, size, params, stats) => {
  return request({
    url: '/api/information/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
      stats
    }
  })
}
export const getListold = (current, size, params, stats) => {//2021.8.25因内网公司接口需要同步成外网公司接口 舍弃
  return request({
    url: '/api/information/list',
    method: 'get',
    params: {
src/router/views/index.js
@@ -177,6 +177,20 @@
        }]
    },
    {
        path: '/securityGuardManagement',
        redirect: '/securityGuardManagement/registerOnce',
        component: Layout,
        children: [{
            path: 'registerOnce',
            name: '公司保安员详情',
            meta: {
                i18n: 'registerOnce',
            },
            component: () =>
                import( /* webpackChunkName: "views" */ '@/views/securityGuardManagement/registerOnce')
        }]
    },
    {
        path: '/desk',
        component: Layout,
        redirect: '/desk/notice',
src/styles/element-ui.scss
@@ -415,7 +415,7 @@
//去除表格底部线
.el-table td,
.el-table th.is-leaf {
  border: 1px solid transparent;
  border: 1px solid rgba($color: #ffffff, $alpha: 0.2);
}
// //顶部搜索栏
// .el-card.is-never-shadow.avue-crud__search {
@@ -599,3 +599,20 @@
//   display: flex;
//   flex-direction: row-reverse;
// }
.rowClickSelf {
  // border: 1px solid #2593ee !important;
  &:hover {
    cursor: pointer;
  }
}
//格子
// .el-table th.is-leaf {
//   border: 1px solid #fff;
//   box-sizing: border-box;
// }
.avue-empty__desc {
  color: #fff !important;
}
src/views/licenseApproval/branchOffice.vue
New file
@@ -0,0 +1,888 @@
/*
 * @Author: liu
 * @Date: 2021-08-26 17:00:55
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2021-08-26 17:53:40
 */
<template>
  <div>
    <basic-container class="permit">
      <avue-crud
        :option="option"
        :table-loading="loading"
        :data="data"
        :page.sync="page"
        :permission="permissionList"
        :before-open="beforeOpen"
        v-model="form"
        ref="crud"
        @row-update="rowUpdate"
        @row-save="rowSave"
        @row-del="rowDel"
        @search-change="searchChange"
        @search-reset="searchReset"
        @selection-change="selectionChange"
        @current-change="currentChange"
        @size-change="sizeChange"
        @refresh-change="refreshChange"
        @on-load="onLoad"
        :row-style="rowStyle"
      >
        <template slot="menuLeft">
          <el-button
            type="danger"
            size="small"
            icon="el-icon-delete"
            plain
            v-if="permission.permit_delete"
            @click="handleDelete"
            >删 除
          </el-button>
        </template>
        <template slot-scope="{ type, size, row }" slot="menu">
          <el-button
            icon="icon-zhengjian"
            :size="size"
            :type="type"
            class="zhengJian-icon"
            @click.stop="handleCredentials(row)"
            >附件审查</el-button
          >
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            v-if="row.type == '2'"
            @click.stop="rowDel(row)"
            >备案审批
          </el-button>
        </template>
        <template class="tdtype" slot-scope="{ row }" slot="type">
          <el-tag class="dtype">
            {{
              row.type == "0" ? "通过" : row.type == "1" ? "不通过" : "待审批"
            }}
            <i class="gz" v-if="row.type == '0'"></i>
            <i class="yj" v-if="row.type == '1'"></i>
            <i class="zc" v-if="row.type == '2'"></i>
          </el-tag>
        </template>
      </avue-crud>
    </basic-container>
    <!-- <el-dialog
      :visible.sync="dialogVisible"
      :before-close="handleClose"
      :modal-append-to-body="false"
      width="1005px"
      top="10vh"
      class="printstyle"
    >
      <div id="licence_box">
        <div class="licence" id="licence" v-if="dialogVisible">
          <div class="licence-head">保安服务许可证</div>
          <div class="head-tid">
            洪公保服务
            <span class="fontStyle">{{
              licenceData.row.organizationcode
            }}</span>
            号
          </div>
          <div class="licence-main">
            <div
              class="l-m-once"
              v-for="(item, index, key) in licenceData.chiden"
              :key="key"
            >
              <span class="l-m-o-title"> {{ index }}: </span>
              <span class="l-m-r-once">{{ item }}</span>
            </div>
          </div>
          <div class="licence-bottom">发证机关(南昌市公安局)</div>
          <div class="l-bottom">
            发证日期
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(0, 4)
            }}</span
            >年
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(5, 7)
            }}</span>
            月
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(8, 10)
            }}</span>
            日
          </div>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="Print">打 印</el-button>
      </span>
    </el-dialog> -->
    <div
      v-if="dialogVisible"
      class="dialogVisibles"
      :class="classStyle == 'print' ? 'printstyle' : ''"
    >
      <div
        id="licence_box"
        :class="classStyle == 'print' ? 'printstyle' : ''"
        ref="licence"
      >
        <div class="licence" id="licence" v-if="dialogVisible">
          <div class="licence-head">保安服务许可证</div>
          <div class="head-tid">
            洪公保服务
            <span class="fontStyle">{{
              licenceData.row.organizationcode
            }}</span>
            号
          </div>
          <div class="licence-main">
            <div
              class="l-m-once"
              v-for="(item, index, key) in licenceData.chiden"
              :key="key"
            >
              <span class="l-m-o-title"> {{ index }}: </span>
              <span class="l-m-r-once">{{ item }}</span>
            </div>
          </div>
          <div class="licence-bottom">发证机关(南昌市公安局)</div>
          <div class="l-bottom">
            发证日期
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(0, 4)
            }}</span
            >年
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(5, 7)
            }}</span>
            月
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(8, 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>
    <el-dialog
      title=""
      :visible.sync="dialogVisiblecc"
      width="30%"
      :modal-append-to-body="false"
    >
      <div class="flots">
        <span class="f_title">是否通过审批?</span>
        <span class="f_body">请输入修改意见:</span>
        <textarea
          name="reworkmes"
          cols="40"
          rows="4"
          style="overflow: hidden"
          v-model="textareaShenpi"
        ></textarea>
        <div class="but">
          <el-button @click="closecc">通过</el-button>
          <el-button type="primary" @click="subcc">不通过</el-button>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import {
  getList,
  getDetail,
  add,
  update,
  remove,
} from "@/api/licenseApproval/record";
import { mapGetters } from "vuex";
export default {
  data() {
    return {
      classStyle: "print", //打印样式
      dialogVisiblecc: false, //许可证审核抽屉
      xukezData: {},
      dialogVisible: false, //许可证抽屉
      licenceData: {
        row: {},
        chiden: {},
      },
      textareaShenpi: "",
      form: {},
      query: {},
      loading: true,
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
      },
      selectionList: [],
      option: {
        height: "auto",
        calcHeight: 30,
        excelBtn: true,
        tip: false,
        searchShowBtn: false,
        searchShow: true,
        searchMenuSpan: 8,
        border: true,
        menuWidth: 300,
        labelWidth: 130,
        headerAlign: "center",
        align: "center",
        // border: false,
        index: true,
        viewBtn: true,
        selection: true,
        dialogClickModal: false,
        column: [
          {
            label: "企业名称",
            search: true,
            prop: "enterprisename",
            searchLabelWidth: 80,
            searchSpan: 4,
            overHidden: true,
            width: 250,
            rules: [
              {
                required: true,
                message: "请输入企业名称",
                trigger: "blur",
              },
            ],
          },
          {
            label: "社会信用代码",
            prop: "creditcode",
            hide: true,
            rules: [
              {
                required: true,
                message: "请输入统一社会信用代码",
                trigger: "blur",
              },
            ],
          },
          {
            label: "法定代表人",
            prop: "representative",
            width: 82,
            rules: [
              {
                required: true,
                message: "请输入法定代表人",
                trigger: "blur",
              },
            ],
          },
          {
            label: "法定代表人电话",
            width: 106,
            prop: "representativecell",
            rules: [
              {
                required: true,
                message: "请输入法定代表人电话",
                trigger: "blur",
              },
            ],
          },
          {
            label: "联系人",
            prop: "contacts",
            width: 58,
            rules: [
              {
                required: true,
                message: "请输入联系人",
                trigger: "blur",
              },
            ],
          },
          {
            label: "联系人电话",
            width: 96,
            prop: "contactscell",
            rules: [
              {
                required: true,
                message: "请输入联系人电话",
                trigger: "blur",
              },
            ],
          },
          {
            label: "注册时间",
            hide: true,
            prop: "establishtime",
            type: "date",
            format: "yyyy-MM-dd",
            valueFormat: "yyyy-MM-dd",
            rules: [
              {
                required: true,
                message: "请输入注册时间",
                trigger: "blur",
              },
            ],
          },
          {
            label: "注册资本",
            prop: "registeredcapital",
            rules: [
              {
                required: true,
                message: "请输入注册资本",
                trigger: "blur",
              },
            ],
          },
          {
            label: "组织机构代码",
            prop: "organizationcode",
            hide: true,
            rules: [
              {
                required: true,
                message: "请输入组织机构代码",
                trigger: "blur",
              },
            ],
          },
          {
            label: "工商注册号",
            hide: true,
            prop: "registrationnumber",
            rules: [
              {
                required: true,
                message: "请输入工商注册号",
                trigger: "blur",
              },
            ],
          },
          {
            label: "纳税人识别号",
            prop: "identificationnumber",
            hide: true,
            rules: [
              {
                required: true,
                message: "请输入纳税人识别号",
                trigger: "blur",
              },
            ],
          },
          {
            label: "企业类型",
            hide: true,
            prop: "enterprises",
            rules: [
              {
                required: true,
                message: "请输入企业类型",
                trigger: "blur",
              },
            ],
          },
          {
            label: "注册地址",
            prop: "address",
            overHidden: true,
            rules: [
              {
                required: true,
                message: "请输入注册地址",
                trigger: "blur",
              },
            ],
          },
          {
            label: "所属地区",
            hide: true,
            prop: "region",
            rules: [
              {
                required: true,
                message: "请输入所属地区",
                trigger: "blur",
              },
            ],
          },
          {
            label: "登记机关",
            prop: "registration",
            overHidden: true,
            rules: [
              {
                required: true,
                message: "请输入登记机关",
                trigger: "blur",
              },
            ],
          },
          {
            label: "所属行业",
            hide: true,
            prop: "industry",
            rules: [
              {
                required: true,
                message: "请输入所属行业",
                trigger: "blur",
              },
            ],
          },
          {
            label: "所属机构",
            prop: "deptid",
            addDisplay: false,
            type: "select",
            hide: true,
            dicUrl: "/api/blade-system/dept/selectIn",
            props: {
              label: "deptname",
              value: "deptid",
            },
          },
          {
            label: "许可类型",
            search: true,
            hide: true,
            prop: "ptype",
            type: "select",
            searchSpan: 4,
            dicData: [
              {
                label: "保安服务许可",
                value: "0",
              },
              {
                label: "保安培训许可",
                value: "1",
              },
            ],
          },
          {
            label: "提交时间",
            prop: "permitime",
            overHidden: true,
            addDisplay: false,
            width: 132,
            type: "date",
            format: "yyyy-MM-dd HH:mm:ss",
            valueFormat: "yyyy-MM-dd HH:mm:ss",
          },
          {
            label: "审核状态",
            prop: "type",
            addDisplay: false,
            type: "select",
            dicData: [
              {
                label: "通过",
                value: "0",
              },
              {
                label: "不通过",
                value: "1",
              },
              {
                label: "待审核",
                value: "2",
              },
            ],
          },
          {
            label: "经营范围",
            prop: "business",
            component: "AvueUeditor",
            hide: true,
            minRows: 6,
            span: 24,
            rules: [
              {
                required: true,
                message: "请输入经营范围",
                trigger: "blur",
              },
            ],
          },
        ],
      },
      data: [],
    };
  },
  computed: {
    ...mapGetters(["permission", "userInfo"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.permit_add, false),
        viewBtn: this.vaildData(this.permission.permit_view, true),
        delBtn: this.vaildData(this.permission.permit_delete, false),
        editBtn: this.vaildData(this.permission.permit_edit, false),
      };
    },
    ids() {
      let ids = [];
      this.selectionList.forEach((ele) => {
        ids.push(ele.id);
      });
      return ids.join(",");
    },
  },
  // mounted() {
  //     console.log(this.userInfo.dept_id);
  // },
  methods: {
    Print() {
      this.$Print(this.$refs.licence);
    },
    handleCredentials(row) {
      this.$router.push({
        path: "/attach/index",
        // redirect: { name: "foo" },
        // query: { row: row },
        query: { deptid: row.deptid, type: "0" },
        // params: { row: row.identificationnumber },
      });
    },
    rowSave(row, done, loading) {
      row.deptid = this.userInfo.dept_id;
      add(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          window.console.log(error);
        }
      );
    },
    rowUpdate(row, index, done, loading) {
      update(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          console.log(error);
        }
      );
    },
    rowDel(row) {
      this.dialogVisiblecc = true;
      this.xukezData = row;
    },
    closecc() {
      this.xukezData.type = "0";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      console.log(this.xukezData);
      update(this.xukezData);
      this.textareaShenpi = "";
      this.$message({
        type: "success",
        message: "审核通过!",
      });
    },
    subcc() {
      this.xukezData.type = "1";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      update(this.xukezData);
      this.textareaShenpi = "";
      this.$message({
        type: "success",
        message: "审核不通过!",
      });
    },
    viewLicense(row) {
      //查看许可证
      this.licenceData.row = row;
      this.licenceData.chiden = {};
      this.licenceData.chiden["名称"] = row.enterprisename;
      this.licenceData.chiden["住所"] = row.address;
      this.licenceData.chiden["法定代表人"] = row.representative;
      this.licenceData.chiden["服务范围"] = row.industry;
      this.licenceData.chiden["注册资本"] = row.registeredcapital;
      this.licenceData.chiden["批准文号"] = row.registrationnumber;
      console.log(this.licenceData);
      this.dialogVisible = true;
    },
    closePrint() {
      this.dialogVisible = false;
    },
    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)) {
        getDetail(this.form.id).then((res) => {
          this.form = res.data.data;
        });
      }
      done();
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
    },
    selectionChange(list) {
      this.selectionList = list;
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
      this.loading = true;
      params["ptype"] = 2;
      getList(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        this.loading = false;
        this.selectionClear();
      });
    },
    rowStyle({ row }) {
      if (row.dtype != null && row.dtype != "") {
        if (row.dtype == "2") {
          return {
            color: "#F34A4A",
          };
        }
        if (row.dtype == "1") {
          return {
            color: "#F48F57",
          };
        }
      }
    },
  },
};
</script>
<style scoped lang="scss">
.dtype {
  width: 80px;
}
.dx {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #dfdfdf;
}
.zc {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #29c093;
}
.yj {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f34a4a;
}
.gz {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f48f57;
}
.el-tag {
  display: inline-block;
  width: 80px;
  /*padding-right: 40px !important;*/
}
#licence_box {
  position: relative;
  top: 15px;
  width: 1080px;
  height: 780px;
  background-color: #004ca7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.licence {
  width: 960px;
  height: 648px;
  background-color: #fff !important;
  background-image: url("../../static/img/permit/服务许可背景图.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-sizing: border-box;
  padding: 10%;
  color: #000;
}
.licence-head {
  width: 100%;
  height: 1.8rem;
  font-size: 1.8rem;
  text-align: center;
}
.head-tid {
  position: relative;
  left: 70%;
}
.head-tid span {
  margin: 0 1rem;
}
.licence-main {
  width: 80%;
}
.l-m-once {
  width: 100%;
  height: 2rem;
  margin-top: 1rem;
}
.l-m-o-title {
  font-size: 1.3rem;
  width: 22%;
  text-align: justify;
  display: inline-block;
}
.l-m-r-once {
  font-size: 1.1rem;
  /* border: 1px solid #000; */
  display: inline-block;
  width: 77%;
}
.licence-bottom,
.l-bottom {
  position: relative;
  left: 60%;
  font-size: 1.5rem;
  margin-top: 0.5rem;
}
.dialogVisibles {
  position: fixed;
  top: 0;
  left: -10%;
  height: 0;
  width: 120%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.printstyle {
  background-color: #fff !important;
}
.PrintBut {
  margin-top: 15px;
}
.flots {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  .f_title {
    position: absolute;
    top: 15px;
    font-size: 18px;
  }
}
.but {
  margin-top: 20px;
  width: 100%;
  display: flex;
  align-content: center;
  justify-content: center;
}
</style>
src/views/licenseApproval/cancellationOfFiling.vue
New file
@@ -0,0 +1,882 @@
/*
 * @Author: liu
 * @Date: 2021-08-26 17:00:04
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2021-08-26 17:03:44
 */
<template>
  <div>
    <basic-container class="permit">
      <avue-crud
        :option="option"
        :table-loading="loading"
        :data="data"
        :page.sync="page"
        :permission="permissionList"
        :before-open="beforeOpen"
        v-model="form"
        ref="crud"
        @row-update="rowUpdate"
        @row-save="rowSave"
        @row-del="rowDel"
        @search-change="searchChange"
        @search-reset="searchReset"
        @selection-change="selectionChange"
        @current-change="currentChange"
        @size-change="sizeChange"
        @refresh-change="refreshChange"
        @on-load="onLoad"
        :row-style="rowStyle"
      >
        <template slot="menuLeft">
          <el-button
            type="danger"
            size="small"
            icon="el-icon-delete"
            plain
            v-if="permission.permit_delete"
            @click="handleDelete"
            >删 除
          </el-button>
        </template>
        <template slot-scope="{ type, size, row }" slot="menu">
          <el-button
            icon="icon-zhengjian"
            :size="size"
            :type="type"
            class="zhengJian-icon"
            @click.stop="handleCredentials(row)"
            >附件查阅
          </el-button>
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            @click.stop="rowDel(row)"
            v-if="row.type == '2'"
            >许可审批
          </el-button>
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            @click.stop="viewLicense(row)"
            v-if="row.type == '0'"
            >打印许可证
          </el-button>
        </template>
        <template class="tdtype" slot-scope="{ row }" slot="type">
          <el-tag class="dtype">
            {{
              row.type == "0" ? "通过" : row.type == "1" ? "不通过" : "待审核"
            }}
            <i class="gz" v-if="row.type == '0'"></i>
            <i class="yj" v-if="row.type == '1'"></i>
            <i class="zc" v-if="row.type == '2'"></i>
          </el-tag>
        </template>
      </avue-crud>
    </basic-container>
    <!-- <el-dialog
      :visible.sync="dialogVisible"
      :before-close="handleClose"
      :modal-append-to-body="false"
      width="1005px"
      top="10vh"
      class="printstyle"
    >
      <div id="licence_box">
        <div class="licence" id="licence" v-if="dialogVisible">
          <div class="licence-head">保安服务许可证</div>
          <div class="head-tid">
            洪公保服务
            <span class="fontStyle">{{
              licenceData.row.organizationcode
            }}</span>
            号
          </div>
          <div class="licence-main">
            <div
              class="l-m-once"
              v-for="(item, index, key) in licenceData.chiden"
              :key="key"
            >
              <span class="l-m-o-title"> {{ index }}: </span>
              <span class="l-m-r-once">{{ item }}</span>
            </div>
          </div>
          <div class="licence-bottom">发证机关(南昌市公安局)</div>
          <div class="l-bottom">
            发证日期
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(0, 4)
            }}</span
            >年
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(5, 7)
            }}</span>
            月
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(8, 10)
            }}</span>
            日
          </div>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="Print">打 印</el-button>
      </span>
    </el-dialog> -->
    <div
      v-if="dialogVisible"
      class="dialogVisibles"
      :class="classStyle == 'print' ? 'printstyle' : ''"
    >
      <div
        id="licence_box"
        :class="classStyle == 'print' ? 'printstyle' : ''"
        ref="licence"
      >
        <div class="licence" id="licence" v-if="dialogVisible">
          <div class="licence-head">保安服务许可证</div>
          <div class="head-tid">
            洪公保服务
            <span class="fontStyle">{{
              licenceData.row.organizationcode
            }}</span>
            号
          </div>
          <div class="licence-main">
            <div
              class="l-m-once"
              v-for="(item, index, key) in licenceData.chiden"
              :key="key"
            >
              <span class="l-m-o-title"> {{ index }}: </span>
              <span class="l-m-r-once">{{ item }}</span>
            </div>
          </div>
          <div class="licence-bottom">发证机关(南昌市公安局)</div>
          <div class="l-bottom">
            发证日期
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(0, 4)
            }}</span
            >年
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(5, 7)
            }}</span>
            月
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(8, 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>
    <el-dialog
      title=""
      :visible.sync="dialogVisiblecc"
      width="30%"
      :modal-append-to-body="false"
    >
      <div class="flots">
        <span class="f_title">是否通过审核?</span>
        <span class="f_body">请输入修改意见:</span>
        <textarea
          name="reworkmes"
          cols="40"
          rows="4"
          style="overflow: hidden"
          v-model="textareaShenpi"
        ></textarea>
        <div class="but">
          <el-button @click="closecc">通过</el-button>
          <el-button type="primary" @click="subcc">不通过</el-button>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import { getList, getDetail, add, update, remove } from "@/api/licenseApproval/revoke";
import { mapGetters } from "vuex";
export default {
  data() {
    return {
      classStyle: "print", //打印样式
      dialogVisiblecc: false, //许可证审核抽屉
      xukezData: {},
      dialogVisible: false, //许可证抽屉
      licenceData: {
        row: {},
        chiden: {},
      },
      textareaShenpi: "",
      form: {},
      query: {},
      loading: true,
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
      },
      selectionList: [],
      option: {
        height: "auto",
        calcHeight: 30,
        excelBtn: true,
        tip: false,
        searchShowBtn: false,
        searchShow: true,
        searchMenuSpan: 8,
        border: true,
        menuWidth: 300,
        labelWidth: 130,
        headerAlign: "center",
        align: "center",
        // border: false,
        index: true,
        viewBtn: true,
        selection: true,
        dialogClickModal: false,
        column: [
          {
            label: "企业名称",
            search: true,
            prop: "enterprisename",
            searchLabelWidth: 80,
            searchSpan: 4,
            overHidden: true,
            width: 250,
            rules: [
              {
                required: true,
                message: "请输入企业名称",
                trigger: "blur",
              },
            ],
          },
          {
            label: "社会信用代码",
            prop: "creditcode",
            hide: true,
            rules: [
              {
                required: true,
                message: "请输入统一社会信用代码",
                trigger: "blur",
              },
            ],
          },
          {
            label: "法定代表人",
            prop: "representative",
            width: 82,
            rules: [
              {
                required: true,
                message: "请输入法定代表人",
                trigger: "blur",
              },
            ],
          },
          {
            label: "法定代表人电话",
            width: 106,
            prop: "representativecell",
            rules: [
              {
                required: true,
                message: "请输入法定代表人电话",
                trigger: "blur",
              },
            ],
          },
          {
            label: "联系人",
            prop: "contacts",
            width: 58,
            rules: [
              {
                required: true,
                message: "请输入联系人",
                trigger: "blur",
              },
            ],
          },
          {
            label: "联系人电话",
            width: 96,
            prop: "contactscell",
            rules: [
              {
                required: true,
                message: "请输入联系人电话",
                trigger: "blur",
              },
            ],
          },
          {
            label: "注册时间",
            hide: true,
            prop: "establishtime",
            type: "date",
            format: "yyyy-MM-dd",
            valueFormat: "yyyy-MM-dd",
            rules: [
              {
                required: true,
                message: "请输入注册时间",
                trigger: "blur",
              },
            ],
          },
          {
            label: "注册资本",
            prop: "registeredcapital",
            rules: [
              {
                required: true,
                message: "请输入注册资本",
                trigger: "blur",
              },
            ],
          },
          {
            label: "组织机构代码",
            prop: "organizationcode",
            hide: true,
            rules: [
              {
                required: true,
                message: "请输入组织机构代码",
                trigger: "blur",
              },
            ],
          },
          {
            label: "工商注册号",
            hide: true,
            prop: "registrationnumber",
            rules: [
              {
                required: true,
                message: "请输入工商注册号",
                trigger: "blur",
              },
            ],
          },
          {
            label: "纳税人识别号",
            prop: "identificationnumber",
            hide: true,
            rules: [
              {
                required: true,
                message: "请输入纳税人识别号",
                trigger: "blur",
              },
            ],
          },
          {
            label: "企业类型",
            hide: true,
            prop: "enterprises",
            rules: [
              {
                required: true,
                message: "请输入企业类型",
                trigger: "blur",
              },
            ],
          },
          {
            label: "注册地址",
            prop: "address",
            overHidden: true,
            rules: [
              {
                required: true,
                message: "请输入注册地址",
                trigger: "blur",
              },
            ],
          },
          {
            label: "所属地区",
            hide: true,
            prop: "region",
            rules: [
              {
                required: true,
                message: "请输入所属地区",
                trigger: "blur",
              },
            ],
          },
          {
            label: "登记机关",
            prop: "registration",
            overHidden: true,
            rules: [
              {
                required: true,
                message: "请输入登记机关",
                trigger: "blur",
              },
            ],
          },
          {
            label: "所属行业",
            hide: true,
            prop: "industry",
            rules: [
              {
                required: true,
                message: "请输入所属行业",
                trigger: "blur",
              },
            ],
          },
          {
            label: "所属机构",
            prop: "deptid",
            addDisplay: false,
            type: "select",
            hide: true,
            dicUrl: "/api/blade-system/dept/selectIn",
            props: {
              label: "deptname",
              value: "deptid",
            },
          },
          {
            label: "许可类型",
            search: true,
            hide: true,
            prop: "ptype",
            type: "select",
            searchSpan: 4,
            dicData: [
              {
                label: "保安服务许可",
                value: "0",
              },
              {
                label: "保安培训许可",
                value: "1",
              },
            ],
          },
          {
            label: "提交时间",
            prop: "permitime",
            overHidden: true,
            addDisplay: false,
            width: 132,
            type: "date",
            format: "yyyy-MM-dd HH:mm:ss",
            valueFormat: "yyyy-MM-dd HH:mm:ss",
          },
          {
            label: "审核状态",
            prop: "type",
            addDisplay: false,
            type: "select",
            dicData: [
              {
                label: "通过",
                value: "0",
              },
              {
                label: "不通过",
                value: "1",
              },
              {
                label: "待审核",
                value: "2",
              },
            ],
          },
          {
            label: "经营范围",
            prop: "business",
            component: "AvueUeditor",
            hide: true,
            minRows: 6,
            span: 24,
            rules: [
              {
                required: true,
                message: "请输入经营范围",
                trigger: "blur",
              },
            ],
          },
        ],
      },
      data: [],
    };
  },
  computed: {
    ...mapGetters(["permission", "userInfo"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.permit_add, false),
        viewBtn: this.vaildData(this.permission.permit_view, true),
        delBtn: this.vaildData(this.permission.permit_delete, false),
        editBtn: this.vaildData(this.permission.permit_edit, false),
      };
    },
    ids() {
      let ids = [];
      this.selectionList.forEach((ele) => {
        ids.push(ele.id);
      });
      return ids.join(",");
    },
  },
  // mounted() {
  //     console.log(this.userInfo.dept_id);
  // },
  methods: {
    Print() {
      this.$Print(this.$refs.licence);
    },
    handleCredentials(row) {
      this.$router.push({
        path: "/attach/index",
        // redirect: { name: "foo" },
        // query: { row: row },
        query: { deptid: row.deptid, type: "0" },
        // params: { row: row.identificationnumber },
      });
    },
    rowSave(row, done, loading) {
      row.deptid = this.userInfo.dept_id;
      add(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          window.console.log(error);
        }
      );
    },
    rowUpdate(row, index, done, loading) {
      update(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          console.log(error);
        }
      );
    },
    rowDel(row) {
      this.dialogVisiblecc = true;
      this.xukezData = row;
    },
    closecc() {
      this.xukezData.type = "0";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      console.log(this.xukezData);
      update(this.xukezData);
      this.textareaShenpi = "";
    },
    subcc() {
      this.xukezData.type = "1";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      update(this.xukezData);
      this.textareaShenpi = "";
    },
    viewLicense(row) {
      //查看许可证
      this.licenceData.row = row;
      this.licenceData.chiden = {};
      this.licenceData.chiden["名称"] = row.enterprisename;
      this.licenceData.chiden["住所"] = row.address;
      this.licenceData.chiden["法定代表人"] = row.representative;
      this.licenceData.chiden["服务范围"] = row.industry;
      this.licenceData.chiden["注册资本"] = row.registeredcapital;
      this.licenceData.chiden["批准文号"] = row.registrationnumber;
      console.log(this.licenceData);
      this.dialogVisible = true;
    },
    closePrint() {
      this.dialogVisible = false;
    },
    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)) {
        getDetail(this.form.id).then((res) => {
          this.form = res.data.data;
        });
      }
      done();
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
    },
    selectionChange(list) {
      this.selectionList = list;
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
      this.loading = true;
      params["ptype"] = 4;
      getList(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        this.loading = false;
        this.selectionClear();
      });
    },
    rowStyle({ row }) {
      if (row.dtype != null && row.dtype != "") {
        if (row.dtype == "2") {
          return {
            color: "#F34A4A",
          };
        }
        if (row.dtype == "1") {
          return {
            color: "#F48F57",
          };
        }
      }
    },
  },
};
</script>
<style scoped lang="scss">
.dtype {
  width: 80px;
}
.dx {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #dfdfdf;
}
.zc {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #29c093;
}
.yj {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f34a4a;
}
.gz {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f48f57;
}
.el-tag {
  display: inline-block;
  width: 80px;
  /*padding-right: 40px !important;*/
}
#licence_box {
  position: relative;
  top: 15px;
  width: 1080px;
  height: 780px;
  background-color: #004ca7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.licence {
  width: 960px;
  height: 648px;
  background-color: #fff !important;
  background-image: url("../../static/img/permit/服务许可背景图.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-sizing: border-box;
  padding: 10%;
  color: #000;
}
.licence-head {
  width: 100%;
  height: 1.8rem;
  font-size: 1.8rem;
  text-align: center;
}
.head-tid {
  position: relative;
  left: 70%;
}
.head-tid span {
  margin: 0 1rem;
}
.licence-main {
  width: 80%;
}
.l-m-once {
  width: 100%;
  height: 2rem;
  margin-top: 1rem;
}
.l-m-o-title {
  font-size: 1.3rem;
  width: 22%;
  text-align: justify;
  display: inline-block;
}
.l-m-r-once {
  font-size: 1.1rem;
  /* border: 1px solid #000; */
  display: inline-block;
  width: 77%;
}
.licence-bottom,
.l-bottom {
  position: relative;
  left: 60%;
  font-size: 1.5rem;
  margin-top: 0.5rem;
}
.dialogVisibles {
  position: fixed;
  top: 0;
  left: -10%;
  height: 0;
  width: 120%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.printstyle {
  background-color: #fff !important;
}
.PrintBut {
  margin-top: 15px;
}
.flots {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  .f_title {
    position: absolute;
    top: 15px;
    font-size: 18px;
  }
}
.but {
  margin-top: 20px;
  width: 100%;
  display: flex;
  align-content: center;
  justify-content: center;
}
</style>
src/views/licenseApproval/crossRegion.vue
New file
@@ -0,0 +1,882 @@
/*
 * @Author:liu
 * @Date: 2021-08-26 16:59:35
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2021-08-26 17:09:23
 */
<template>
  <div>
    <basic-container class="permit">
      <avue-crud
        :option="option"
        :table-loading="loading"
        :data="data"
        :page.sync="page"
        :permission="permissionList"
        :before-open="beforeOpen"
        v-model="form"
        ref="crud"
        @row-update="rowUpdate"
        @row-save="rowSave"
        @row-del="rowDel"
        @search-change="searchChange"
        @search-reset="searchReset"
        @selection-change="selectionChange"
        @current-change="currentChange"
        @size-change="sizeChange"
        @refresh-change="refreshChange"
        @on-load="onLoad"
        :row-style="rowStyle"
      >
        <template slot="menuLeft">
          <el-button
            type="danger"
            size="small"
            icon="el-icon-delete"
            plain
            v-if="permission.permit_delete"
            @click="handleDelete"
            >删 除
          </el-button>
        </template>
        <template slot-scope="{ type, size, row }" slot="menu">
          <el-button
            icon="icon-zhengjian"
            :size="size"
            :type="type"
            class="zhengJian-icon"
            @click.stop="handleCredentials(row)"
            >附件查阅
          </el-button>
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            @click.stop="rowDel(row)"
            v-if="row.type == '2'"
            >许可审批
          </el-button>
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            @click.stop="viewLicense(row)"
            v-if="row.type == '0'"
            >打印许可证
          </el-button>
        </template>
        <template class="tdtype" slot-scope="{ row }" slot="type">
          <el-tag class="dtype">
            {{
              row.type == "0" ? "通过" : row.type == "1" ? "不通过" : "待审核"
            }}
            <i class="gz" v-if="row.type == '0'"></i>
            <i class="yj" v-if="row.type == '1'"></i>
            <i class="zc" v-if="row.type == '2'"></i>
          </el-tag>
        </template>
      </avue-crud>
    </basic-container>
    <!-- <el-dialog
      :visible.sync="dialogVisible"
      :before-close="handleClose"
      :modal-append-to-body="false"
      width="1005px"
      top="10vh"
      class="printstyle"
    >
      <div id="licence_box">
        <div class="licence" id="licence" v-if="dialogVisible">
          <div class="licence-head">保安服务许可证</div>
          <div class="head-tid">
            洪公保服务
            <span class="fontStyle">{{
              licenceData.row.organizationcode
            }}</span>
            号
          </div>
          <div class="licence-main">
            <div
              class="l-m-once"
              v-for="(item, index, key) in licenceData.chiden"
              :key="key"
            >
              <span class="l-m-o-title"> {{ index }}: </span>
              <span class="l-m-r-once">{{ item }}</span>
            </div>
          </div>
          <div class="licence-bottom">发证机关(南昌市公安局)</div>
          <div class="l-bottom">
            发证日期
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(0, 4)
            }}</span
            >年
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(5, 7)
            }}</span>
            月
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(8, 10)
            }}</span>
            日
          </div>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="Print">打 印</el-button>
      </span>
    </el-dialog> -->
    <div
      v-if="dialogVisible"
      class="dialogVisibles"
      :class="classStyle == 'print' ? 'printstyle' : ''"
    >
      <div
        id="licence_box"
        :class="classStyle == 'print' ? 'printstyle' : ''"
        ref="licence"
      >
        <div class="licence" id="licence" v-if="dialogVisible">
          <div class="licence-head">保安服务许可证</div>
          <div class="head-tid">
            洪公保服务
            <span class="fontStyle">{{
              licenceData.row.organizationcode
            }}</span>
            号
          </div>
          <div class="licence-main">
            <div
              class="l-m-once"
              v-for="(item, index, key) in licenceData.chiden"
              :key="key"
            >
              <span class="l-m-o-title"> {{ index }}: </span>
              <span class="l-m-r-once">{{ item }}</span>
            </div>
          </div>
          <div class="licence-bottom">发证机关(南昌市公安局)</div>
          <div class="l-bottom">
            发证日期
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(0, 4)
            }}</span
            >年
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(5, 7)
            }}</span>
            月
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(8, 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>
    <el-dialog
      title=""
      :visible.sync="dialogVisiblecc"
      width="30%"
      :modal-append-to-body="false"
    >
      <div class="flots">
        <span class="f_title">是否通过审核?</span>
        <span class="f_body">请输入修改意见:</span>
        <textarea
          name="reworkmes"
          cols="40"
          rows="4"
          style="overflow: hidden"
          v-model="textareaShenpi"
        ></textarea>
        <div class="but">
          <el-button @click="closecc">通过</el-button>
          <el-button type="primary" @click="subcc">不通过</el-button>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import { getList, getDetail, add, update, remove } from "@/api/licenseApproval/recordk";
import { mapGetters } from "vuex";
export default {
  data() {
    return {
      classStyle: "print", //打印样式
      dialogVisiblecc: false, //许可证审核抽屉
      xukezData: {},
      dialogVisible: false, //许可证抽屉
      licenceData: {
        row: {},
        chiden: {},
      },
      textareaShenpi: "",
      form: {},
      query: {},
      loading: true,
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
      },
      selectionList: [],
      option: {
        height: "auto",
        calcHeight: 30,
        excelBtn: true,
        tip: false,
        searchShowBtn: false,
        searchShow: true,
        searchMenuSpan: 8,
        border: true,
        menuWidth: 300,
        labelWidth: 130,
        headerAlign: "center",
        align: "center",
        // border: false,
        index: true,
        viewBtn: true,
        selection: true,
        dialogClickModal: false,
        column: [
          {
            label: "企业名称",
            search: true,
            prop: "enterprisename",
            searchLabelWidth: 80,
            searchSpan: 4,
            overHidden: true,
            width: 250,
            rules: [
              {
                required: true,
                message: "请输入企业名称",
                trigger: "blur",
              },
            ],
          },
          {
            label: "社会信用代码",
            prop: "creditcode",
            hide: true,
            rules: [
              {
                required: true,
                message: "请输入统一社会信用代码",
                trigger: "blur",
              },
            ],
          },
          {
            label: "法定代表人",
            prop: "representative",
            width: 82,
            rules: [
              {
                required: true,
                message: "请输入法定代表人",
                trigger: "blur",
              },
            ],
          },
          {
            label: "法定代表人电话",
            width: 106,
            prop: "representativecell",
            rules: [
              {
                required: true,
                message: "请输入法定代表人电话",
                trigger: "blur",
              },
            ],
          },
          {
            label: "联系人",
            prop: "contacts",
            width: 58,
            rules: [
              {
                required: true,
                message: "请输入联系人",
                trigger: "blur",
              },
            ],
          },
          {
            label: "联系人电话",
            width: 96,
            prop: "contactscell",
            rules: [
              {
                required: true,
                message: "请输入联系人电话",
                trigger: "blur",
              },
            ],
          },
          {
            label: "注册时间",
            hide: true,
            prop: "establishtime",
            type: "date",
            format: "yyyy-MM-dd",
            valueFormat: "yyyy-MM-dd",
            rules: [
              {
                required: true,
                message: "请输入注册时间",
                trigger: "blur",
              },
            ],
          },
          {
            label: "注册资本",
            prop: "registeredcapital",
            rules: [
              {
                required: true,
                message: "请输入注册资本",
                trigger: "blur",
              },
            ],
          },
          {
            label: "组织机构代码",
            prop: "organizationcode",
            hide: true,
            rules: [
              {
                required: true,
                message: "请输入组织机构代码",
                trigger: "blur",
              },
            ],
          },
          {
            label: "工商注册号",
            hide: true,
            prop: "registrationnumber",
            rules: [
              {
                required: true,
                message: "请输入工商注册号",
                trigger: "blur",
              },
            ],
          },
          {
            label: "纳税人识别号",
            prop: "identificationnumber",
            hide: true,
            rules: [
              {
                required: true,
                message: "请输入纳税人识别号",
                trigger: "blur",
              },
            ],
          },
          {
            label: "企业类型",
            hide: true,
            prop: "enterprises",
            rules: [
              {
                required: true,
                message: "请输入企业类型",
                trigger: "blur",
              },
            ],
          },
          {
            label: "注册地址",
            prop: "address",
            overHidden: true,
            rules: [
              {
                required: true,
                message: "请输入注册地址",
                trigger: "blur",
              },
            ],
          },
          {
            label: "所属地区",
            hide: true,
            prop: "region",
            rules: [
              {
                required: true,
                message: "请输入所属地区",
                trigger: "blur",
              },
            ],
          },
          {
            label: "登记机关",
            prop: "registration",
            overHidden: true,
            rules: [
              {
                required: true,
                message: "请输入登记机关",
                trigger: "blur",
              },
            ],
          },
          {
            label: "所属行业",
            hide: true,
            prop: "industry",
            rules: [
              {
                required: true,
                message: "请输入所属行业",
                trigger: "blur",
              },
            ],
          },
          {
            label: "所属机构",
            prop: "deptid",
            addDisplay: false,
            type: "select",
            hide: true,
            dicUrl: "/api/blade-system/dept/selectIn",
            props: {
              label: "deptname",
              value: "deptid",
            },
          },
          {
            label: "许可类型",
            search: true,
            hide: true,
            prop: "ptype",
            type: "select",
            searchSpan: 4,
            dicData: [
              {
                label: "保安服务许可",
                value: "0",
              },
              {
                label: "保安培训许可",
                value: "1",
              },
            ],
          },
          {
            label: "提交时间",
            prop: "permitime",
            overHidden: true,
            addDisplay: false,
            width: 132,
            type: "date",
            format: "yyyy-MM-dd HH:mm:ss",
            valueFormat: "yyyy-MM-dd HH:mm:ss",
          },
          {
            label: "审核状态",
            prop: "type",
            addDisplay: false,
            type: "select",
            dicData: [
              {
                label: "通过",
                value: "0",
              },
              {
                label: "不通过",
                value: "1",
              },
              {
                label: "待审核",
                value: "2",
              },
            ],
          },
          {
            label: "经营范围",
            prop: "business",
            component: "AvueUeditor",
            hide: true,
            minRows: 6,
            span: 24,
            rules: [
              {
                required: true,
                message: "请输入经营范围",
                trigger: "blur",
              },
            ],
          },
        ],
      },
      data: [],
    };
  },
  computed: {
    ...mapGetters(["permission", "userInfo"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.permit_add, false),
        viewBtn: this.vaildData(this.permission.permit_view, true),
        delBtn: this.vaildData(this.permission.permit_delete, false),
        editBtn: this.vaildData(this.permission.permit_edit, false),
      };
    },
    ids() {
      let ids = [];
      this.selectionList.forEach((ele) => {
        ids.push(ele.id);
      });
      return ids.join(",");
    },
  },
  // mounted() {
  //     console.log(this.userInfo.dept_id);
  // },
  methods: {
    Print() {
      this.$Print(this.$refs.licence);
    },
    handleCredentials(row) {
      this.$router.push({
        path: "/attach/index",
        // redirect: { name: "foo" },
        // query: { row: row },
        query: { deptid: row.deptid, type: "0" },
        // params: { row: row.identificationnumber },
      });
    },
    rowSave(row, done, loading) {
      row.deptid = this.userInfo.dept_id;
      add(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          window.console.log(error);
        }
      );
    },
    rowUpdate(row, index, done, loading) {
      update(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          console.log(error);
        }
      );
    },
    rowDel(row) {
      this.dialogVisiblecc = true;
      this.xukezData = row;
    },
    closecc() {
      this.xukezData.type = "0";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      console.log(this.xukezData);
      update(this.xukezData);
      this.textareaShenpi = "";
    },
    subcc() {
      this.xukezData.type = "1";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      update(this.xukezData);
      this.textareaShenpi = "";
    },
    viewLicense(row) {
      //查看许可证
      this.licenceData.row = row;
      this.licenceData.chiden = {};
      this.licenceData.chiden["名称"] = row.enterprisename;
      this.licenceData.chiden["住所"] = row.address;
      this.licenceData.chiden["法定代表人"] = row.representative;
      this.licenceData.chiden["服务范围"] = row.industry;
      this.licenceData.chiden["注册资本"] = row.registeredcapital;
      this.licenceData.chiden["批准文号"] = row.registrationnumber;
      console.log(this.licenceData);
      this.dialogVisible = true;
    },
    closePrint() {
      this.dialogVisible = false;
    },
    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)) {
        getDetail(this.form.id).then((res) => {
          this.form = res.data.data;
        });
      }
      done();
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
    },
    selectionChange(list) {
      this.selectionList = list;
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
      this.loading = true;
      params["ptype"] = 5;
      getList(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        this.loading = false;
        this.selectionClear();
      });
    },
    rowStyle({ row }) {
      if (row.dtype != null && row.dtype != "") {
        if (row.dtype == "2") {
          return {
            color: "#F34A4A",
          };
        }
        if (row.dtype == "1") {
          return {
            color: "#F48F57",
          };
        }
      }
    },
  },
};
</script>
<style scoped lang="scss">
.dtype {
  width: 80px;
}
.dx {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #dfdfdf;
}
.zc {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #29c093;
}
.yj {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f34a4a;
}
.gz {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f48f57;
}
.el-tag {
  display: inline-block;
  width: 80px;
  /*padding-right: 40px !important;*/
}
#licence_box {
  position: relative;
  top: 15px;
  width: 1080px;
  height: 780px;
  background-color: #004ca7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.licence {
  width: 960px;
  height: 648px;
  background-color: #fff !important;
  background-image: url("../../static/img/permit/服务许可背景图.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-sizing: border-box;
  padding: 10%;
  color: #000;
}
.licence-head {
  width: 100%;
  height: 1.8rem;
  font-size: 1.8rem;
  text-align: center;
}
.head-tid {
  position: relative;
  left: 70%;
}
.head-tid span {
  margin: 0 1rem;
}
.licence-main {
  width: 80%;
}
.l-m-once {
  width: 100%;
  height: 2rem;
  margin-top: 1rem;
}
.l-m-o-title {
  font-size: 1.3rem;
  width: 22%;
  text-align: justify;
  display: inline-block;
}
.l-m-r-once {
  font-size: 1.1rem;
  /* border: 1px solid #000; */
  display: inline-block;
  width: 77%;
}
.licence-bottom,
.l-bottom {
  position: relative;
  left: 60%;
  font-size: 1.5rem;
  margin-top: 0.5rem;
}
.dialogVisibles {
  position: fixed;
  top: 0;
  left: -10%;
  height: 0;
  width: 120%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.printstyle {
  background-color: #fff !important;
}
.PrintBut {
  margin-top: 15px;
}
.flots {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  .f_title {
    position: absolute;
    top: 15px;
    font-size: 18px;
  }
}
.but {
  margin-top: 20px;
  width: 100%;
  display: flex;
  align-content: center;
  justify-content: center;
}
</style>
src/views/licenseApproval/securityGuard.vue
New file
@@ -0,0 +1,828 @@
/*
 * @Author: liu
 * @Date: 2021-08-26 16:57:58
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2021-08-26 17:54:06
 */
<template>
  <div>
    <basic-container class="permit">
      <avue-crud
        :option="option"
        :table-loading="loading"
        :data="data"
        :page.sync="page"
        :permission="permissionList"
        :before-open="beforeOpen"
        v-model="form"
        ref="crud"
        @row-update="rowUpdate"
        @row-save="rowSave"
        @row-del="rowDel"
        @search-change="searchChange"
        @search-reset="searchReset"
        @selection-change="selectionChange"
        @current-change="currentChange"
        @size-change="sizeChange"
        @refresh-change="refreshChange"
        @on-load="onLoad"
        :row-style="rowStyle"
      >
        <template slot="menuLeft">
          <el-button
            type="danger"
            size="small"
            icon="el-icon-delete"
            plain
            v-if="permission.permit_delete"
            @click="handleDelete"
            >删 除
          </el-button>
        </template>
        <template slot-scope="{ type, size, row }" slot="menu">
          <el-button
            icon="icon-zhengjian"
            :size="size"
            :type="type"
            class="zhengJian-icon"
            @click.stop="handleCredentials(row)"
            >附件审查</el-button
          >
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            v-if="row.type == '2'"
            @click.stop="rowDel(row)"
            >备案审批
          </el-button>
        </template>
        <template class="tdtype" slot-scope="{ row }" slot="type">
          <el-tag class="dtype">
            {{
              row.type == "0" ? "通过" : row.type == "1" ? "不通过" : "待审核"
            }}
            <i class="gz" v-if="row.type == '0'"></i>
            <i class="yj" v-if="row.type == '1'"></i>
            <i class="zc" v-if="row.type == '2'"></i>
          </el-tag>
        </template>
      </avue-crud>
    </basic-container>
    <div
      v-if="dialogVisible"
      class="dialogVisibles"
      :class="classStyle == 'print' ? 'printstyle' : ''"
    >
      <div
        id="licence_box"
        :class="classStyle == 'print' ? 'printstyle' : ''"
        ref="licence"
      >
        <div class="licence" id="licence" v-if="dialogVisible">
          <div class="licence-head">保安服务许可证</div>
          <div class="head-tid">
            洪公保服务
            <span class="fontStyle">{{
              licenceData.row.organizationcode
            }}</span>
            号
          </div>
          <div class="licence-main">
            <div
              class="l-m-once"
              v-for="(item, index, key) in licenceData.chiden"
              :key="key"
            >
              <span class="l-m-o-title"> {{ index }}: </span>
              <span class="l-m-r-once">{{ item }}</span>
            </div>
          </div>
          <div class="licence-bottom">发证机关(南昌市公安局)</div>
          <div class="l-bottom">
            发证日期
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(0, 4)
            }}</span
            >年
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(5, 7)
            }}</span>
            月
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(8, 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>
    <el-dialog
      title=""
      :visible.sync="dialogVisiblecc"
      width="30%"
      :modal-append-to-body="false"
    >
      <div class="flots">
        <span class="f_title">是否通过审核?</span>
        <span class="f_body">请输入修改意见:</span>
        <textarea
          name="reworkmes"
          cols="40"
          rows="4"
          style="overflow: hidden"
          v-model="textareaShenpi"
        ></textarea>
        <div class="but">
          <el-button @click="closecc">通过</el-button>
          <el-button type="primary" @click="subcc">不通过</el-button>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import {
  getList,
  getDetail,
  add,
  update,
  remove,
} from "@/api/licenseApproval/record";
import { mapGetters } from "vuex";
export default {
  data() {
    return {
      classStyle: "print", //打印样式
      dialogVisiblecc: false, //许可证审核抽屉
      xukezData: {},
      dialogVisible: false, //许可证抽屉
      licenceData: {
        row: {},
        chiden: {},
      },
      textareaShenpi: "",
      form: {},
      query: {},
      loading: true,
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
      },
      selectionList: [],
      option: {
        height: "auto",
        calcHeight: 30,
        excelBtn: true,
        tip: false,
        searchShowBtn: false,
        searchShow: true,
        searchMenuSpan: 8,
        border: true,
        menuWidth: 300,
        labelWidth: 130,
        headerAlign: "center",
        align: "center",
        // border: false,
        index: true,
        viewBtn: true,
        selection: true,
        dialogClickModal: false,
        column: [
          {
            label: "企业名称",
            search: true,
            prop: "enterprisename",
            searchLabelWidth: 80,
            searchSpan: 4,
            overHidden: true,
            width: 250,
            rules: [
              {
                required: true,
                message: "请输入企业名称",
                trigger: "blur",
              },
            ],
          },
          {
            label: "社会信用代码",
            prop: "creditcode",
            hide: true,
            rules: [
              {
                required: true,
                message: "请输入统一社会信用代码",
                trigger: "blur",
              },
            ],
          },
          {
            label: "法定代表人",
            prop: "representative",
            width: 82,
            rules: [
              {
                required: true,
                message: "请输入法定代表人",
                trigger: "blur",
              },
            ],
          },
          {
            label: "法定代表人电话",
            width: 106,
            prop: "representativecell",
            rules: [
              {
                required: true,
                message: "请输入法定代表人电话",
                trigger: "blur",
              },
            ],
          },
          {
            label: "联系人",
            prop: "contacts",
            width: 58,
            rules: [
              {
                required: true,
                message: "请输入联系人",
                trigger: "blur",
              },
            ],
          },
          {
            label: "联系人电话",
            width: 96,
            prop: "contactscell",
            rules: [
              {
                required: true,
                message: "请输入联系人电话",
                trigger: "blur",
              },
            ],
          },
          {
            label: "注册时间",
            hide: true,
            prop: "establishtime",
            type: "date",
            format: "yyyy-MM-dd",
            valueFormat: "yyyy-MM-dd",
            rules: [
              {
                required: true,
                message: "请输入注册时间",
                trigger: "blur",
              },
            ],
          },
          {
            label: "注册资本",
            prop: "registeredcapital",
            rules: [
              {
                required: true,
                message: "请输入注册资本",
                trigger: "blur",
              },
            ],
          },
          {
            label: "组织机构代码",
            prop: "organizationcode",
            hide: true,
            rules: [
              {
                required: true,
                message: "请输入组织机构代码",
                trigger: "blur",
              },
            ],
          },
          {
            label: "工商注册号",
            hide: true,
            prop: "registrationnumber",
            rules: [
              {
                required: true,
                message: "请输入工商注册号",
                trigger: "blur",
              },
            ],
          },
          {
            label: "纳税人识别号",
            prop: "identificationnumber",
            hide: true,
            rules: [
              {
                required: true,
                message: "请输入纳税人识别号",
                trigger: "blur",
              },
            ],
          },
          {
            label: "企业类型",
            hide: true,
            prop: "enterprises",
            rules: [
              {
                required: true,
                message: "请输入企业类型",
                trigger: "blur",
              },
            ],
          },
          {
            label: "注册地址",
            prop: "address",
            overHidden: true,
            rules: [
              {
                required: true,
                message: "请输入注册地址",
                trigger: "blur",
              },
            ],
          },
          {
            label: "所属地区",
            hide: true,
            prop: "region",
            rules: [
              {
                required: true,
                message: "请输入所属地区",
                trigger: "blur",
              },
            ],
          },
          {
            label: "登记机关",
            prop: "registration",
            overHidden: true,
            rules: [
              {
                required: true,
                message: "请输入登记机关",
                trigger: "blur",
              },
            ],
          },
          {
            label: "所属行业",
            hide: true,
            prop: "industry",
            rules: [
              {
                required: true,
                message: "请输入所属行业",
                trigger: "blur",
              },
            ],
          },
          {
            label: "所属机构",
            prop: "deptid",
            addDisplay: false,
            type: "select",
            hide: true,
            dicUrl: "/api/blade-system/dept/selectIn",
            props: {
              label: "deptname",
              value: "deptid",
            },
          },
          {
            label: "许可类型",
            search: true,
            hide: true,
            prop: "ptype",
            type: "select",
            searchSpan: 4,
            dicData: [
              {
                label: "保安服务许可",
                value: "0",
              },
              {
                label: "保安培训许可",
                value: "1",
              },
            ],
          },
          {
            label: "提交时间",
            prop: "permitime",
            overHidden: true,
            addDisplay: false,
            width: 132,
            type: "date",
            format: "yyyy-MM-dd HH:mm:ss",
            valueFormat: "yyyy-MM-dd HH:mm:ss",
          },
          {
            label: "审核状态",
            prop: "type",
            addDisplay: false,
            type: "select",
            dicData: [
              {
                label: "通过",
                value: "0",
              },
              {
                label: "不通过",
                value: "1",
              },
              {
                label: "待审核",
                value: "2",
              },
            ],
          },
          {
            label: "经营范围",
            prop: "business",
            component: "AvueUeditor",
            hide: true,
            minRows: 6,
            span: 24,
            rules: [
              {
                required: true,
                message: "请输入经营范围",
                trigger: "blur",
              },
            ],
          },
        ],
      },
      data: [],
    };
  },
  computed: {
    ...mapGetters(["permission", "userInfo"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.permit_add, false),
        viewBtn: this.vaildData(this.permission.permit_view, true),
        delBtn: this.vaildData(this.permission.permit_delete, false),
        editBtn: this.vaildData(this.permission.permit_edit, false),
      };
    },
    ids() {
      let ids = [];
      this.selectionList.forEach((ele) => {
        ids.push(ele.id);
      });
      return ids.join(",");
    },
  },
  // mounted() {
  //     console.log(this.userInfo.dept_id);
  // },
  methods: {
    Print() {
      this.$Print(this.$refs.licence);
    },
    handleCredentials(row) {
      this.$router.push({
        path: "/attach/index",
        // redirect: { name: "foo" },
        // query: { row: row },
        query: { deptid: row.deptid, type: "0" },
        // params: { row: row.identificationnumber },
      });
    },
    rowSave(row, done, loading) {
      row.deptid = this.userInfo.dept_id;
      add(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          window.console.log(error);
        }
      );
    },
    rowUpdate(row, index, done, loading) {
      update(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          console.log(error);
        }
      );
    },
    rowDel(row) {
      this.dialogVisiblecc = true;
      this.xukezData = row;
    },
    closecc() {
      this.xukezData.type = "0";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      console.log(this.xukezData);
      update(this.xukezData);
      this.textareaShenpi = "";
    },
    subcc() {
      this.xukezData.type = "1";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      update(this.xukezData);
      this.textareaShenpi = "";
    },
    viewLicense(row) {
      //查看许可证
      this.licenceData.row = row;
      this.licenceData.chiden = {};
      this.licenceData.chiden["名称"] = row.enterprisename;
      this.licenceData.chiden["住所"] = row.address;
      this.licenceData.chiden["法定代表人"] = row.representative;
      this.licenceData.chiden["服务范围"] = row.industry;
      this.licenceData.chiden["注册资本"] = row.registeredcapital;
      this.licenceData.chiden["批准文号"] = row.registrationnumber;
      console.log(this.licenceData);
      this.dialogVisible = true;
    },
    closePrint() {
      this.dialogVisible = false;
    },
    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)) {
        getDetail(this.form.id).then((res) => {
          this.form = res.data.data;
        });
      }
      done();
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
    },
    selectionChange(list) {
      this.selectionList = list;
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
      this.loading = true;
      params["ptype"] = 3;
      getList(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        this.loading = false;
        this.selectionClear();
      });
    },
    rowStyle({ row }) {
      if (row.dtype != null && row.dtype != "") {
        if (row.dtype == "2") {
          return {
            color: "#F34A4A",
          };
        }
        if (row.dtype == "1") {
          return {
            color: "#F48F57",
          };
        }
      }
    },
  },
};
</script>
<style scoped lang="scss">
.dtype {
  width: 80px;
}
.dx {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #dfdfdf;
}
.zc {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #29c093;
}
.yj {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f34a4a;
}
.gz {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f48f57;
}
.el-tag {
  display: inline-block;
  width: 80px;
  /*padding-right: 40px !important;*/
}
#licence_box {
  position: relative;
  top: 15px;
  width: 1080px;
  height: 780px;
  background-color: #004ca7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.licence {
  width: 960px;
  height: 648px;
  background-color: #fff !important;
  background-image: url("../../static/img/permit/服务许可背景图.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-sizing: border-box;
  padding: 10%;
  color: #000;
}
.licence-head {
  width: 100%;
  height: 1.8rem;
  font-size: 1.8rem;
  text-align: center;
}
.head-tid {
  position: relative;
  left: 70%;
}
.head-tid span {
  margin: 0 1rem;
}
.licence-main {
  width: 80%;
}
.l-m-once {
  width: 100%;
  height: 2rem;
  margin-top: 1rem;
}
.l-m-o-title {
  font-size: 1.3rem;
  width: 22%;
  text-align: justify;
  display: inline-block;
}
.l-m-r-once {
  font-size: 1.1rem;
  /* border: 1px solid #000; */
  display: inline-block;
  width: 77%;
}
.licence-bottom,
.l-bottom {
  position: relative;
  left: 60%;
  font-size: 1.5rem;
  margin-top: 0.5rem;
}
.dialogVisibles {
  position: fixed;
  top: 0;
  left: -10%;
  height: 0;
  width: 120%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.printstyle {
  background-color: #fff !important;
}
.PrintBut {
  margin-top: 15px;
}
.flots {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  .f_title {
    position: absolute;
    top: 15px;
    font-size: 18px;
  }
}
.but {
  margin-top: 20px;
  width: 100%;
  display: flex;
  align-content: center;
  justify-content: center;
}
</style>
src/views/licenseApproval/securityPermit.vue
New file
@@ -0,0 +1,888 @@
/*
 * @Author: liu
 * @Date: 2021-08-26 16:22:20
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2021-08-26 20:44:35
 */
<template>
  <div>
    <basic-container class="permit">
      <avue-crud
        :option="option"
        :table-loading="loading"
        :data="data"
        :page.sync="page"
        :permission="permissionList"
        :before-open="beforeOpen"
        v-model="form"
        ref="crud"
        @row-update="rowUpdate"
        @row-save="rowSave"
        @row-del="rowDel"
        @search-change="searchChange"
        @search-reset="searchReset"
        @selection-change="selectionChange"
        @current-change="currentChange"
        @size-change="sizeChange"
        @refresh-change="refreshChange"
        @on-load="onLoad"
        :row-style="rowStyle"
      >
        <template slot="menuLeft">
          <el-button
            type="danger"
            size="small"
            icon="el-icon-delete"
            plain
            v-if="permission.permit_delete"
            @click="handleDelete"
            >删 除
          </el-button>
        </template>
        <template slot-scope="{ type, size, row }" slot="menu">
          <el-button
            icon="icon-zhengjian"
            :size="size"
            :type="type"
            class="zhengJian-icon"
            @click.stop="handleCredentials(row)"
            >附件查阅
          </el-button>
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            @click.stop="rowDel(row)"
            v-if="row.type == '2'"
            >许可审批
          </el-button>
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            @click.stop="viewLicense(row)"
            v-if="row.type == '0'"
            >打印许可证
          </el-button>
        </template>
        <template class="tdtype" slot-scope="{ row }" slot="type">
          <el-tag class="dtype">
            {{
              row.type == "0" ? "通过" : row.type == "1" ? "不通过" : "待审核"
            }}
            <i class="gz" v-if="row.type == '0'"></i>
            <i class="yj" v-if="row.type == '1'"></i>
            <i class="zc" v-if="row.type == '2'"></i>
          </el-tag>
        </template>
      </avue-crud>
    </basic-container>
    <!-- <el-dialog
      :visible.sync="dialogVisible"
      :before-close="handleClose"
      :modal-append-to-body="false"
      width="1005px"
      top="10vh"
      class="printstyle"
    >
      <div id="licence_box">
        <div class="licence" id="licence" v-if="dialogVisible">
          <div class="licence-head">保安服务许可证</div>
          <div class="head-tid">
            洪公保服务
            <span class="fontStyle">{{
              licenceData.row.organizationcode
            }}</span>
            号
          </div>
          <div class="licence-main">
            <div
              class="l-m-once"
              v-for="(item, index, key) in licenceData.chiden"
              :key="key"
            >
              <span class="l-m-o-title"> {{ index }}: </span>
              <span class="l-m-r-once">{{ item }}</span>
            </div>
          </div>
          <div class="licence-bottom">发证机关(南昌市公安局)</div>
          <div class="l-bottom">
            发证日期
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(0, 4)
            }}</span
            >年
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(5, 7)
            }}</span>
            月
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(8, 10)
            }}</span>
            日
          </div>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="Print">打 印</el-button>
      </span>
    </el-dialog> -->
    <div
      v-if="dialogVisible"
      class="dialogVisibles"
      :class="classStyle == 'print' ? 'printstyle' : ''"
    >
      <div
        id="licence_box"
        :class="classStyle == 'print' ? 'printstyle' : ''"
        ref="licence"
      >
        <div class="licence" id="licence" v-if="dialogVisible">
          <div class="licence-head">保安服务许可证</div>
          <div class="head-tid">
            洪公保服务
            <span class="fontStyle">{{
              licenceData.row.organizationcode
            }}</span>
            号
          </div>
          <div class="licence-main">
            <div
              class="l-m-once"
              v-for="(item, index, key) in licenceData.chiden"
              :key="key"
            >
              <span class="l-m-o-title"> {{ index }}: </span>
              <span class="l-m-r-once">{{ item }}</span>
            </div>
          </div>
          <div class="licence-bottom">发证机关(南昌市公安局)</div>
          <div class="l-bottom">
            发证日期
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(0, 4)
            }}</span
            >年
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(5, 7)
            }}</span>
            月
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(8, 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>
    <el-dialog
      title=""
      :visible.sync="dialogVisiblecc"
      width="30%"
      :modal-append-to-body="false"
    >
      <div class="flots">
        <span class="f_title">是否通过审核?</span>
        <span class="f_body">请输入修改意见:</span>
        <textarea
          name="reworkmes"
          cols="40"
          rows="4"
          style="overflow: hidden"
          v-model="textareaShenpi"
        ></textarea>
        <div class="but">
          <el-button @click="closecc">通过</el-button>
          <el-button type="primary" @click="subcc">不通过</el-button>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import {
  getList,
  getDetail,
  add,
  update,
  remove,
} from "@/api/licenseApproval/permit";
import { mapGetters } from "vuex";
export default {
  data() {
    return {
      classStyle: "print", //打印样式
      dialogVisiblecc: false, //许可证审核抽屉
      xukezData: {},
      dialogVisible: false, //许可证抽屉
      licenceData: {
        row: {},
        chiden: {},
      },
      textareaShenpi: "",
      form: {},
      query: {},
      loading: true,
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
      },
      selectionList: [],
      option: {
        height: "auto",
        calcHeight: 30,
        excelBtn: true,
        tip: false,
        searchShowBtn: false,
        searchShow: true,
        searchMenuSpan: 8,
        border: true,
        menuWidth: 300,
        labelWidth: 130,
        headerAlign: "center",
        align: "center",
        // border: false,
        index: true,
        viewBtn: true,
        selection: true,
        dialogClickModal: false,
        column: [
          {
            label: "企业名称",
            search: true,
            prop: "enterprisename",
            searchLabelWidth: 80,
            searchSpan: 4,
            overHidden: true,
            width: 250,
            rules: [
              {
                required: true,
                message: "请输入企业名称",
                trigger: "blur",
              },
            ],
          },
          {
            label: "社会信用代码",
            prop: "creditcode",
            hide: true,
            rules: [
              {
                required: true,
                message: "请输入统一社会信用代码",
                trigger: "blur",
              },
            ],
          },
          {
            label: "法定代表人",
            prop: "representative",
            width: 82,
            rules: [
              {
                required: true,
                message: "请输入法定代表人",
                trigger: "blur",
              },
            ],
          },
          {
            label: "法定代表人电话",
            width: 106,
            prop: "representativecell",
            rules: [
              {
                required: true,
                message: "请输入法定代表人电话",
                trigger: "blur",
              },
            ],
          },
          {
            label: "联系人",
            prop: "contacts",
            width: 58,
            rules: [
              {
                required: true,
                message: "请输入联系人",
                trigger: "blur",
              },
            ],
          },
          {
            label: "联系人电话",
            width: 96,
            prop: "contactscell",
            rules: [
              {
                required: true,
                message: "请输入联系人电话",
                trigger: "blur",
              },
            ],
          },
          {
            label: "注册时间",
            hide: true,
            prop: "establishtime",
            type: "date",
            format: "yyyy-MM-dd",
            valueFormat: "yyyy-MM-dd",
            rules: [
              {
                required: true,
                message: "请输入注册时间",
                trigger: "blur",
              },
            ],
          },
          {
            label: "注册资本",
            prop: "registeredcapital",
            rules: [
              {
                required: true,
                message: "请输入注册资本",
                trigger: "blur",
              },
            ],
          },
          {
            label: "组织机构代码",
            prop: "organizationcode",
            hide: true,
            rules: [
              {
                required: true,
                message: "请输入组织机构代码",
                trigger: "blur",
              },
            ],
          },
          {
            label: "工商注册号",
            hide: true,
            prop: "registrationnumber",
            rules: [
              {
                required: true,
                message: "请输入工商注册号",
                trigger: "blur",
              },
            ],
          },
          {
            label: "纳税人识别号",
            prop: "identificationnumber",
            hide: true,
            rules: [
              {
                required: true,
                message: "请输入纳税人识别号",
                trigger: "blur",
              },
            ],
          },
          {
            label: "企业类型",
            hide: true,
            prop: "enterprises",
            rules: [
              {
                required: true,
                message: "请输入企业类型",
                trigger: "blur",
              },
            ],
          },
          {
            label: "注册地址",
            prop: "address",
            overHidden: true,
            rules: [
              {
                required: true,
                message: "请输入注册地址",
                trigger: "blur",
              },
            ],
          },
          {
            label: "所属地区",
            hide: true,
            prop: "region",
            rules: [
              {
                required: true,
                message: "请输入所属地区",
                trigger: "blur",
              },
            ],
          },
          {
            label: "登记机关",
            prop: "registration",
            overHidden: true,
            rules: [
              {
                required: true,
                message: "请输入登记机关",
                trigger: "blur",
              },
            ],
          },
          {
            label: "所属行业",
            hide: true,
            prop: "industry",
            rules: [
              {
                required: true,
                message: "请输入所属行业",
                trigger: "blur",
              },
            ],
          },
          {
            label: "所属机构",
            prop: "deptid",
            addDisplay: false,
            type: "select",
            hide: true,
            dicUrl: "/api/blade-system/dept/selectIn",
            props: {
              label: "deptname",
              value: "deptid",
            },
          },
          {
            label: "许可类型",
            search: true,
            hide: true,
            prop: "ptype",
            type: "select",
            searchSpan: 4,
            dicData: [
              {
                label: "保安服务许可",
                value: "0",
              },
              {
                label: "保安培训许可",
                value: "1",
              },
            ],
          },
          {
            label: "提交时间",
            prop: "permitime",
            overHidden: true,
            addDisplay: false,
            width: 132,
            type: "date",
            format: "yyyy-MM-dd HH:mm:ss",
            valueFormat: "yyyy-MM-dd HH:mm:ss",
          },
          {
            label: "审核状态",
            prop: "type",
            addDisplay: false,
            type: "select",
            dicData: [
              {
                label: "通过",
                value: "0",
              },
              {
                label: "不通过",
                value: "1",
              },
              {
                label: "待审核",
                value: "2",
              },
            ],
          },
          {
            label: "经营范围",
            prop: "business",
            component: "AvueUeditor",
            hide: true,
            minRows: 6,
            span: 24,
            rules: [
              {
                required: true,
                message: "请输入经营范围",
                trigger: "blur",
              },
            ],
          },
        ],
      },
      data: [],
    };
  },
  computed: {
    ...mapGetters(["permission", "userInfo"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.permit_add, false),
        viewBtn: this.vaildData(this.permission.permit_view, true),
        delBtn: this.vaildData(this.permission.permit_delete, false),
        editBtn: this.vaildData(this.permission.permit_edit, false),
      };
    },
    ids() {
      let ids = [];
      this.selectionList.forEach((ele) => {
        ids.push(ele.id);
      });
      return ids.join(",");
    },
  },
  // mounted() {
  //     console.log(this.userInfo.dept_id);
  // },
  methods: {
    Print() {
      this.$Print(this.$refs.licence);
    },
    handleCredentials(row) {
      this.$router.push({
        path: "/attach/index",
        // redirect: { name: "foo" },
        // query: { row: row },
        query: { deptid: row.deptid, type: "0" },
        // params: { row: row.identificationnumber },
      });
    },
    rowSave(row, done, loading) {
      row.deptid = this.userInfo.dept_id;
      add(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          window.console.log(error);
        }
      );
    },
    rowUpdate(row, index, done, loading) {
      update(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          console.log(error);
        }
      );
    },
    rowDel(row) {
      this.dialogVisiblecc = true;
      this.xukezData = row;
    },
    closecc() {
      this.xukezData.type = "0";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      console.log(this.xukezData);
      update(this.xukezData);
      this.textareaShenpi = "";
    },
    subcc() {
      this.xukezData.type = "1";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      update(this.xukezData);
      this.textareaShenpi = "";
    },
    viewLicense(row) {
      //查看许可证
      this.licenceData.row = row;
      this.licenceData.chiden = {};
      this.licenceData.chiden["名称"] = row.enterprisename;
      this.licenceData.chiden["住所"] = row.address;
      this.licenceData.chiden["法定代表人"] = row.representative;
      this.licenceData.chiden["服务范围"] = row.industry;
      this.licenceData.chiden["注册资本"] = row.registeredcapital;
      this.licenceData.chiden["批准文号"] = row.registrationnumber;
      console.log(this.licenceData);
      this.dialogVisible = true;
    },
    closePrint() {
      this.dialogVisible = false;
    },
    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)) {
        getDetail(this.form.id).then((res) => {
          this.form = res.data.data;
        });
      }
      done();
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
    },
    selectionChange(list) {
      this.selectionList = list;
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
      this.loading = true;
      params["ptype"] = 0;
      getList(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        this.loading = false;
        this.selectionClear();
      });
    },
    rowStyle({ row }) {
      if (row.dtype != null && row.dtype != "") {
        if (row.dtype == "2") {
          return {
            color: "#F34A4A",
          };
        }
        if (row.dtype == "1") {
          return {
            color: "#F48F57",
          };
        }
      }
    },
  },
};
</script>
<style scoped lang="scss">
.dtype {
  width: 80px;
}
.dx {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #dfdfdf;
}
.zc {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #29c093;
}
.yj {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f34a4a;
}
.gz {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f48f57;
}
.el-tag {
  display: inline-block;
  width: 80px;
  /*padding-right: 40px !important;*/
}
#licence_box {
  position: relative;
  top: 15px;
  width: 1080px;
  height: 780px;
  background-color: #004ca7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.licence {
  width: 960px;
  height: 648px;
  background-color: #fff !important;
  background-image: url("../../static/img/permit/服务许可背景图.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-sizing: border-box;
  padding: 10%;
  color: #000;
}
.licence-head {
  width: 100%;
  height: 1.8rem;
  font-size: 1.8rem;
  text-align: center;
}
.head-tid {
  position: relative;
  left: 70%;
}
.head-tid span {
  margin: 0 1rem;
}
.licence-main {
  width: 80%;
}
.l-m-once {
  width: 100%;
  height: 2rem;
  margin-top: 1rem;
}
.l-m-o-title {
  font-size: 1.3rem;
  width: 22%;
  text-align: justify;
  display: inline-block;
}
.l-m-r-once {
  font-size: 1.1rem;
  /* border: 1px solid #000; */
  display: inline-block;
  width: 77%;
}
.licence-bottom,
.l-bottom {
  position: relative;
  left: 60%;
  font-size: 1.5rem;
  margin-top: 0.5rem;
}
.dialogVisibles {
  position: fixed;
  top: 0;
  left: -10%;
  height: 0;
  width: 120%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.printstyle {
  background-color: #fff !important;
}
.PrintBut {
  margin-top: 15px;
}
.flots {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  .f_title {
    position: absolute;
    top: 15px;
    font-size: 18px;
  }
}
.but {
  margin-top: 20px;
  width: 100%;
  display: flex;
  align-content: center;
  justify-content: center;
}
</style>
src/views/licenseApproval/securityTraining.vue
New file
@@ -0,0 +1,888 @@
/*
 * @Author: liu
 * @Date: 2021-08-26 16:55:25
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2021-08-26 17:12:51
 */
<template>
  <div>
    <basic-container class="permit">
      <avue-crud
        :option="option"
        :table-loading="loading"
        :data="data"
        :page.sync="page"
        :permission="permissionList"
        :before-open="beforeOpen"
        v-model="form"
        ref="crud"
        @row-update="rowUpdate"
        @row-save="rowSave"
        @row-del="rowDel"
        @search-change="searchChange"
        @search-reset="searchReset"
        @selection-change="selectionChange"
        @current-change="currentChange"
        @size-change="sizeChange"
        @refresh-change="refreshChange"
        @on-load="onLoad"
        :row-style="rowStyle"
      >
        <template slot="menuLeft">
          <el-button
            type="danger"
            size="small"
            icon="el-icon-delete"
            plain
            v-if="permission.permit_delete"
            @click="handleDelete"
            >删 除
          </el-button>
        </template>
        <template slot-scope="{ type, size, row }" slot="menu">
          <el-button
            icon="icon-zhengjian"
            :size="size"
            :type="type"
            class="zhengJian-icon"
            @click.stop="handleCredentials(row)"
            >附件查阅
          </el-button>
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            @click.stop="rowDel(row)"
            v-if="row.type == '2'"
            >许可审批
          </el-button>
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            @click.stop="viewLicense(row)"
            v-if="row.type == '0'"
            >打印许可证
          </el-button>
        </template>
        <template class="tdtype" slot-scope="{ row }" slot="type">
          <el-tag class="dtype">
            {{
              row.type == "0" ? "通过" : row.type == "1" ? "不通过" : "待审核"
            }}
            <i class="gz" v-if="row.type == '0'"></i>
            <i class="yj" v-if="row.type == '1'"></i>
            <i class="zc" v-if="row.type == '2'"></i>
          </el-tag>
        </template>
      </avue-crud>
    </basic-container>
    <!-- <el-dialog
      :visible.sync="dialogVisible"
      :before-close="handleClose"
      :modal-append-to-body="false"
      width="1005px"
      top="10vh"
      class="printstyle"
    >
      <div id="licence_box">
        <div class="licence" id="licence" v-if="dialogVisible">
          <div class="licence-head">保安服务许可证</div>
          <div class="head-tid">
            洪公保服务
            <span class="fontStyle">{{
              licenceData.row.organizationcode
            }}</span>
            号
          </div>
          <div class="licence-main">
            <div
              class="l-m-once"
              v-for="(item, index, key) in licenceData.chiden"
              :key="key"
            >
              <span class="l-m-o-title"> {{ index }}: </span>
              <span class="l-m-r-once">{{ item }}</span>
            </div>
          </div>
          <div class="licence-bottom">发证机关(南昌市公安局)</div>
          <div class="l-bottom">
            发证日期
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(0, 4)
            }}</span
            >年
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(5, 7)
            }}</span>
            月
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(8, 10)
            }}</span>
            日
          </div>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="Print">打 印</el-button>
      </span>
    </el-dialog> -->
    <div
      v-if="dialogVisible"
      class="dialogVisibles"
      :class="classStyle == 'print' ? 'printstyle' : ''"
    >
      <div
        id="licence_box"
        :class="classStyle == 'print' ? 'printstyle' : ''"
        ref="licence"
      >
        <div class="licence" id="licence" v-if="dialogVisible">
          <div class="licence-head">保安服务许可证</div>
          <div class="head-tid">
            洪公保服务
            <span class="fontStyle">{{
              licenceData.row.organizationcode
            }}</span>
            号
          </div>
          <div class="licence-main">
            <div
              class="l-m-once"
              v-for="(item, index, key) in licenceData.chiden"
              :key="key"
            >
              <span class="l-m-o-title"> {{ index }}: </span>
              <span class="l-m-r-once">{{ item }}</span>
            </div>
          </div>
          <div class="licence-bottom">发证机关(南昌市公安局)</div>
          <div class="l-bottom">
            发证日期
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(0, 4)
            }}</span
            >年
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(5, 7)
            }}</span>
            月
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(8, 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>
    <el-dialog
      title=""
      :visible.sync="dialogVisiblecc"
      width="30%"
      :modal-append-to-body="false"
    >
      <div class="flots">
        <span class="f_title">是否通过审核?</span>
        <span class="f_body">请输入修改意见:</span>
        <textarea
          name="reworkmes"
          cols="40"
          rows="4"
          style="overflow: hidden"
          v-model="textareaShenpi"
        ></textarea>
        <div class="but">
          <el-button @click="closecc">通过</el-button>
          <el-button type="primary" @click="subcc">不通过</el-button>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import {
  getList,
  getDetail,
  add,
  update,
  remove,
} from "@/api/licenseApproval/permit";
import { mapGetters } from "vuex";
export default {
  data() {
    return {
      classStyle: "print", //打印样式
      dialogVisiblecc: false, //许可证审核抽屉
      xukezData: {},
      dialogVisible: false, //许可证抽屉
      licenceData: {
        row: {},
        chiden: {},
      },
      textareaShenpi: "",
      form: {},
      query: {},
      loading: true,
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
      },
      selectionList: [],
      option: {
        height: "auto",
        calcHeight: 30,
        excelBtn: true,
        tip: false,
        searchShowBtn: false,
        searchShow: true,
        searchMenuSpan: 8,
        border: true,
        menuWidth: 300,
        labelWidth: 130,
        headerAlign: "center",
        align: "center",
        // border: false,
        index: true,
        viewBtn: true,
        selection: true,
        dialogClickModal: false,
        column: [
          {
            label: "企业名称",
            search: true,
            prop: "enterprisename",
            searchLabelWidth: 80,
            searchSpan: 4,
            overHidden: true,
            width: 250,
            rules: [
              {
                required: true,
                message: "请输入企业名称",
                trigger: "blur",
              },
            ],
          },
          {
            label: "社会信用代码",
            prop: "creditcode",
            hide: true,
            rules: [
              {
                required: true,
                message: "请输入统一社会信用代码",
                trigger: "blur",
              },
            ],
          },
          {
            label: "法定代表人",
            prop: "representative",
            width: 82,
            rules: [
              {
                required: true,
                message: "请输入法定代表人",
                trigger: "blur",
              },
            ],
          },
          {
            label: "法定代表人电话",
            width: 106,
            prop: "representativecell",
            rules: [
              {
                required: true,
                message: "请输入法定代表人电话",
                trigger: "blur",
              },
            ],
          },
          {
            label: "联系人",
            prop: "contacts",
            width: 58,
            rules: [
              {
                required: true,
                message: "请输入联系人",
                trigger: "blur",
              },
            ],
          },
          {
            label: "联系人电话",
            width: 96,
            prop: "contactscell",
            rules: [
              {
                required: true,
                message: "请输入联系人电话",
                trigger: "blur",
              },
            ],
          },
          {
            label: "注册时间",
            hide: true,
            prop: "establishtime",
            type: "date",
            format: "yyyy-MM-dd",
            valueFormat: "yyyy-MM-dd",
            rules: [
              {
                required: true,
                message: "请输入注册时间",
                trigger: "blur",
              },
            ],
          },
          {
            label: "注册资本",
            prop: "registeredcapital",
            rules: [
              {
                required: true,
                message: "请输入注册资本",
                trigger: "blur",
              },
            ],
          },
          {
            label: "组织机构代码",
            prop: "organizationcode",
            hide: true,
            rules: [
              {
                required: true,
                message: "请输入组织机构代码",
                trigger: "blur",
              },
            ],
          },
          {
            label: "工商注册号",
            hide: true,
            prop: "registrationnumber",
            rules: [
              {
                required: true,
                message: "请输入工商注册号",
                trigger: "blur",
              },
            ],
          },
          {
            label: "纳税人识别号",
            prop: "identificationnumber",
            hide: true,
            rules: [
              {
                required: true,
                message: "请输入纳税人识别号",
                trigger: "blur",
              },
            ],
          },
          {
            label: "企业类型",
            hide: true,
            prop: "enterprises",
            rules: [
              {
                required: true,
                message: "请输入企业类型",
                trigger: "blur",
              },
            ],
          },
          {
            label: "注册地址",
            prop: "address",
            overHidden: true,
            rules: [
              {
                required: true,
                message: "请输入注册地址",
                trigger: "blur",
              },
            ],
          },
          {
            label: "所属地区",
            hide: true,
            prop: "region",
            rules: [
              {
                required: true,
                message: "请输入所属地区",
                trigger: "blur",
              },
            ],
          },
          {
            label: "登记机关",
            prop: "registration",
            overHidden: true,
            rules: [
              {
                required: true,
                message: "请输入登记机关",
                trigger: "blur",
              },
            ],
          },
          {
            label: "所属行业",
            hide: true,
            prop: "industry",
            rules: [
              {
                required: true,
                message: "请输入所属行业",
                trigger: "blur",
              },
            ],
          },
          {
            label: "所属机构",
            prop: "deptid",
            addDisplay: false,
            type: "select",
            hide: true,
            dicUrl: "/api/blade-system/dept/selectIn",
            props: {
              label: "deptname",
              value: "deptid",
            },
          },
          {
            label: "许可类型",
            search: true,
            hide: true,
            prop: "ptype",
            type: "select",
            searchSpan: 4,
            dicData: [
              {
                label: "保安服务许可",
                value: "0",
              },
              {
                label: "保安培训许可",
                value: "1",
              },
            ],
          },
          {
            label: "提交时间",
            prop: "permitime",
            overHidden: true,
            addDisplay: false,
            width: 132,
            type: "date",
            format: "yyyy-MM-dd HH:mm:ss",
            valueFormat: "yyyy-MM-dd HH:mm:ss",
          },
          {
            label: "审核状态",
            prop: "type",
            addDisplay: false,
            type: "select",
            dicData: [
              {
                label: "通过",
                value: "0",
              },
              {
                label: "不通过",
                value: "1",
              },
              {
                label: "待审核",
                value: "2",
              },
            ],
          },
          {
            label: "经营范围",
            prop: "business",
            component: "AvueUeditor",
            hide: true,
            minRows: 6,
            span: 24,
            rules: [
              {
                required: true,
                message: "请输入经营范围",
                trigger: "blur",
              },
            ],
          },
        ],
      },
      data: [],
    };
  },
  computed: {
    ...mapGetters(["permission", "userInfo"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.permit_add, false),
        viewBtn: this.vaildData(this.permission.permit_view, true),
        delBtn: this.vaildData(this.permission.permit_delete, false),
        editBtn: this.vaildData(this.permission.permit_edit, false),
      };
    },
    ids() {
      let ids = [];
      this.selectionList.forEach((ele) => {
        ids.push(ele.id);
      });
      return ids.join(",");
    },
  },
  // mounted() {
  //     console.log(this.userInfo.dept_id);
  // },
  methods: {
    Print() {
      this.$Print(this.$refs.licence);
    },
    handleCredentials(row) {
      this.$router.push({
        path: "/attach/index",
        // redirect: { name: "foo" },
        // query: { row: row },
        query: { deptid: row.deptid, type: "0" },
        // params: { row: row.identificationnumber },
      });
    },
    rowSave(row, done, loading) {
      row.deptid = this.userInfo.dept_id;
      add(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          window.console.log(error);
        }
      );
    },
    rowUpdate(row, index, done, loading) {
      update(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          console.log(error);
        }
      );
    },
    rowDel(row) {
      this.dialogVisiblecc = true;
      this.xukezData = row;
    },
    closecc() {
      this.xukezData.type = "0";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      console.log(this.xukezData);
      update(this.xukezData);
      this.textareaShenpi = "";
    },
    subcc() {
      this.xukezData.type = "1";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      update(this.xukezData);
      this.textareaShenpi = "";
    },
    viewLicense(row) {
      //查看许可证
      this.licenceData.row = row;
      this.licenceData.chiden = {};
      this.licenceData.chiden["名称"] = row.enterprisename;
      this.licenceData.chiden["住所"] = row.address;
      this.licenceData.chiden["法定代表人"] = row.representative;
      this.licenceData.chiden["服务范围"] = row.industry;
      this.licenceData.chiden["注册资本"] = row.registeredcapital;
      this.licenceData.chiden["批准文号"] = row.registrationnumber;
      console.log(this.licenceData);
      this.dialogVisible = true;
    },
    closePrint() {
      this.dialogVisible = false;
    },
    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)) {
        getDetail(this.form.id).then((res) => {
          this.form = res.data.data;
        });
      }
      done();
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
    },
    selectionChange(list) {
      this.selectionList = list;
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
      this.loading = true;
      params["ptype"] = 1;
      getList(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        this.loading = false;
        this.selectionClear();
      });
    },
    rowStyle({ row }) {
      if (row.dtype != null && row.dtype != "") {
        if (row.dtype == "2") {
          return {
            color: "#F34A4A",
          };
        }
        if (row.dtype == "1") {
          return {
            color: "#F48F57",
          };
        }
      }
    },
  },
};
</script>
<style scoped lang="scss">
.dtype {
  width: 80px;
}
.dx {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #dfdfdf;
}
.zc {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #29c093;
}
.yj {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f34a4a;
}
.gz {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f48f57;
}
.el-tag {
  display: inline-block;
  width: 80px;
  /*padding-right: 40px !important;*/
}
#licence_box {
  position: relative;
  top: 15px;
  width: 1080px;
  height: 780px;
  background-color: #004ca7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.licence {
  width: 960px;
  height: 648px;
  background-color: #fff !important;
  background-image: url("../../static/img/permit/服务许可背景图.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-sizing: border-box;
  padding: 10%;
  color: #000;
}
.licence-head {
  width: 100%;
  height: 1.8rem;
  font-size: 1.8rem;
  text-align: center;
}
.head-tid {
  position: relative;
  left: 70%;
}
.head-tid span {
  margin: 0 1rem;
}
.licence-main {
  width: 80%;
}
.l-m-once {
  width: 100%;
  height: 2rem;
  margin-top: 1rem;
}
.l-m-o-title {
  font-size: 1.3rem;
  width: 22%;
  text-align: justify;
  display: inline-block;
}
.l-m-r-once {
  font-size: 1.1rem;
  /* border: 1px solid #000; */
  display: inline-block;
  width: 77%;
}
.licence-bottom,
.l-bottom {
  position: relative;
  left: 60%;
  font-size: 1.5rem;
  margin-top: 0.5rem;
}
.dialogVisibles {
  position: fixed;
  top: 0;
  left: -10%;
  height: 0;
  width: 120%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.printstyle {
  background-color: #fff !important;
}
.PrintBut {
  margin-top: 15px;
}
.flots {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  .f_title {
    position: absolute;
    top: 15px;
    font-size: 18px;
  }
}
.but {
  margin-top: 20px;
  width: 100%;
  display: flex;
  align-content: center;
  justify-content: center;
}
</style>
src/views/securityCompany/armed.vue
@@ -2,8 +2,8 @@
 * @Author: Morpheus
 * @Date: 2021-07-07 17:30:05
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-07-10 16:05:44
 * menu-name 武装守押公司查询
 * @Last Modified time: 2021-07-10 16:01:42
 * menu-name 保安服务公司查询
 */
<template>
  <basic-container>
@@ -25,10 +25,67 @@
      @current-change="currentChange"
      @size-change="sizeChange"
      @refresh-change="refreshChange"
      @row-click="handleRowClick"
      @on-load="onLoad"
    >
      <!-- @row-click="handleRowClick" -->
      <template slot-scope="{ row }" slot="znum">
        <el-tag
          class="rowClickSelf"
          @click="rowClickSelf(row)"
          title="点击查看保安人员情况"
          >{{ row.znum }}</el-tag
        >
      </template>
      <template slot-scope="{ type, size, row }" slot="menu">
        <el-button
          icon="el-icon-s-custom"
          :size="size"
          :type="type"
          @click.stop="handleRowClick(row)"
          >查看
        </el-button>
        <el-button
          :size="size"
          :type="type"
          icon="el-icon-warning"
          class="zhengJian-icon"
          @click.stop="punish(row)"
          >处罚</el-button
        >
      </template>
    </avue-crud>
    <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>
  </basic-container>
</template>
@@ -39,12 +96,77 @@
  add,
  update,
  remove,
} from "@/api/securityCompany/armed";
  savePunish,
} from "@/api/securityCompany/security";
import { mapGetters } from "vuex";
import { companyColimn } from "./column";
export default {
  data() {
    return {
      objf: {},
      optionf: {
        column: [
          {
            label: "公司名称",
            prop: "enterprisename",
            span: 24,
            labelWidth: 110,
            rules: [
              {
                required: true,
                message: "请输入身份证号码",
                trigger: "blur",
              },
            ],
          },
          {
            label: "处罚原因",
            prop: "punishreason",
            span: 24,
            labelWidth: 110,
            rules: [
              {
                required: true,
                message: "请输入荣誉名称",
                trigger: "blur",
              },
            ],
          },
          {
            label: "处罚结果",
            prop: "punishresult",
            span: 24,
            // type: "textarea",
            labelWidth: 110,
          },
          {
            label: "处罚日期",
            prop: "punishtime",
            span: 24,
            type: "date",
            format: "yyyy-MM-dd",
            valueFormat: "yyyy-MM-dd",
            // type: "textarea",
            labelWidth: 110,
          },
          {
            label: "处罚批准文号",
            prop: "punisnum",
            span: 24,
            // type: "textarea",
            labelWidth: 110,
          },
          //   {
          //     label: "授予单位名称",
          //     prop: "sex2",
          //     span: 24,
          //     labelWidth: 110,
          //   },
        ],
      },
      dialogVisible: false,
      form: {},
      query: {},
      loading: true,
@@ -60,73 +182,21 @@
        editBtn: false,
        addBtn: false,
        selection: true,
        menu: false,
        selection: true,
        searchShowBtn: false,
        // menu: false,
        border: true,
        align: "center",
        height: "auto",
        calcHeight: 30,
        tip: false,
        searchShowBtn: false,
        searchShow: true,
        menuWidth: 160,
        searchMenuSpan: 6,
        index: true,
        viewBtn: true,
        dialogClickModal: false,
        column: [
          {
            label: "公司名称",
            prop: "enterprisename",
            search: true,
            searchSpan: 4,
            display: false,
          },
          {
            label: "法定代表人",
            prop: "representative",
            display: false,
            width: 120,
          },
          {
            label: "注册时间",
            prop: "establishtime",
            type: "date",
            format: "yyyy-MM-dd",
            valueFormat: "yyyy-MM-dd",
            mock: {
              type: "datetime",
              format: "yyyy-MM-dd",
            },
            search: true,
            searchSpan: 4,
            display: false,
            width: 180,
          },
          {
            label: "注册资金",
            prop: "registeredcapital",
            display: false,
            width: 130,
          },
          {
            label: "实缴资金",
            prop: "capital",
            display: false,
            width: 130,
          },
          {
            label: "公司类型",
            prop: "enterprises",
            display: false,
          },
          {
            label: "注册地址",
            prop: "address",
            display: false,
            width: 280,
          },
        ],
        column: companyColimn,
        group: [
          {
            label: "详细信息",
@@ -176,6 +246,67 @@
    },
  },
  methods: {
    rowClickSelf(val) {
      console.log(val.departmentid);
      this.$router.push({
        path: "/securityGuardManagement/registerOnce",
        query: { departmentid: val.departmentid },
      });
    },
    close(row) {
      this.dialogVisible = false;
      this.objf = {
        enterprisename: "",
        punishreason: "",
        punishresult: "",
        punishtime: "",
        punisnum: "",
      };
    },
    submitf(form, done) {
      console.log(form);
      var that = this;
      savePunish(form).then((res) => {
        this.$message({
          type: "success",
          message: "操作成功!",
        });
        that.objf = {
          enterprisename: "",
          punishreason: "",
          punishresult: "",
          punishtime: "",
          punisnum: "",
        };
      });
      // this.$message.success(JSON.stringify(form));
      done();
      this.dialogVisible = false;
      this.objf = {};
    },
    errorf(err) {
      this.$message.success("请查看控制台");
      console.log(err);
    },
    handleClose(done) {
      this.objf = {
        enterprisename: "",
        punishreason: "",
        punishresult: "",
        punishtime: "",
        punisnum: "",
      };
      done();
    },
    punish(row) {
      //打开处罚
      // console.log(row);
      this.objf = {
        deptid: row.departmentid,
        enterprisename: row.enterprisename,
      };
      this.dialogVisible = true;
    },
    rowSave(row, done, loading) {
      add(row).then(
        () => {
@@ -265,11 +396,12 @@
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query),
        3
        2
      ).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        console.log(this.data);
        this.loading = false;
        this.selectionClear();
      });
@@ -279,7 +411,8 @@
    handleRowClick(row) {
      // delete (row["name"]);
      var obj = row;
      obj["name"] = "保安公司详细资料";
      obj["name"] = "保安公司详细信息";
      console.log(obj, "obj");
      this.$router.push({
        path: `/securityCompany/index`,
        query: obj,
@@ -289,5 +422,5 @@
};
</script>
<style>
<style lang="scss">
</style>
src/views/securityCompany/column.js
@@ -1,79 +1,164 @@
export var companyColimn = [
    {
        label: "公司名称",
        label: "统一社会信用代码",
        prop: "creditcode",
        width: 140,
        hide: true,
        labelWidth: 160,
        // hide: true,
        // editDisplay: false,
        // addDisplay: false
    },
    {
        label: "企业名称",
        prop: "enterprisename",
        search: true,
        width: 260,
        searchSpan: 4,
        // width: 300,
        minWidth: 120,
        overHidden: true,
        display: false,
        labelWidth: 160,
        // width: 130,
        overHidden: true
    },
    {
        label: "企业类型",
        prop: "stats",
        type: "tree",
        hide: true,
        labelWidth: 160,
        dicUrl: "/api/blade-system/dict-biz/dictionary?code=stats",
        props: {
            label: "dictValue",
            value: "dictKey"
        },
        width: 130,
        rules: [
            {
                required: true,
                message: "请选择企业类型",
                trigger: "click",
            },
        ],
    },
    {
        label: "法定代表人",
        labelWidth: 160,
        prop: "representative",
        display: false,
        width: 86,
        width: 110,
        search: true,
        searchSpan: 4,
        searchLabelWidth: 100
    },
    {
        label: "法人电话",
        label: "法定代表人电话",
        labelWidth: 160,
        prop: "representativecell",
        display: false,
        width: 95,
        width: 120,
        // search: true,
        searchSpan: 4,
        searchLabelWidth: 100
    },
    {
        label: "保安人数",
        labelWidth: 160,
        prop: "znum",
        width: 73,
        // search: true,
        searchSpan: 4,
        searchLabelWidth: 100
    },
    {
        label: "派遣人数",
        labelWidth: 160,
        prop: "pnum",
        width: 73,
        // search: true,
        searchSpan: 4,
        searchLabelWidth: 100
    },
    {
        label: "持证人数",
        labelWidth: 160,
        prop: "cnum",
        width: 73,
        // search: true,
        searchSpan: 4,
        searchLabelWidth: 100
    },
    {
        label: "注册时间",
        prop: "establishtime",
        labelWidth: 160,
        width: 130,
        overHidden: true,
        type: "date",
        format: "yyyy-MM-dd",
        valueFormat: "yyyy-MM-dd",
        mock: {
            type: "datetime",
            format: "yyyy-MM-dd",
        },
        search: true,
        searchSpan: 4,
        display: false,
        width: 140,
        valueFormat: "timestamp",
    },
    {
        label: "注册资金",
        label: "注册资本",
        prop: "registeredcapital",
        display: false,
        width: 110,
        hide: true,
        labelWidth: 160,
        // search: true,
        width: 80,
    },
    // {
    //     label: "实缴资金",
    //     prop: "capital",
    //     display: false,
    //     width: 110,
    // },
    // {
    //   label: "公司类型",
    //   prop: "enterprises",
    //   display: false,
    //   width: 220,
    //   overHidden: true,
    // },
    {
        label: "联系人",
        prop: "contacts",
        display: false,
        overHidden: true,
        width: 95,
    },
    {
        labelWidth: 160,
        width: 85,
    }, {
        label: "联系电话",
        prop: "contactscell",
        display: false,
        overHidden: true,
        labelWidth: 160,
        width: 95,
    },
    {
        label: "注册地址",
        prop: "address",
        display: false,
        labelWidth: 160,
        // search: true,
        hide: true,
    },
    {
        label: "经营范围",
        prop: "business",
        // search: true,
        labelWidth: 160,
        hide: true,
        // width: 110,
        overHidden: true
    },
    {
        label: "所属辖区",
        prop: "region",
        labelWidth: 160,
        // width: 110,
        // search: true,
        overHidden: true
    },
    {
        label: "登记机关",
        prop: "registration",
        // search: true,
        labelWidth: 160,
        // width: 88,
        overHidden: true,
    }
        hide: true,
    },
    {
        label: "所属行业",
        prop: "industry",
        labelWidth: 160,
        hide: true,
        // search: true,
        // width: 88,
    },
]
src/views/securityCompany/computents/equipment.vue
@@ -31,7 +31,7 @@
        addBtn: false,
        selection: true,
        menu: false,
        border: true,
        align: "center",
        height: "auto",
        calcHeight: 270,
src/views/securityCompany/computents/punish.vue
@@ -30,6 +30,7 @@
        searchShowBtn: false,
        addBtn: false,
        selection: true,
        border: true,
        menu: false,
        align: "center",
@@ -49,8 +50,8 @@
          {
            label: "处罚原因",
            prop: "punishreason",
            span: 24,
            labelWidth: 110,
            // width: 160,
            rules: [
              {
                required: true,
@@ -62,26 +63,29 @@
          {
            label: "处罚结果",
            prop: "punishresult",
            span: 24,
            // type: "textarea",
            // width: 160,
            labelWidth: 110,
          },
          {
            label: "处罚日期",
            prop: "punishtime",
            span: 24,
            type: "date",
            format: "yyyy-MM-dd",
            valueFormat: "yyyy-MM-dd",
            // type: "textarea",
            labelWidth: 110,
            width: 160,
          },
          {
            label: "处罚批准文号",
            label: "批准文号",
            prop: "punisnum",
            span: 24,
            // type: "textarea",
            // type: "date",
            // format: "yyyy-MM-dd",
            // valueFormat: "yyyy-MM-dd",
            // // type: "textarea",
            labelWidth: 110,
            // width: 160,
          },
        ],
      },
src/views/securityCompany/computents/service.vue
@@ -31,7 +31,7 @@
        addBtn: false,
        selection: true,
        menu: false,
        border: true,
        align: "center",
        height: "auto",
        calcHeight: 270,
@@ -46,13 +46,6 @@
        menuWidth: 156,
        column: [
          // {
          //   label: "id",
          //   prop: "id",
          //   hide: true,
          //   editDisplay: false,
          //   addDisplay: false,
          // },
          {
            label: "姓名",
            prop: "name",
@@ -66,55 +59,11 @@
              },
            ],
          },
          // {
          //   label: "身份证号",
          //   prop: "cardid",
          //   // rules: [
          //   //   {
          //   //     required: true,
          //   //     message: "请输入编号",
          //   //     trigger: "blur",
          //   //   },
          //   // ],
          //   // search: true,
          // }, //上面不显示
          {
            label: "派遣单位",
            prop: "dispatcherCompany",
            search: true,
            // rules: [
            //   {
            //     required: true,
            //     message: "请输入规格",
            //     trigger: "blur",
            //   },
            // ],
            // search: true,
          },
          // {
          //   label: "保安公司",
          //   prop: "deptName",
          //   // rules: [
          //   //   {
          //   //     required: true,
          //   //     message: "请输入规格",
          //   //     trigger: "blur",
          //   //   },
          //   // ],
          //   // search: true,
          // },
          // {
          //   label: "派遣人",
          //   prop: "dispatcher",
          //   // rules: [
          //   //   {
          //   //     required: true,
          //   //     message: "请输入规格",
          //   //     trigger: "blur",
          //   //   },
          //   // ],
          //   // search: true,
          // },
          {
            label: "派遣时间",
            prop: "dispatchertime",
src/views/securityCompany/computents/staff.vue
@@ -31,7 +31,7 @@
        searchShowBtn: false,
        selection: true,
        menu: false,
        border: true,
        align: "center",
        height: "auto",
        calcHeight: 270,
src/views/securityCompany/confess.vue
@@ -2,8 +2,8 @@
 * @Author: Morpheus
 * @Date: 2021-07-07 17:30:05
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-07-10 16:07:26
 * menu-name 自招保安单位查询
 * @Last Modified time: 2021-07-10 16:01:42
 * menu-name 保安服务公司查询
 */
<template>
  <basic-container>
@@ -25,13 +25,29 @@
      @current-change="currentChange"
      @size-change="sizeChange"
      @refresh-change="refreshChange"
      @row-click="handleRowClick"
      @on-load="onLoad"
    >
      <!-- @row-click="handleRowClick" -->
      <template slot-scope="{ row }" slot="znum">
        <el-tag
          class="rowClickSelf"
          @click="rowClickSelf(row)"
          title="点击查看保安人员情况"
          >{{ row.znum }}</el-tag
        >
      </template>
      <template slot-scope="{ type, size, row }" slot="menu">
        <el-button
          icon="el-icon-s-custom"
          :size="size"
          :type="type"
          @click.stop="handleRowClick(row)"
          >查看
        </el-button>
        <el-button
          :size="size"
          :type="type"
          icon="el-icon-warning"
          class="zhengJian-icon"
          @click.stop="punish(row)"
          >处罚</el-button
@@ -80,8 +96,8 @@
  add,
  update,
  remove,
} from "@/api/securityCompany/confess";
import { savePunish } from "@/api/securityCompany/security";
  savePunish,
} from "@/api/securityCompany/security";
import { mapGetters } from "vuex";
import { companyColimn } from "./column";
@@ -165,101 +181,22 @@
        delBtn: false,
        editBtn: false,
        addBtn: false,
        menuWidth: 100,
        selection: true,
        searchShowBtn: false,
        // menu: false,
        border: true,
        align: "center",
        height: "auto",
        calcHeight: 30,
        tip: false,
        searchShow: true,
        menuWidth: 160,
        searchMenuSpan: 6,
        index: true,
        searchShowBtn: false,
        viewBtn: true,
        dialogClickModal: false,
        column: companyColimn,
        // [
        //   {
        //     label: "公司名称",
        //     prop: "enterprisename",
        //     search: true,
        //     searchSpan: 4,
        //     // width: 300,
        //     minWidth: 120,
        //     overHidden: true,
        //     display: false,
        //   },
        //   {
        //     label: "法定代表人",
        //     prop: "representative",
        //     display: false,
        //     width: 86,
        //   },
        //   {
        //     label: "法人电话",
        //     prop: "representativecell",
        //     display: false,
        //     width: 95,
        //   },
        //   {
        //     label: "注册时间",
        //     prop: "establishtime",
        //     type: "date",
        //     format: "yyyy-MM-dd",
        //     valueFormat: "yyyy-MM-dd",
        //     mock: {
        //       type: "datetime",
        //       format: "yyyy-MM-dd",
        //     },
        //     search: true,
        //     searchSpan: 4,
        //     display: false,
        //     width: 140,
        //   },
        //   {
        //     label: "注册资金",
        //     prop: "registeredcapital",
        //     display: false,
        //     width: 110,
        //   },
        //   {
        //     label: "实缴资金",
        //     prop: "capital",
        //     display: false,
        //     width: 110,
        //   },
        //   // {
        //   //   label: "公司类型",
        //   //   prop: "enterprises",
        //   //   display: false,
        //   //   width: 220,
        //   //   overHidden: true,
        //   // },
        //   {
        //     label: "联系人",
        //     prop: "contacts",
        //     display: false,
        //     overHidden: true,
        //     width: 95,
        //   },
        //   {
        //     label: "联系电话",
        //     prop: "contactscell",
        //     display: false,
        //     overHidden: true,
        //     width: 95,
        //   },
        //   {
        //     label: "注册地址",
        //     prop: "address",
        //     display: false,
        //     overHidden: true,
        //   },
        // ],
        group: [
          {
            label: "详细信息",
@@ -309,14 +246,12 @@
    },
  },
  methods: {
    punish(row) {
      //打开处罚
      // console.log(row);
      this.objf = {
        deptid: row.departmentid,
        enterprisename: row.enterprisename,
      };
      this.dialogVisible = true;
    rowClickSelf(val) {
      console.log(val.departmentid);
      this.$router.push({
        path: "/securityGuardManagement/registerOnce",
        query: { departmentid: val.departmentid },
      });
    },
    close(row) {
      this.dialogVisible = false;
@@ -350,7 +285,7 @@
      this.objf = {};
    },
    errorf(err) {
      this.$message.success("操作失败");
      this.$message.success("请查看控制台");
      console.log(err);
    },
    handleClose(done) {
@@ -362,6 +297,15 @@
        punisnum: "",
      };
      done();
    },
    punish(row) {
      //打开处罚
      // console.log(row);
      this.objf = {
        deptid: row.departmentid,
        enterprisename: row.enterprisename,
      };
      this.dialogVisible = true;
    },
    rowSave(row, done, loading) {
      add(row).then(
@@ -457,7 +401,7 @@
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        console.log(this.data, "自招单位");
        console.log(this.data);
        this.loading = false;
        this.selectionClear();
      });
@@ -467,7 +411,8 @@
    handleRowClick(row) {
      // delete (row["name"]);
      var obj = row;
      obj["name"] = "保安公司详细资料";
      obj["name"] = "保安公司详细信息";
      console.log(obj, "obj");
      this.$router.push({
        path: `/securityCompany/index`,
        query: obj,
@@ -477,5 +422,5 @@
};
</script>
<style>
<style lang="scss">
</style>
src/views/securityCompany/security.vue
@@ -25,13 +25,29 @@
      @current-change="currentChange"
      @size-change="sizeChange"
      @refresh-change="refreshChange"
      @row-click="handleRowClick"
      @on-load="onLoad"
    >
      <!-- @row-click="handleRowClick" -->
      <template slot-scope="{ row }" slot="znum">
        <el-tag
          class="rowClickSelf"
          @click="rowClickSelf(row)"
          title="点击查看保安人员情况"
          >{{ row.znum }}</el-tag
        >
      </template>
      <template slot-scope="{ type, size, row }" slot="menu">
        <el-button
          icon="el-icon-s-custom"
          :size="size"
          :type="type"
          @click.stop="handleRowClick(row)"
          >查看
        </el-button>
        <el-button
          :size="size"
          :type="type"
          icon="el-icon-warning"
          class="zhengJian-icon"
          @click.stop="punish(row)"
          >处罚</el-button
@@ -135,6 +151,13 @@
            labelWidth: 110,
          },
          {
            label: "处罚单位",
            prop: "penalty",
            span: 24,
            // type: "textarea",
            labelWidth: 110,
          },
          {
            label: "处罚批准文号",
            prop: "punisnum",
            span: 24,
@@ -168,98 +191,19 @@
        selection: true,
        searchShowBtn: false,
        // menu: false,
        border: true,
        align: "center",
        height: "auto",
        calcHeight: 30,
        tip: false,
        searchShow: true,
        menuWidth: 100,
        menuWidth: 160,
        searchMenuSpan: 6,
        index: true,
        viewBtn: true,
        dialogClickModal: false,
        column: companyColimn,
        // [
        //   {
        //     label: "公司名称",
        //     prop: "enterprisename",
        //     search: true,
        //     searchSpan: 4,
        //     // width: 300,
        //     minWidth: 120,
        //     overHidden: true,
        //     display: false,
        //   },
        //   {
        //     label: "法定代表人",
        //     prop: "representative",
        //     display: false,
        //     width: 86,
        //   },
        //   {
        //     label: "法人电话",
        //     prop: "representativecell",
        //     display: false,
        //     width: 95,
        //   },
        //   {
        //     label: "注册时间",
        //     prop: "establishtime",
        //     type: "date",
        //     format: "yyyy-MM-dd",
        //     valueFormat: "yyyy-MM-dd",
        //     mock: {
        //       type: "datetime",
        //       format: "yyyy-MM-dd",
        //     },
        //     search: true,
        //     searchSpan: 4,
        //     display: false,
        //     width: 140,
        //   },
        //   {
        //     label: "注册资金",
        //     prop: "registeredcapital",
        //     display: false,
        //     width: 110,
        //   },
        //   {
        //     label: "实缴资金",
        //     prop: "capital",
        //     display: false,
        //     width: 110,
        //   },
        //   // {
        //   //   label: "公司类型",
        //   //   prop: "enterprises",
        //   //   display: false,
        //   //   width: 220,
        //   //   overHidden: true,
        //   // },
        //   {
        //     label: "联系人",
        //     prop: "contacts",
        //     display: false,
        //     overHidden: true,
        //     width: 95,
        //   },
        //   {
        //     label: "联系电话",
        //     prop: "contactscell",
        //     display: false,
        //     overHidden: true,
        //     width: 95,
        //   },
        //   {
        //     label: "注册地址",
        //     prop: "address",
        //     display: false,
        //     overHidden: true,
        //   },
        // ],
        group: [
          {
            label: "详细信息",
@@ -309,6 +253,13 @@
    },
  },
  methods: {
    rowClickSelf(val) {
      console.log(val.departmentid);
      this.$router.push({
        path: "/securityGuardManagement/registerOnce",
        query: { departmentid: val.departmentid },
      });
    },
    close(row) {
      this.dialogVisible = false;
      this.objf = {
@@ -478,5 +429,5 @@
};
</script>
<style>
<style lang="scss">
</style>
src/views/securityCompany/securityCrossRegion.vue
@@ -25,13 +25,29 @@
      @current-change="currentChange"
      @size-change="sizeChange"
      @refresh-change="refreshChange"
      @row-click="handleRowClick"
      @on-load="onLoad"
    >
      <!-- @row-click="handleRowClick" -->
      <template slot-scope="{ row }" slot="znum">
        <el-tag
          class="rowClickSelf"
          @click="rowClickSelf(row)"
          title="点击查看保安人员情况"
          >{{ row.znum }}</el-tag
        >
      </template>
      <template slot-scope="{ type, size, row }" slot="menu">
        <el-button
          icon="el-icon-s-custom"
          :size="size"
          :type="type"
          @click.stop="handleRowClick(row)"
          >查看
        </el-button>
        <el-button
          :size="size"
          :type="type"
          icon="el-icon-warning"
          class="zhengJian-icon"
          @click.stop="punish(row)"
          >处罚</el-button
@@ -168,98 +184,19 @@
        selection: true,
        searchShowBtn: false,
        // menu: false,
        border: true,
        align: "center",
        height: "auto",
        calcHeight: 30,
        tip: false,
        searchShow: true,
        menuWidth: 100,
        menuWidth: 160,
        searchMenuSpan: 6,
        index: true,
        viewBtn: true,
        dialogClickModal: false,
        column: companyColimn,
        // [
        //   {
        //     label: "公司名称",
        //     prop: "enterprisename",
        //     search: true,
        //     searchSpan: 4,
        //     // width: 300,
        //     minWidth: 120,
        //     overHidden: true,
        //     display: false,
        //   },
        //   {
        //     label: "法定代表人",
        //     prop: "representative",
        //     display: false,
        //     width: 86,
        //   },
        //   {
        //     label: "法人电话",
        //     prop: "representativecell",
        //     display: false,
        //     width: 95,
        //   },
        //   {
        //     label: "注册时间",
        //     prop: "establishtime",
        //     type: "date",
        //     format: "yyyy-MM-dd",
        //     valueFormat: "yyyy-MM-dd",
        //     mock: {
        //       type: "datetime",
        //       format: "yyyy-MM-dd",
        //     },
        //     search: true,
        //     searchSpan: 4,
        //     display: false,
        //     width: 140,
        //   },
        //   {
        //     label: "注册资金",
        //     prop: "registeredcapital",
        //     display: false,
        //     width: 110,
        //   },
        //   {
        //     label: "实缴资金",
        //     prop: "capital",
        //     display: false,
        //     width: 110,
        //   },
        //   // {
        //   //   label: "公司类型",
        //   //   prop: "enterprises",
        //   //   display: false,
        //   //   width: 220,
        //   //   overHidden: true,
        //   // },
        //   {
        //     label: "联系人",
        //     prop: "contacts",
        //     display: false,
        //     overHidden: true,
        //     width: 95,
        //   },
        //   {
        //     label: "联系电话",
        //     prop: "contactscell",
        //     display: false,
        //     overHidden: true,
        //     width: 95,
        //   },
        //   {
        //     label: "注册地址",
        //     prop: "address",
        //     display: false,
        //     overHidden: true,
        //   },
        // ],
        group: [
          {
            label: "详细信息",
@@ -309,6 +246,13 @@
    },
  },
  methods: {
    rowClickSelf(val) {
      console.log(val.departmentid);
      this.$router.push({
        path: "/securityGuardManagement/registerOnce",
        query: { departmentid: val.departmentid },
      });
    },
    close(row) {
      this.dialogVisible = false;
      this.objf = {
@@ -468,31 +412,15 @@
      // delete (row["name"]);
      var obj = row;
      obj["name"] = "保安公司详细信息";
      console.log(obj, "obj");
      this.$router.push({
        path: `/securityCompany/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);
      }
    },
  },
};
</script>
<style>
<style lang="scss">
</style>
src/views/securityCompany/train.vue
@@ -2,8 +2,8 @@
 * @Author: Morpheus
 * @Date: 2021-07-07 17:30:05
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-07-10 16:06:14
 * menu-name 保安培训单位查询
 * @Last Modified time: 2021-07-10 16:01:42
 * menu-name 保安服务公司查询
 */
<template>
  <basic-container>
@@ -25,13 +25,29 @@
      @current-change="currentChange"
      @size-change="sizeChange"
      @refresh-change="refreshChange"
      @row-click="handleRowClick"
      @on-load="onLoad"
    >
      <!-- @row-click="handleRowClick" -->
      <template slot-scope="{ row }" slot="znum">
        <el-tag
          class="rowClickSelf"
          @click="rowClickSelf(row)"
          title="点击查看保安人员情况"
          >{{ row.znum }}</el-tag
        >
      </template>
      <template slot-scope="{ type, size, row }" slot="menu">
        <el-button
          icon="el-icon-s-custom"
          :size="size"
          :type="type"
          @click.stop="handleRowClick(row)"
          >查看
        </el-button>
        <el-button
          :size="size"
          :type="type"
          icon="el-icon-warning"
          class="zhengJian-icon"
          @click.stop="punish(row)"
          >处罚</el-button
@@ -80,9 +96,10 @@
  add,
  update,
  remove,
} from "@/api/securityCompany/train";
import { savePunish } from "@/api/securityCompany/security";
  savePunish,
} from "@/api/securityCompany/security";
import { mapGetters } from "vuex";
import { companyColimn } from "./column";
export default {
  data() {
@@ -165,73 +182,21 @@
        editBtn: false,
        addBtn: false,
        selection: true,
        searchShowBtn: false,
        // menu: false,
        menuWidth: 100,
        border: true,
        align: "center",
        height: "auto",
        calcHeight: 30,
        searchShowBtn: false,
        tip: false,
        searchShow: true,
        menuWidth: 160,
        searchMenuSpan: 6,
        index: true,
        viewBtn: true,
        dialogClickModal: false,
        column: [
          {
            label: "公司名称",
            prop: "enterprisename",
            search: true,
            searchSpan: 4,
            display: false,
          },
          {
            label: "法定代表人",
            prop: "representative",
            display: false,
            width: 120,
          },
          {
            label: "注册时间",
            prop: "establishtime",
            type: "date",
            format: "yyyy-MM-dd",
            valueFormat: "yyyy-MM-dd",
            mock: {
              type: "datetime",
              format: "yyyy-MM-dd",
            },
            search: true,
            searchSpan: 4,
            display: false,
            width: 180,
          },
          {
            label: "注册资金",
            prop: "registeredcapital",
            display: false,
            width: 130,
          },
          {
            label: "实缴资金",
            prop: "capital",
            display: false,
            width: 130,
          },
          {
            label: "公司类型",
            prop: "enterprises",
            display: false,
          },
          {
            label: "注册地址",
            prop: "address",
            display: false,
            width: 280,
          },
        ],
        column: companyColimn,
        group: [
          {
            label: "详细信息",
@@ -281,14 +246,12 @@
    },
  },
  methods: {
    punish(row) {
      //打开处罚
      // console.log(row);
      this.objf = {
        deptid: row.departmentid,
        enterprisename: row.enterprisename,
      };
      this.dialogVisible = true;
    rowClickSelf(val) {
      console.log(val.departmentid);
      this.$router.push({
        path: "/securityGuardManagement/registerOnce",
        query: { departmentid: val.departmentid },
      });
    },
    close(row) {
      this.dialogVisible = false;
@@ -322,7 +285,7 @@
      this.objf = {};
    },
    errorf(err) {
      this.$message.success("操作失败");
      this.$message.success("请查看控制台");
      console.log(err);
    },
    handleClose(done) {
@@ -335,7 +298,15 @@
      };
      done();
    },
    punish(row) {
      //打开处罚
      // console.log(row);
      this.objf = {
        deptid: row.departmentid,
        enterprisename: row.enterprisename,
      };
      this.dialogVisible = true;
    },
    rowSave(row, done, loading) {
      add(row).then(
        () => {
@@ -430,6 +401,7 @@
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        console.log(this.data);
        this.loading = false;
        this.selectionClear();
      });
@@ -439,7 +411,8 @@
    handleRowClick(row) {
      // delete (row["name"]);
      var obj = row;
      obj["name"] = "保安公司详细资料";
      obj["name"] = "保安公司详细信息";
      console.log(obj, "obj");
      this.$router.push({
        path: `/securityCompany/index`,
        query: obj,
@@ -449,5 +422,5 @@
};
</script>
<style>
<style lang="scss">
</style>
src/views/securityGuardManagement/registerOnce.vue
New file
@@ -0,0 +1,1089 @@
/*
 * @Author: Morpheus
 * @Date: 2021-07-05 16:31:54
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-07-10 15:41:13
 * 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: 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,
        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) {
        deptId = this.departmentid;
      }
      getListSecurity(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query),
        deptId
      ).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>