a
This commit is contained in:
@@ -83,9 +83,45 @@
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
|
||||
<el-table-column prop="state" label="审核状态" width="120" align="center">
|
||||
<el-table-column prop="state" label="审核状态" width="130" align="center">
|
||||
<template #default="scope">
|
||||
<AuditState :state="scope.row.state" :options="auditStateOptions" />
|
||||
<DetailPopover
|
||||
v-if="scope.row.state === '-2' && scope.row.backReason"
|
||||
title="审核详情"
|
||||
placement="top"
|
||||
:width="300"
|
||||
:items="[
|
||||
{ label: '审核状态', layout: 'horizontal', content: getAuditStateTagConfig(scope.row.state)?.label },
|
||||
{ label: '驳回理由', content: scope.row.backReason, contentClass: 'reason-content' }
|
||||
]"
|
||||
>
|
||||
<template #reference>
|
||||
<ClickableTag
|
||||
:type="getAuditStateTagConfig(scope.row.state)?.type || 'danger'"
|
||||
:left-icon="getAuditStateTagConfig(scope.row.state)?.leftIcon"
|
||||
:effect="getAuditStateTagConfig(scope.row.state)?.effect || 'dark'"
|
||||
>
|
||||
{{ getAuditStateTagConfig(scope.row.state)?.label || '已驳回' }}
|
||||
</ClickableTag>
|
||||
</template>
|
||||
<template #content-0>
|
||||
<ClickableTag
|
||||
:type="getAuditStateTagConfig(scope.row.state)?.type || 'danger'"
|
||||
:left-icon="getAuditStateTagConfig(scope.row.state)?.leftIcon"
|
||||
:effect="getAuditStateTagConfig(scope.row.state)?.effect || 'dark'"
|
||||
:right-icon="null"
|
||||
>
|
||||
{{ getAuditStateTagConfig(scope.row.state)?.label || '已驳回' }}
|
||||
</ClickableTag>
|
||||
</template>
|
||||
<template #content-1>
|
||||
<div class="reason-content">
|
||||
<el-icon class="reason-icon"><Warning /></el-icon>
|
||||
<span>{{ scope.row.backReason }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</DetailPopover>
|
||||
<AuditState v-else :state="scope.row.state" :options="auditStateOptions" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -114,8 +150,6 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="backReason" label="驳回理由" min-width="150" align="center" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="操作" width="280" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
@@ -158,7 +192,6 @@
|
||||
type="danger"
|
||||
link
|
||||
icon="delete"
|
||||
style="margin-left: 12px"
|
||||
@click="handleDel(scope.row)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -199,10 +232,12 @@ import {
|
||||
examObj,
|
||||
delObj
|
||||
} from '/@/api/professional/professionaluser/professionalteacherhonor'
|
||||
import { PROFESSIONAL_AUDIT_STATE_OPTIONS } from '/@/config/global'
|
||||
import { PROFESSIONAL_AUDIT_STATE_OPTIONS, getStatusConfig } from '/@/config/global'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
|
||||
const AuditState = defineAsyncComponent(() => import('/@/components/AuditState/index.vue'))
|
||||
const ClickableTag = defineAsyncComponent(() => import('/@/components/ClickableTag/index.vue'))
|
||||
const DetailPopover = defineAsyncComponent(() => import('/@/components/DetailPopover/index.vue'))
|
||||
const ProfessionalBackResaon = defineAsyncComponent(() => import('/@/views/professional/common/professional-back-resaon.vue'))
|
||||
const DataForm = defineAsyncComponent(() => import('./form.vue'))
|
||||
const previewFile = defineAsyncComponent(() => import('/@/components/tools/preview-file.vue'))
|
||||
@@ -217,6 +252,13 @@ const { professional_state: professionalState } = useDict('professional_state')
|
||||
// 审核状态选项
|
||||
const auditStateOptions = PROFESSIONAL_AUDIT_STATE_OPTIONS
|
||||
|
||||
// 审核状态转 ClickableTag 配置(用 options 的 icon 字符串,与 AuditState 一致为实心)
|
||||
const getAuditStateTagConfig = (state: string | number) => {
|
||||
const opt = getStatusConfig(auditStateOptions, state)
|
||||
if (!opt) return null
|
||||
return { type: opt.type, label: opt.label, leftIcon: opt.icon, effect: opt.effect || 'dark' }
|
||||
}
|
||||
|
||||
// 无权限即无节点
|
||||
const { hasAuth } = useAuth()
|
||||
|
||||
@@ -369,4 +411,29 @@ const handleDownLoadWord = async () => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/* 驳回理由展示(与 backSchoolCheckin 一致) */
|
||||
.reason-content {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 8px;
|
||||
padding: 8px 12px;
|
||||
background-color: #fef0f0;
|
||||
border-radius: 4px;
|
||||
border-left: 3px solid #f56c6c;
|
||||
|
||||
.reason-icon {
|
||||
color: #f56c6c;
|
||||
font-size: 16px;
|
||||
flex-shrink: 0;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
span {
|
||||
color: #f56c6c;
|
||||
font-size: 13px;
|
||||
line-height: 1.6;
|
||||
word-break: break-all;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user