shuishen
2021-11-05 5b9aded57ee94d0d8f7188d2abe4ec79cf8111b5
保安证件相关修改
3 files modified
1 files added
349 ■■■■■ changed files
src/router/views/index.js 22 ●●●● patch | view | raw | blame | history
src/views/securityGuard/certificateOfPrint.vue 65 ●●●●● patch | view | raw | blame | history
src/views/securityGuard/data.js 32 ●●●●● patch | view | raw | blame | history
src/views/securityGuard/securityGuard.vue 230 ●●●● patch | view | raw | blame | history
src/router/views/index.js
@@ -502,7 +502,8 @@
      component: () =>
        import( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuardDetail')
    }]
  }, {
  },
  {
    path: '/resource',
    component: Layout,
    redirect: '/resource/attach',
@@ -978,7 +979,8 @@
      },
      component: () =>
        import( /* webpackChunkName: "views" */ '@/views/trainExam/modifiedGrades')
    }]
      }
    ]
  },
  {
@@ -994,5 +996,19 @@
      component: () =>
        import( /* webpackChunkName: "views" */ '@/views/accreditationRecords/accreditationRecords')
    }]
  }
  },
  {
    path: '/certificateOfPrint',
    component: Layout,
    redirect: '/certificateOfPrint/index',
    children: [{
      path: 'index',
      name: '纸质证书制作',
      meta: {
        i18n: 'index'
      },
      component: () =>
        import( /* webpackChunkName: "views" */ '@/views/securityGuard/certificateOfPrint')
    }]
  },
]
src/views/securityGuard/certificateOfPrint.vue
New file
@@ -0,0 +1,65 @@
<template>
    <el-row class='securityGuard'>
        <el-col :span="24">
            <basic-container>
                <securityCertificate :data="obj0"
                                     v-if="hold == 1"></securityCertificate>
                <div v-else
                     style="width: 100%; text-align: center; padding-top: 20px">
                    无保安员证
                </div>
            </basic-container>
        </el-col>
    </el-row>
