feat: 优化建档草稿和审核详情入口

This commit is contained in:
Nixevol
2026-07-05 01:55:42 +08:00
parent b736b8a105
commit 41133a3db5
8 changed files with 314 additions and 64 deletions
+30 -3
View File
@@ -22,7 +22,7 @@
class="table-fill"
flex-height
remote
:scroll-x="1180"
:scroll-x="1350"
:row-key="(r) => r.id"
@update:sorter="onSorterChange"
/>
@@ -99,7 +99,31 @@ const columns: DataTableColumns<any> = [
})
: h(NAvatar, { size: 40, style: 'border-radius:8px' }, { default: () => '—' }),
},
{ title: () => t('pages.artwork.title'), key: 'title', minWidth: 240, ellipsis: { tooltip: true } },
{
title: () => t('pages.artwork.archiveNo'),
key: 'archiveNo',
width: 170,
align: 'center',
ellipsis: { tooltip: true },
render: (r) =>
h(
NButton,
{ text: true, type: 'primary', title: t('common.action.detail'), onClick: () => goDetail(r) },
{ default: () => r.archiveNo || '-' },
),
},
{
title: () => t('pages.artwork.title'),
key: 'title',
minWidth: 240,
ellipsis: { tooltip: true },
render: (r) =>
h(
NButton,
{ text: true, type: 'primary', title: t('common.action.detail'), onClick: () => goDetail(r) },
{ default: () => r.title },
),
},
{ title: () => t('pages.artwork.artist'), key: 'artist', minWidth: 140, ellipsis: { tooltip: true }, render: (r) => r.artist || '-' },
{
title: () => renderTableFilterTitle(t('pages.audit.status'), query.auditStatus, auditStatusOptions, (value) => setAuditFilter(value)),
@@ -118,7 +142,7 @@ const columns: DataTableColumns<any> = [
align: 'center',
render: (r) =>
h('div', { class: 'row-actions' }, [
h(NButton, { quaternary: true, circle: true, size: 'small', title: t('common.action.detail'), onClick: () => router.push(`/artworks/${r.id}`) }, { icon: () => h(NIcon, null, { default: () => h(EyeOutline) }) }),
h(NButton, { quaternary: true, circle: true, size: 'small', title: t('common.action.detail'), onClick: () => goDetail(r) }, { icon: () => h(NIcon, null, { default: () => h(EyeOutline) }) }),
h(NButton, { quaternary: true, circle: true, size: 'small', type: 'success', title: t('pages.audit.approve'), disabled: r.auditStatus === 'APPROVED', onClick: () => approve(r) }, { icon: () => h(NIcon, null, { default: () => h(CheckmarkCircleOutline) }) }),
h(NButton, { quaternary: true, circle: true, size: 'small', type: 'error', title: t('pages.audit.reject'), disabled: r.auditStatus === 'REJECTED', onClick: () => openReject(r) }, { icon: () => h(NIcon, null, { default: () => h(CloseCircleOutline) }) }),
]),
@@ -151,6 +175,9 @@ function previewArtworkImages(images: any[]) {
0,
);
}
function goDetail(r: any) {
router.push(`/artworks/${r.id}`);
}
function setAuditFilter(value: string | number | null) {
query.auditStatus = value ? String(value) : null;
onSearch();