'处理字典选择、展示处理'
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
<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="save" type="primary" :loading="loading">保存</el-button> -->
|
||||
<el-button size="small" @click="close">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@ -25,10 +25,13 @@
|
||||
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn"
|
||||
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"
|
||||
>
|
||||
<template #xxpxsc="{ row }">
|
||||
<span>{{ row.xxpxsc }}h</span>
|
||||
</template>
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
<el-link v-if="!visible && row?.ksfs >= 60" @click="handleCertificate(row)">申请证件</el-link>
|
||||
<template v-if="visible">
|
||||
<template v-if="visible && row?.ksfs ==='01'">
|
||||
<el-link v-if="!row?.ksfs" type="primary" @click="addEdit('updata', row)">上传成绩</el-link>
|
||||
<el-link v-else type="primary" @click="addEdit('view', row)">查看成绩</el-link>
|
||||
</template>
|
||||
@ -49,9 +52,7 @@ import viewAndUploadDialog from './viewAndUploadDialog.vue';
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { D_BAXX_KSFS } = proxy.$dict("D_BAXX_KSFS")
|
||||
const title = ref('保安线下考试详情')
|
||||
const loading = ref(false)
|
||||
const disabled = ref(false)
|
||||
const FormRef = ref(null)
|
||||
const visible = ref(true)
|
||||
const viewAndUploadRef = ref(null)
|
||||
const viewAndUploadVisible = ref(false)
|
||||
@ -96,8 +97,8 @@ const pageData = reactive({
|
||||
{ label: "姓名", prop: "xm" },
|
||||
{ label: "证件号码", prop: "sfzh" },
|
||||
{ label: "联系方式", prop: "lxdh" },
|
||||
{ label: "线上培训时间", prop: "xspxsc" },
|
||||
{ label: "线下培训课程", prop: "xxpxsc" },
|
||||
{ label: "线上培训时间", prop: "xxpxsc", showSolt: true },
|
||||
{ label: "线下培训课程", prop: "xxpxkc" },
|
||||
{ label: "考试成绩", prop: "ksfs" },
|
||||
]
|
||||
});
|
||||
@ -113,7 +114,7 @@ const getList = async ({ id = "" }, type = '') => {
|
||||
const res = await qcckPost({
|
||||
...pageData.pageConfiger,
|
||||
// sfcjpx: 1,
|
||||
ksglid: id
|
||||
// ksglid: id
|
||||
}, `/mosty-base/baxx/ksry/list`)
|
||||
if (res) {
|
||||
pageData.tableData = res.records || [];
|
||||
@ -128,7 +129,7 @@ const open = (row = {}, type = 'add') => {
|
||||
dialogVisible.value = true
|
||||
formData.value = { ...row }
|
||||
if (type === 'view') {
|
||||
title.value = '保安线下考试详情'
|
||||
title.value = `保安线${formData.value?.ksfs ==='01' ? '下' : '上'}考试详情`
|
||||
visible.value = true
|
||||
} else if (type === 'edit') {
|
||||
title.value = '保安证申请'
|
||||
@ -136,21 +137,6 @@ const open = (row = {}, type = 'add') => {
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
const addEdit = (type, row) => {
|
||||
viewAndUploadRef.value?.open(row, type)
|
||||
}
|
||||
@ -174,8 +160,13 @@ defineExpose({ open })
|
||||
@import "@/assets/css/layout.scss";
|
||||
|
||||
.label {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
background: var(--el-fill-color-light);
|
||||
}
|
||||
|
||||
.cntinfo {
|
||||
|
||||
Reference in New Issue
Block a user