</template>
<script>
import securityCertificate from "./securityCertificate.vue";
import baoanz from "./baoanz.vue";
export default {
    components: {
        securityCertificate: securityCertificate,
        baoanz,
    },
    data () {
        return {
            obj0: {
                title: "我是头部标题",
            },
            hold: "",
        };
    },
    mounted () {
        var data = JSON.parse(this.$route.query.row);
        if (data) {
            var row = data;
            for (var k in row) {
                this.obj0[k] = row[k];
            }
            this.obj0.title = "";
            this.hold = row.hold;
        }
        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 lang="scss">
</style>
src/views/securityGuard/data.js
@@ -666,8 +666,7 @@
    searchSpan: 3,
    width: 69,
    type: "select",
    dicData: [
        {
    dicData: [{
            label: "是",
            value: "1",
        },
@@ -694,6 +693,35 @@
    }],
},
  {
    label: "是否制证",
    prop: "userType",
    // dicUrl: "/api/blade-system/dict-biz/dictionary?code=equipage",
    // props: {
    //   label: "dictValue",
    //   value: "dictKey",
    // },
    type: "select",
    slot: true,
    search: true,
    searchSpan: 3,
    width: 69,
    dicData: [{
        label: "已制证",
        value: 6,
      },
      {
        label: "未制证",
        value: 7,
      }
    ],
    rules: [{
      required: true,
      message: "请选择",
      trigger: "blur",
    }, ],
  },
// {
//     label: "发证日期",
//     prop: "papertime",
src/views/securityGuard/securityGuard.vue
@@ -1,22 +1,20 @@
<template>
  <el-row :class="{ securityGuard: isSecurity }">
    <el-col :span="0" style="display: none">
        <el-col :span="0"
                style="display: none">
      <div class="box">
        <el-scrollbar>
          <basic-container>
            <avue-tree
              :option="treeOption"
                        <avue-tree :option="treeOption"
              :data="treeData"
              @node-click="nodeClick"
            />
                                   @node-click="nodeClick" />
          </basic-container>
        </el-scrollbar>
      </div>
    </el-col>
    <el-col :span="24">
      <basic-container>
        <avue-crud
          :option="option"
                <avue-crud :option="option"
          :search.sync="search"
          :table-loading="loading"
          :data="data"
@@ -35,206 +33,189 @@
          @current-change="currentChange"
          @size-change="sizeChange"
          @refresh-change="refreshChange"
          @on-load="onLoad"
        >
                           @on-load="onLoad">
          <!-- @row-update="rowUpdate" -->
          <template slot="menuLeft">
            <el-button
              type="success"
                        <el-button type="success"
              size="small"
              plain
              icon="el-icon-upload2"
              v-if="permission.securityGuard_import"
              @click="handleImport1"
              >保安员批量导入
                                   @click="handleImport1">保安员批量导入
            </el-button>
            <el-button
              type="success"
                        <el-button type="success"
              size="small"
              plain
              icon="el-icon-upload2"
              v-if="permission.securityGuard_import"
              @click="handleImport2"
              >个人照片批量上传
                                   @click="handleImport2">个人照片批量上传
            </el-button>
            <el-button
              type="primary"
                        <el-button type="primary"
              size="small"
              plain
              v-if="permission.securityGuard_security_apply"
              icon="el-icon-s-promotion"
              @click="handleSecurityApply"
              >制证申请
                                   @click="handleSecurityApply">上岗证制证申请
            </el-button>
            <el-button
              type="danger"
                        <el-button type="danger"
              style="display: none"
              size="small"
              plain
              icon="el-icon-delete"
              @click="handleDelete"
              >注 销
                                   @click="handleDelete">注 销
            </el-button>
            <el-button
              type="info"
                        <el-button type="info"
              style="display: none"
              size="small"
              plain
              v-if="permission.user_role"
              icon="el-icon-user"
              @click="handleGrant"
              >角色配置
                                   @click="handleGrant">角色配置
            </el-button>
            <el-button
              type="info"
                        <el-button type="info"
              style="display: none"
              size="small"
              plain
              v-if="permission.user_reset"
              icon="el-icon-refresh"
              @click="handleReset"
              >密码重置
                                   @click="handleReset">密码重置
            </el-button>
            <el-button
              type="info"
                        <el-button type="info"
              style="display: none"
              size="small"
              plain
              v-if="userInfo.role_name.includes('admin')"
              icon="el-icon-setting"
              @click="handlePlatform"
              >平台配置
                                   @click="handlePlatform">平台配置
            </el-button>
            <el-button
              type="success"
                        <el-button type="success"
              style="display: none"
              size="small"
              plain
              v-if="userInfo.role_name.includes('admin')"
              icon="el-icon-upload2"
              @click="handleImport"
              >导入
                                   @click="handleImport">导入
            </el-button>
            <el-button
              type="warning"
                        <el-button type="warning"
              style="display: none"
              size="small"
              plain
              v-if="userInfo.role_name.includes('admin')"
              icon="el-icon-download"
              @click="handleExport"
              >导出
                                   @click="handleExport">导出
            </el-button>
          </template>
          <template slot-scope="{ type, size, row }" slot="menu">
            <el-button
              icon="el-icon-s-custom"
                    <template slot-scope="{ type, size, row }"
                              slot="menu">
                        <el-button icon="el-icon-s-custom"
              :size="size"
              :type="type"
              @click.stop="rowClick(row)"
              >查看
                                   @click.stop="rowClick(row)">查看
            </el-button>
            <el-button
              icon="el-icon-edit"
                        <el-button icon="el-icon-edit"
              :size="size"
              :type="type"
              v-if="permission.securityGuard_delete && row.status != 2"
              @click.stop="rowStatus(row)"
              >离职登记
                                   @click.stop="rowStatus(row)">离职登记
            </el-button>
            <el-button
              icon="el-icon-edit"
                        <el-button icon="el-icon-edit"
              :size="size"
              :type="type"
              v-if="row.status == 2"
              @click.stop="rowDellook(row)"
              >离职查询
                                   @click.stop="rowDellook(row)">离职查询
            </el-button>
            <el-button
              icon="el-icon-edit"
                        <el-button icon="el-icon-edit"
              :size="size"
              :type="type"
              v-if="permission.securityGuard_check"
              @click.stop="rowCheck(row)"
              >异常
                                   @click.stop="rowCheck(row)">异常
                        </el-button>
                        <el-button icon="el-icon-edit"
                                   :size="size"
                                   :type="type"
                                   v-if="permission.securityGuard_check"
                                   @click.stop="certificateClick(row)">纸质证书制作
            </el-button>
          </template>
          <template slot-scope="{ row }" slot="sex">
                    <template slot-scope="{ row }"
                              slot="sex">
            <el-tag v-if="row.sex == 1">男</el-tag>
            <el-tag v-if="row.sex == 2">女</el-tag>
          </template>
          <template slot-scope="{ row }" slot="deptId">
            <el-tag
              class="rowClickSelf"
                    <template slot-scope="{ row }"
                              slot="deptId">
                        <el-tag class="rowClickSelf"
              title="点击查看所属公司情况"
              @click="rowClickSelf(row.deptId)"
              >{{ row.deptName }}</el-tag
            >
                                @click="rowClickSelf(row.deptId)">{{ row.deptName }}</el-tag>
          </template>
          <template slot-scope="{ row }" slot="tenantName">
                    <template slot-scope="{ row }"
                              slot="tenantName">
            <el-tag>{{ row.tenantName }}</el-tag>
          </template>
          <template slot-scope="{ row }" slot="roleName">
                    <template slot-scope="{ row }"
                              slot="roleName">
            <el-tag>{{ row.roleName }}</el-tag>
          </template>
          <template slot-scope="{ row }" slot="deptName">
                    <template slot-scope="{ row }"
                              slot="deptName">
            <el-tag>{{ row.deptName }}</el-tag>
          </template>
          <template slot-scope="{ row }" slot="userTypeName">
                    <template slot-scope="{ row }"
                              slot="userTypeName">
            <el-tag>{{ row.userTypeName }}</el-tag>
          </template>
                    <template slot-scope="{ row }"
                              slot="userType">
                        {{
                                row.userType == 6 ? '已制证' : row.userType == 7 ? '未制证' : ''
                              }}
                    </template>
        </avue-crud>
        <el-dialog
          title="用户角色配置"
                <el-dialog title="用户角色配置"
          append-to-body
          :visible.sync="roleBox"
          width="345px"
        >
          <el-tree
            :data="roleGrantList"
                           width="345px">
                    <el-tree :data="roleGrantList"
            show-checkbox
            check-strictly
            default-expand-all
            node-key="id"
            ref="treeRole"
            :default-checked-keys="roleTreeObj"
            :props="props"
          >
                             :props="props">
          </el-tree>
          <span slot="footer" class="dialog-footer">
                    <span slot="footer"
                          class="dialog-footer">
            <el-button @click="roleBox = false">取 消</el-button>
            <el-button type="primary" @click="submitRole">确 定</el-button>
                        <el-button type="primary"
                                   @click="submitRole">确 定</el-button>
          </span>
        </el-dialog>
        <el-dialog
          title="用户数据导入"
                <el-dialog title="用户数据导入"
          append-to-body
          :visible.sync="excelBox"
          width="555px"
        >
          <avue-form
            :option="excelOption"
                           width="555px">
                    <avue-form :option="excelOption"
            v-model="excelForm"
            :upload-after="uploadAfter"
          >
                               :upload-after="uploadAfter">
            <template slot="excelTemplate">
              <el-button type="primary" @click="handleTemplate">
                            <el-button type="primary"
                                       @click="handleTemplate">
                点击下载<i class="el-icon-download el-icon--right"></i>
              </el-button>
            </template>
          </avue-form>
        </el-dialog>
        <el-dialog
          title="用户平台配置"
                <el-dialog title="用户平台配置"
          append-to-body
          :visible.sync="platformBox"
        >
          <avue-crud
            :option="platformOption"
                           :visible.sync="platformBox">
                    <avue-crud :option="platformOption"
            :table-loading="platformLoading"
            :data="platformData"
            ref="platformCrud"
@@ -249,45 +230,39 @@
            @current-change="platformCurrentChange"
            @size-change="platformSizeChange"
            @refresh-change="platformRefreshChange"
            @on-load="platformOnLoad"
          >
            <template slot-scope="{ row }" slot="tenantName">
                               @on-load="platformOnLoad">
                        <template slot-scope="{ row }"
                                  slot="tenantName">
              <el-tag>{{ row.tenantName }}</el-tag>
            </template>
            <template slot-scope="{ row }" slot="userTypeName">
                        <template slot-scope="{ row }"
                                  slot="userTypeName">
              <el-tag>{{ row.userTypeName }}</el-tag>
            </template>
          </avue-crud>
        </el-dialog>
        <el-dialog
          title="保安员导入"
                <el-dialog title="保安员导入"
          append-to-body
          :visible.sync="excelBox1"
          width="555px"
        >
          <avue-form
            :option="excelOption1"
                           width="555px">
                    <avue-form :option="excelOption1"
            v-model="excelForm1"
            :upload-after="uploadAfter1"
          >
                               :upload-after="uploadAfter1">
            <template slot="excelTemplate">
              <el-button type="primary" @click="handleTemplate1">
                            <el-button type="primary"
                                       @click="handleTemplate1">
                点击下载<i class="el-icon-download el-icon--right"></i>
              </el-button>
            </template>
          </avue-form>
        </el-dialog>
        <el-dialog
          title="个人照片批量上传"
                <el-dialog title="个人照片批量上传"
          append-to-body
          :visible.sync="excelBox2"
          width="555px"
        >
          <avue-form
            :option="excelOption2"
                           width="555px">
                    <avue-form :option="excelOption2"
            v-model="excelForm2"
            :upload-after="uploadAfter2"
          >
                               :upload-after="uploadAfter2">
          </avue-form>
        </el-dialog>
      </basic-container>
@@ -1090,6 +1065,14 @@
        query: { row: JSON.stringify(row) },
      });
    },
        //行点击事件
        certificateClick (row) {
            // console.log(row, 111);
            this.$router.push({
                path: "/certificateOfPrint",
                query: { row: JSON.stringify(row) },
            });
        },
    rowClickSelf(row) {
      console.log(row, "baoan");
      this.$router.push({
@@ -1416,18 +1399,15 @@
        type: "warning",
      }).then(() => {
        window.open(
          `/api/blade-user/export-user?${
            this.website.tokenHeader
          }=${getToken()}&account=${this.search.account}&realName=${
            this.search.realName
                    `/api/blade-user/export-user?${this.website.tokenHeader
                    }=${getToken()}&account=${this.search.account}&realName=${this.search.realName
          }`
        );
      });
    },
    handleTemplate() {
      window.open(
        `/api/blade-user/export-template?${
          this.website.tokenHeader
                `/api/blade-user/export-template?${this.website.tokenHeader
        }=${getToken()}`
      );
    },