2025-09-22 14:21:17 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="dialog" v-if="dialogVisible">
|
|
|
|
|
<div class="head_box">
|
|
|
|
|
<span class="title">{{ title }}</span>
|
|
|
|
|
<div>
|
|
|
|
|
<el-button size="small" @click="save" type="primary" :loading="loading">保存</el-button>
|
|
|
|
|
<el-button size="small" @click="close">关闭</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cntinfo">
|
2025-09-22 17:16:08 +08:00
|
|
|
<template v-if="visible">
|
2025-09-22 19:00:51 +08:00
|
|
|
<el-descriptions column="2" border label-width="120px">
|
2025-09-23 18:03:42 +08:00
|
|
|
<el-descriptions-item label="培训项目名称">{{ formData.xmmc }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="考试时间">{{ formData.kssj }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="考试辖区">{{ formData.ksxq }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="考试地址">{{ formData.ksdz }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="监考民警">{{ formData.jkmj }}</el-descriptions-item>
|
2025-09-24 17:35:24 +08:00
|
|
|
<el-descriptions-item label="考试方式">
|
|
|
|
|
<DictTag :value="formData.ksfs" :options="D_BAXX_KSFS" />
|
|
|
|
|
</el-descriptions-item>
|
2025-09-22 14:21:17 +08:00
|
|
|
</el-descriptions>
|
2025-09-22 17:16:08 +08:00
|
|
|
</template>
|
2025-09-22 14:21:17 +08:00
|
|
|
|
|
|
|
|
<!-- <el-descriptions title="考试人员" column="2" border class="mt20"> -->
|
|
|
|
|
<div class="label">考试人员</div>
|
|
|
|
|
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn"
|
|
|
|
|
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"
|
|
|
|
|
>
|
|
|
|
|
<!-- 操作 -->
|
|
|
|
|
<template #controls="{ row }">
|
2025-09-24 17:35:24 +08:00
|
|
|
<el-link v-if="!visible" @click="handleCertificate(row)">申请证件</el-link>
|
2025-09-22 17:16:08 +08:00
|
|
|
<template v-else>
|
|
|
|
|
<el-link type="primary" @click="addEdit('updata', row)">上传成绩</el-link>
|
|
|
|
|
<el-link type="primary" @click="addEdit('view', row)">查看成绩</el-link>
|
|
|
|
|
</template>
|
2025-09-22 14:21:17 +08:00
|
|
|
</template>
|
|
|
|
|
</MyTable>
|
|
|
|
|
<!-- </el-descriptions> -->
|
|
|
|
|
|
2025-09-24 17:35:24 +08:00
|
|
|
<view-and-upload-dialog ref="viewAndUploadRef" v-model="viewAndUploadVisible" @refresh="getList" />
|
2025-09-22 14:21:17 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
import { ref, computed, reactive, getCurrentInstance } from 'vue'
|
|
|
|
|
import { qcckPost } from "@/api/qcckApi.js";
|
|
|
|
|
import MyTable from '@/components/aboutTable/MyTable.vue';
|
|
|
|
|
import viewAndUploadDialog from './viewAndUploadDialog.vue';
|
|
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance()
|
2025-09-24 17:35:24 +08:00
|
|
|
const { D_BAXX_KSFS } = proxy.$dict("D_BAXX_KSFS")
|
2025-09-22 14:21:17 +08:00
|
|
|
const title = ref('保安线下考试详情')
|
|
|
|
|
const loading = ref(false)
|
|
|
|
|
const disabled = ref(false)
|
|
|
|
|
const FormRef = ref(null)
|
2025-09-22 17:16:08 +08:00
|
|
|
const visible = ref(true)
|
|
|
|
|
const viewAndUploadRef = ref(null)
|
|
|
|
|
const viewAndUploadVisible = ref(false)
|
2025-09-22 14:21:17 +08:00
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
modelValue: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default: false
|
|
|
|
|
},
|
|
|
|
|
dic: {
|
|
|
|
|
type: Object,
|
|
|
|
|
default: () => ({})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
2025-09-24 17:35:24 +08:00
|
|
|
const emits = defineEmits(['update:modelValue', 'refresh'])
|
2025-09-22 14:21:17 +08:00
|
|
|
|
|
|
|
|
const dialogVisible = computed({
|
|
|
|
|
get() {
|
|
|
|
|
return props.modelValue
|
|
|
|
|
},
|
|
|
|
|
set(val) {
|
|
|
|
|
emits('update:modelValue', val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const pageData = reactive({
|
|
|
|
|
tableData: [{}],
|
|
|
|
|
keyCount: 0,
|
|
|
|
|
tableConfiger: {
|
|
|
|
|
rowHieght: 61,
|
|
|
|
|
showSelectType: "null",
|
|
|
|
|
loading: false
|
|
|
|
|
},
|
|
|
|
|
total: 0,
|
|
|
|
|
pageConfiger: {
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
pageCurrent: 1
|
|
|
|
|
},
|
|
|
|
|
controlsWidth: 180,
|
|
|
|
|
tableColumn: [
|
|
|
|
|
{ label: "姓名", prop: "xm" },
|
|
|
|
|
{ label: "证件号码", prop: "sfzh" },
|
|
|
|
|
{ label: "联系方式", prop: "lxdh" },
|
|
|
|
|
{ label: "线上培训时间", prop: "sfzh" },
|
|
|
|
|
{ label: "线下培训课程", prop: "lxdh" },
|
|
|
|
|
{ label: "考试成绩", prop: "lxdh" },
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const formData = ref({})
|
|
|
|
|
|
|
|
|
|
const close = () => {
|
|
|
|
|
dialogVisible.value = false
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-24 17:35:24 +08:00
|
|
|
// 根据项目id获取培训人员
|
|
|
|
|
const getList = async ({ id = "" }) => {
|
|
|
|
|
const res = await qcckPost({
|
|
|
|
|
...pageData.pageConfiger,
|
|
|
|
|
sfcjpx: 1,
|
|
|
|
|
pxxmid: id
|
|
|
|
|
}, `/mosty-base/baxx/pxry/page`)
|
|
|
|
|
if (res) {
|
|
|
|
|
pageData.tableData = res.records || [];
|
|
|
|
|
pageData.total = res.total;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-22 14:21:17 +08:00
|
|
|
const open = (row = {}, type = 'add') => {
|
2025-09-24 17:35:24 +08:00
|
|
|
getList(row)
|
2025-09-22 14:21:17 +08:00
|
|
|
disabled.value = false
|
|
|
|
|
dialogVisible.value = true
|
|
|
|
|
formData.value = { ...row }
|
2025-09-22 17:16:08 +08:00
|
|
|
if (type === 'view') {
|
|
|
|
|
title.value = '保安线下考试详情'
|
|
|
|
|
visible.value = true
|
2025-09-22 14:21:17 +08:00
|
|
|
} else if (type === 'edit') {
|
2025-09-22 17:16:08 +08:00
|
|
|
title.value = '保安证申请'
|
|
|
|
|
visible.value = false
|
2025-09-22 14:21:17 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const save = () => {
|
|
|
|
|
FormRef.value.submit(() => {
|
|
|
|
|
loading.value = true;
|
|
|
|
|
const url = !formData.value?.id ? `/mosty-base/baxx/cyry/add` : `/mosty-base/baxx/cyry/edit`;
|
|
|
|
|
qcckPost(formData.value, url).then(() => {
|
|
|
|
|
loading.value = false;
|
|
|
|
|
proxy.$message.success("保存成功");
|
|
|
|
|
emits("refresh");
|
|
|
|
|
close();
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
loading.value = false;
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-22 17:16:08 +08:00
|
|
|
const addEdit = (type, row) => {
|
|
|
|
|
viewAndUploadRef.value?.open(row, type)
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-24 17:35:24 +08:00
|
|
|
// 申请保安证
|
|
|
|
|
const handleCertificate = async ({ pxryid = ''}) => {
|
|
|
|
|
try {
|
|
|
|
|
await qcckPost({ id: pxryid }, `/mosty-base/baxx/pxry/sqzj`)
|
|
|
|
|
proxy.$message.success("申请证件成功")
|
|
|
|
|
emits("refresh");
|
|
|
|
|
close();
|
|
|
|
|
} catch (error) {
|
|
|
|
|
proxy.$message.success("申请证件失败")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-22 14:21:17 +08:00
|
|
|
defineExpose({ open })
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
@import "@/assets/css/layout.scss";
|
|
|
|
|
|
|
|
|
|
.label {
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
color: #000;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.cntinfo {
|
|
|
|
|
padding: 2rem 12rem 0rem 12rem;
|
|
|
|
|
height: calc(100% - 70px);
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mapBox {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 400px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
</style>
|