fix: 区分正式审核状态和修改稿状态

This commit is contained in:
Nixevol
2026-07-05 03:25:01 +08:00
parent 0a4da47246
commit a48d7949e7
5 changed files with 99 additions and 38 deletions
+25 -10
View File
@@ -113,18 +113,26 @@ const columns: DataTableColumns<any> = [
{
title: () => renderTableFilterTitle(t('pages.audit.status'), query.auditStatus, auditStatusOptions, (value) => setFilter('auditStatus', value)),
key: 'auditStatus',
width: 124,
width: 174,
align: 'center',
render: (r) =>
h(
NTag,
{
size: 'small',
type: (r.effectiveAuditStatus || r.auditStatus) === 'APPROVED' ? 'success' : (r.effectiveAuditStatus || r.auditStatus) === 'REJECTED' ? 'error' : 'warning',
title: r.effectiveAuditRemark || r.latestRevision?.auditRemark || '',
},
{ default: () => t(`common.auditStatus.${r.effectiveAuditStatus || r.auditStatus || 'PENDING'}`) },
),
h('div', { class: 'audit-tags' }, [
h(
NTag,
{ size: 'small', type: r.auditStatus === 'APPROVED' ? 'success' : r.auditStatus === 'REJECTED' ? 'error' : 'warning', title: r.auditRemark || '' },
{ default: () => t(`common.auditStatus.${r.auditStatus || 'PENDING'}`) },
),
r.auditStatus === 'APPROVED' && r.latestRevision?.status === 'PENDING'
? h(NTag, { size: 'small', type: 'warning', title: t('pages.audit.pendingRevisionTip') }, { default: () => t('pages.artwork.pendingChange') })
: null,
r.auditStatus === 'APPROVED' && r.latestRevision?.status === 'REJECTED'
? h(
NTag,
{ size: 'small', type: 'error', title: r.latestRevision.auditRemark || t('pages.audit.rejectedRevisionTip') },
{ default: () => t('pages.artwork.rejectedChange') },
)
: null,
]),
},
{ title: () => t('common.label.createdAt'), key: 'createdAt', width: 150, align: 'center', ellipsis: { tooltip: true }, render: (r) => fmt(r.createdAt), ...sortProps('createdAt') },
{
@@ -233,4 +241,11 @@ onMounted(load);
align-items: center;
gap: 6px;
}
.audit-tags {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 4px;
white-space: nowrap;
}
</style>