update:添加管理员审查

This commit is contained in:
2021-04-19 18:03:57 +08:00
parent 812fc89f9f
commit fe4a3287f0
3 changed files with 157 additions and 0 deletions

3
src/views/Admin.vue Normal file
View File

@@ -0,0 +1,3 @@
<template>
<router-view></router-view>
</template>

146
src/views/Admin/Audit.vue Normal file
View File

@@ -0,0 +1,146 @@
<template>
<a-table
:dataSource="userApplyList"
:columns="columnsUserApply"
rowKey="id"
bordered
>
<template #title> 个人数字证书申领 </template>
<template #idCard="{ record }">
<span
>{{ record.idCardNo }}
<a-image :height="40" :width="40" :src="record.idCardPicPath" />
</span>
</template>
<template #action="{ record }">
<span>
<a-divider type="vertical" />
<a @click="pass(record.id, 0)">通过</a>
<a-divider type="vertical" />
<a @click="fail(record, 0)">拒绝</a>
</span>
</template>
</a-table>
<a-table :dataSource="unitApplyList" :columns="columnsUnitApply" bordered>
<template v-slot:title> 企业法人数字证书申领 </template>
</a-table>
</template>
<script>
import { onMounted, ref, inject } from "vue";
import { get, post } from "@/services/http";
import { Modal } from "ant-design-vue";
export default {
name: "audit",
setup() {
var userApplyList = ref([]);
var unitApplyList = ref([]);
const useReload = inject("reload");
onMounted(async () => {
var res = await get("/api2/CA/getAuditList");
if (res.errorCode == 0) {
userApplyList.value = res.data.userApplyList;
unitApplyList.value = res.data.unitApplyList;
}
});
var pass = async (id, type) => {
var res = await post("/api2/CA/auditUserApply", { id, type, pass: true });
if (res.errorCode == 0) {
Modal.success({
content: "操作成功",
onOk: useReload
});
} else {
Modal.error({
content: res.errorMsg
});
}
};
var fail = async (record, type) => {
Modal.confirm({
title: "确认",
content: "拒绝" + record.idCardName + "的申领请求?",
async onOk() {
var res = await post("/api2/CA/auditUserApply", {
id: record.id,
type,
pass: false,
dealReason: "管理员拒绝"
});
if (res.errorCode == 0) {
Modal.success({
content: "操作成功",
onOk: useReload
});
}
}
});
};
return {
userApplyList,
columnsUserApply: [
{
title: "姓名",
dataIndex: "idCardName",
key: "idCardName"
},
{
title: "身份证号",
dataIndex: "idCardNo",
key: "idCardNo",
slots: { customRender: "idCard" }
},
{
title: "手机号码",
dataIndex: "phone",
key: "phone"
},
{
title: "单位名称",
dataIndex: "unitName",
key: "unitName"
},
{
title: "操作",
dataIndex: "action",
slots: { customRender: "action" }
}
],
unitApplyList,
columnsUnitApply: [
{
title: "企业名称",
dataIndex: "unitName",
key: "unitName"
},
{
title: "统一代码",
dataIndex: "tydm",
key: "tydm"
},
{
title: "经办人姓名",
dataIndex: "operatorName",
key: "operatorName"
},
{
title: "经办人身份证号",
dataIndex: "operatorId",
key: "operatorId"
},
{
title: "经办人手机号",
dataIndex: "operatorPhone",
key: "operatorPhone"
},
{
title: "申请材料",
dataIndex: "affix",
key: "affix"
}
],
pass,
fail
};
}
};
</script>

View File

@@ -0,0 +1,8 @@
<template>
<router-view></router-view>
</template>
<script>
export default {
name: "index"
};
</script>