From b752b7b4e3ec1eac6c01c036ce68e55a5bddc7ed Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Mon, 10 Jan 2022 16:58:05 +0800
Subject: [PATCH] 证书新增审核和批量审核
---
src/views/accreditationRecords/accreditationRecords.vue | 397 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
src/views/accreditationRecords/accreditationRecordsPaper.vue | 2
src/views/securityGuard/securityGuard.vue | 3
3 files changed, 389 insertions(+), 13 deletions(-)
diff --git a/src/views/accreditationRecords/accreditationRecords.vue b/src/views/accreditationRecords/accreditationRecords.vue
index 14984b3..1ba60fc 100644
--- a/src/views/accreditationRecords/accreditationRecords.vue
+++ b/src/views/accreditationRecords/accreditationRecords.vue
@@ -50,12 +50,24 @@
type="primary"
size="small"
plain
+ v-if="permission.accreditationRecords_worker_batch_audit || check"
+ icon="el-icon-collection-tag"
+ @click="handleSecurityAudit"
+ >批量审批
+ </el-button>
+ <el-button
+ type="primary"
+ size="small"
+ plain
style="display:none"
v-if="permission.accreditationRecords_status"
icon="el-icon-collection-tag"
@click="handleBatch"
>已制证
</el-button>
+ <span>
+ <Legend :datas="datalistLIU"></Legend>
+ </span>
<!-- v-if="permission.notice_delete" -->
</template>
<template slot-scope="{ row }" slot="category">
@@ -70,13 +82,29 @@
@click="handleUploadPage(row)"
>附件上传
</el-button>
- <!-- <el-button
- v-if="!deptCategory"
- :size="size"
+ <el-button
:type="type"
- @click="handleUploadPage(row)"
- >附件查看
- </el-button> -->
+ :size="size"
+ v-if="permission.accreditationRecords_worker_audit || check"
+ icon="el-icon-folder-checked"
+ @click="handleAudit(row)"
+ >审核
+ </el-button>
+ </template>
+
+ <template slot-scope="{ row }" slot="auditStatus">
+ <el-tag class="dtype">
+ {{
+ row.auditStatus == 1
+ ? "待审核"
+ : row.auditStatus == 2
+ ? "审核通过"
+ : "审核不通过"
+ }}
+ <i class="zc" v-if="row.auditStatus == 2"></i>
+ <i class="yj" v-if="row.auditStatus == 3"></i>
+ <i class="gz" v-if="row.auditStatus == 1"></i>
+ </el-tag>
</template>
<template slot-scope="{ row }" slot="deptName">
<el-tag>{{ row.deptName }}</el-tag>
@@ -87,6 +115,36 @@
}}</el-tag>
</template>
</avue-crud>
+ <el-dialog
+ title="证书申请审核"
+ :visible.sync="dialogFormVisible"
+ modal-append-to-body="false"
+ append-to-body="true"
+ :close-on-click-model="true"
+ >
+ <avue-form
+ ref="formAudit"
+ v-model="Audit"
+ :option="optionAudit"
+ @reset-change="emptytChange"
+ @submit="submit"
+ ></avue-form>
+ </el-dialog>
+ <el-dialog
+ title="批量审批"
+ append-to-body
+ :visible.sync="dialogBatchAudit"
+ width="900px"
+ @close="closeDialog"
+ >
+ <avue-form
+ ref="formBatchAudit"
+ v-model="batchAudit"
+ :option="optionBatchAudit"
+ @reset-change="emptytChange"
+ @submit="submitBatchAudit"
+ ></avue-form>
+ </el-dialog>
</basic-container>
</template>
@@ -97,17 +155,36 @@
update,
add,
getAccreditationRecords,
- batchAccreditation
+ batchAccreditation,
+ audit,
+ batchAudit,
} from "@/api/accreditationRecords/accreditationRecords";
import { getDept } from "@/api/system/dept";
import { mapGetters } from "vuex";
import { mapState } from "vuex";
import Qs from "qs";
-import website from "@/config/website";
import { getToken } from "@/util/auth";
+import Legend from "@/components/liu-legend/Legend";
export default {
+ components: {
+ Legend,
+ },
data() {
return {
+ datalistLIU: [
+ {
+ color: "#29C093",
+ text: "审核通过",
+ },
+ {
+ color: "#F34A4A",
+ text: "审核不通过",
+ },
+ {
+ color: "#F48F57",
+ text: "待审核",
+ },
+ ],
check: false,
form: {},
query: {},
@@ -125,6 +202,138 @@
total: 0,
...this.$store.state.control.changePageSize,
},
+ Audit: {},
+ dialogFormVisible: false,
+ dialogBatchAudit: false,
+ optionAudit: {
+ height: "auto",
+ calcHeight: 30,
+ dialogWidth: 1000,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true, //liu
+ index: true,
+ stripe: true,
+ viewBtn: false,
+ addBtn: false,
+ editBtn: false,
+ selection: true,
+ excelBtn: false,
+ menuWidth: 230,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "审核状态",
+ search: true,
+ searchSpan: 5,
+ span: 24,
+ prop: "auditStatus",
+ slot: true,
+ editDisplay: false,
+ addDisplay: false,
+ type: "select",
+ rules: [
+ {
+ required: true,
+ message: "请选择审核类型",
+ trigger: "blur",
+ },
+ ],
+ dicData: [
+ {
+ label: "待审核",
+ value: 1,
+ },
+ {
+ label: "审核通过",
+ value: 2,
+ },
+ {
+ label: "审核不通过",
+ value: 3,
+ },
+ ],
+ },
+ {
+ label: "审核明细",
+ span: 24,
+ type: "textarea",
+ prop: "auditDetail",
+ },
+ ],
+ },
+ batchAudit: {
+ number: 0,
+ },
+ optionBatchAudit: {
+ height: "auto",
+ filterBtn: true,
+ calcHeight: 30,
+ dialogWidth: 950,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true, //liu
+ index: true,
+ stripe: true,
+ viewBtn: true,
+ selection: false,
+ excelBtn: false,
+ menuWidth: 380,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "所选保安人数",
+ prop: "number",
+ span: 24,
+ value: 0,
+ disabled: true,
+ labelWidth: 110,
+ },
+ {
+ label: "审核状态",
+ search: true,
+ searchSpan: 5,
+ span: 24,
+ prop: "auditStatus",
+ slot: true,
+ editDisplay: false,
+ addDisplay: false,
+ type: "select",
+ rules: [
+ {
+ required: true,
+ message: "请选择审核类型",
+ trigger: "blur",
+ },
+ ],
+ dicData: [
+ {
+ label: "待审核",
+ value: 1,
+ },
+ {
+ label: "审核通过",
+ value: 2,
+ },
+ {
+ label: "审核不通过",
+ value: 3,
+ },
+ ],
+ },
+ {
+ label: "审核明细",
+ span: 24,
+ type: "textarea",
+ prop: "auditDetail",
+ },
+ ],
+ },
+ choiceList: [],
selectionList: [],
option: {
height: "auto",
@@ -135,6 +344,7 @@
reserveSelection: true,
searchShow: true,
searchMenuSpan: 6,
+ align: "center",
border: true,
index: true,
stripe: true,
@@ -144,7 +354,7 @@
addBtnText: "发布",
addTitle: "发布",
saveBtnText: "发布",
- menuWidth: 150,
+ menuWidth: 210,
dialogClickModal: false,
...this.$store.state.control.clearOtherBut,
column: [
@@ -307,6 +517,42 @@
],
},
{
+ label: "审核状态",
+ prop: "auditStatus",
+ type: "select",
+ search: true,
+ searchLabelWidth: 90,
+ width: 110,
+ searchSpan: 4,
+ addDisplay: false,
+ editDisplay: false,
+ hide: false,
+ display: false,
+ dicData: [
+ {
+ label: "待审核",
+ value: 1,
+ },
+ {
+ label: "审核通过",
+ value: 2,
+ },
+ {
+ label: "审核不通过",
+ value: 3,
+ },
+ ],
+ },
+ {
+ label: "审核明细",
+ prop: "auditDetail",
+ minWidth: 105,
+ addDisplay: false,
+ editDisplay: false,
+ hide: false,
+ display: false,
+ },
+ {
label: "是否制证",
prop: "status",
type: "select",
@@ -369,22 +615,103 @@
created() {
if (this.userInfo.role_name == "上岗证办理管理员") {
this.questionBankSearch["status"] = 1;
+ this.questionBankSearch["auditStatus"] = 2;
this.option.reserveSelection= false;
this.option.tip= false;
this.option.selection= false;
+
}
if (this.userInfo.role_name == "公安管理员") {
//判断是否为市局管理员
if (this.userInfo.jurisdiction == "1372091709474910209") {
this.check = true;
- // this.vaildData(this.permission.accreditationRecords_paper_delete, false);
} else {
this.check = false;
- // this.vaildData(null, false);
}
}
},
methods: {
+ //审核
+ handleAudit(row) {
+ this.dialogFormVisible = true;
+ this.Audit = row;
+ },
+ //审核
+ submit(row, done, loading) {
+ const data = {
+ id: row.id,
+ type:1,
+ auditStatus: row.auditStatus,
+ auditDetail: row.auditDetail,
+ auditUser: this.userInfo.Id,
+ };
+
+ audit(data).then(
+ () => {
+ this.dialogFormVisible = false;
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ //证书批量审核
+ handleSecurityAudit() {
+ if (this.choiceList.length == 0) {
+ this.$message({
+ message: "未选择保安员",
+ type: "warning",
+ });
+ return;
+ }
+ this.dialogBatchAudit = true;
+ this.batchAudit.number = this.choiceList.length;
+ },
+ //批量审批
+ submitBatchAudit(row, done, loading) {
+ var that = this;
+ let cho = this.choiceList;
+ let str = "";
+ for (let k in cho) {
+ str += cho[k].id;
+ if (k != cho.length - 1) {
+ str += ",";
+ }
+ }
+ const data = {
+ ids: str,
+ type: 1,
+ auditStatus: row.auditStatus,
+ auditDetail: row.auditDetail,
+ auditUser: this.userInfo.Id,
+ };
+ //提交申请
+ batchAudit(data).then(
+ () => {
+ this.onLoad(this.page);
+ that.$refs.formBatchAudit.resetFields();
+ that.dialogBatchAudit = false;
+ this.$message({
+ type: "success",
+ message: "操作成功",
+ });
+ //清除选项
+ that.$refs.crud.toggleSelection();
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
//证书批量修改为已制证
handleBatch() {
if (this.choiceList.length === 0) {
@@ -627,6 +954,7 @@
applyUnit: this.questionBankSearch.applyUnit,
deptName: this.questionBankSearch.deptName,
idCardNo: this.questionBankSearch.idCardNo,
+ auditStatus: this.questionBankSearch.auditStatus,
realName: this.questionBankSearch.realName,
securityNumber: this.questionBankSearch.securityNumber,
startTime: this.questionBankSearch.startTime,
@@ -660,5 +988,50 @@
};
</script>
-<style>
+<style lang="scss" scoped>
+.dtype {
+ width: 100%;
+ padding-left: 0px;
+}
+
+.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: 4px;
+ width: 10px;
+ height: 10px;
+ border-radius: 30%;
+ background: #29c093;
+}
+.yj {
+ position: absolute;
+ top: 50%;
+ margin-top: -5px;
+ margin-left: 4px;
+ width: 10px;
+ height: 10px;
+ border-radius: 30%;
+ background: #f34a4a;
+}
+.gz {
+ position: absolute;
+ top: 50%;
+ margin-top: -5px;
+ margin-left: 4px;
+ width: 10px;
+ height: 10px;
+ border-radius: 30%;
+ background: #f48f57;
+}
</style>
diff --git a/src/views/accreditationRecords/accreditationRecordsPaper.vue b/src/views/accreditationRecords/accreditationRecordsPaper.vue
index 2e7e35c..e35a4bd 100644
--- a/src/views/accreditationRecords/accreditationRecordsPaper.vue
+++ b/src/views/accreditationRecords/accreditationRecordsPaper.vue
@@ -837,6 +837,7 @@
}
const data = {
ids: str,
+ type: 2,
auditStatus: row.auditStatus,
auditDetail: row.auditDetail,
auditUser: this.userInfo.Id,
@@ -925,6 +926,7 @@
submit(row, done, loading) {
const data = {
id: row.id,
+ type:2,
auditStatus: row.auditStatus,
auditDetail: row.auditDetail,
auditUser: this.userInfo.Id,
diff --git a/src/views/securityGuard/securityGuard.vue b/src/views/securityGuard/securityGuard.vue
index cf22a33..79415c3 100644
--- a/src/views/securityGuard/securityGuard.vue
+++ b/src/views/securityGuard/securityGuard.vue
@@ -584,7 +584,8 @@
}
if (ok) {
- if(this.type==1){
+ // console.log(this.nowCell,123456);
+ if(this.type==1 || this.nowCell==2){
//修改不校验身份证hao
callback();
}else{
--
Gitblit v1.9.3