fix: 优化追溯码管理入口和筛选

This commit is contained in:
Nixevol
2026-07-05 03:59:35 +08:00
parent 6a5cebf07b
commit eecc4ceb6e
9 changed files with 58 additions and 26 deletions
+3 -1
View File
@@ -64,6 +64,7 @@ import {
GridOutline,
DocumentTextOutline,
ImagesOutline,
QrCodeOutline,
CubeOutline,
ListOutline,
PeopleOutline,
@@ -99,6 +100,7 @@ const menuOptions = computed<MenuOption[]>(() => {
{ label: t('menu.dashboard'), key: 'dashboard', icon: renderIcon(GridOutline) },
{ label: t('menu.templates'), key: 'templates', icon: renderIcon(DocumentTextOutline) },
{ label: t('menu.artworks'), key: 'artworks', icon: renderIcon(ImagesOutline) },
{ label: t('menu.traceCodes'), key: 'traceCodes', icon: renderIcon(QrCodeOutline) },
{ label: t('menu.outbound'), key: 'outbound', icon: renderIcon(CubeOutline) },
{ label: t('menu.audit'), key: 'audit', icon: renderIcon(ShieldCheckmarkOutline), auditOnly: true },
{ label: t('menu.queryLogs'), key: 'queryLogs', icon: renderIcon(ListOutline) },
@@ -111,7 +113,7 @@ const menuOptions = computed<MenuOption[]>(() => {
);
});
const activeKey = computed(() => (['artwork-detail', 'artwork-trace-codes', 'traceCodes'].includes(route.name as string) ? 'artworks' : (route.name as string)));
const activeKey = computed(() => (['artwork-detail', 'artwork-trace-codes'].includes(route.name as string) ? 'artworks' : (route.name as string)));
const currentTitle = computed(() => {
if (route.name === 'traceCodes' || route.name === 'artwork-trace-codes') return t('pages.artwork.traceCodeManage');
return activeKey.value ? t(`menu.${activeKey.value}`) : '';