feat: 完成 PRD 差距与修复,新增审核流与日志清理功能,支持出库信息与动态字段,优化 C 端用户体验

This commit is contained in:
Nixevol
2026-06-29 23:41:39 +08:00
parent d18b7c592d
commit 2fba42c9fd
39 changed files with 1247 additions and 185 deletions
+6 -2
View File
@@ -67,6 +67,7 @@ import {
PersonCircleOutline,
LogOutOutline,
KeyOutline,
ShieldCheckmarkOutline,
} from '@vicons/ionicons5';
import { useAuthStore } from '@/stores/auth';
import { settingsApi } from '@/api';
@@ -87,17 +88,20 @@ function renderIcon(icon: unknown) {
}
const menuOptions = computed<MenuOption[]>(() => {
const items: Array<MenuOption & { superOnly?: boolean }> = [
const items: Array<MenuOption & { superOnly?: boolean; auditOnly?: boolean }> = [
{ 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) },
{ label: t('menu.users'), key: 'users', icon: renderIcon(PeopleOutline), superOnly: true },
{ label: t('menu.settings'), key: 'settings', icon: renderIcon(SettingsOutline), superOnly: true },
];
return items.filter((i) => !i.superOnly || auth.isSuperAdmin);
return items.filter(
(i) => (!i.superOnly || auth.isSuperAdmin) && (!i.auditOnly || auth.canAudit),
);
});
const activeKey = computed(() => (route.name === 'artwork-detail' ? 'artworks' : (route.name as string)));