refactor: 拆分档案详情与追溯码管理

This commit is contained in:
Nixevol
2026-07-03 04:28:18 +08:00
parent b95e9f8949
commit 9eda1b722a
8 changed files with 121 additions and 29 deletions
+34 -7
View File
@@ -44,7 +44,7 @@ import { h, onMounted, reactive, ref } from 'vue';
import { useRouter } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { NButton, NIcon, NTag, NAvatar, type DataTableColumns } from 'naive-ui';
import { SearchOutline, AddOutline, CreateOutline } from '@vicons/ionicons5';
import { SearchOutline, AddOutline, CreateOutline, BarChartOutline } from '@vicons/ionicons5';
import { ArtworkStatus } from '@artveris/shared';
import { artworkApi } from '@/api';
import { useAuthStore } from '@/stores/auth';
@@ -102,13 +102,32 @@ const columns: DataTableColumns<any> = [
{
title: () => t('common.label.operation'),
key: 'ops',
width: 90,
width: 112,
render: (r) =>
h(
NButton,
{ quaternary: true, circle: true, size: 'small', onClick: () => router.push(`/artworks/${r.id}`) },
{ icon: () => h(NIcon, null, { default: () => h(CreateOutline) }) },
),
h('div', { class: 'row-actions' }, [
h(
NButton,
{
quaternary: true,
circle: true,
size: 'small',
title: t('pages.artwork.editDetail'),
onClick: () => router.push(`/artworks/${r.id}`),
},
{ icon: () => h(NIcon, null, { default: () => h(CreateOutline) }) },
),
h(
NButton,
{
quaternary: true,
circle: true,
size: 'small',
title: t('pages.artwork.dataManage'),
onClick: () => router.push(`/artworks/${r.id}/trace-codes`),
},
{ icon: () => h(NIcon, null, { default: () => h(BarChartOutline) }) },
),
]),
},
];
@@ -142,3 +161,11 @@ function goCreate() {
onMounted(load);
</script>
<style scoped>
.row-actions {
display: inline-flex;
align-items: center;
gap: 6px;
}
</style>