feat: 完成系统监控页面

This commit is contained in:
chenchun
2026-01-05 15:44:48 +08:00
parent 6101ea46d3
commit b4a97e8b09
7 changed files with 43 additions and 178 deletions

View File

@@ -19,7 +19,8 @@ const userStore = useUserStore();
const userName = userStore.userInfo?.user?.userName;
const hasPermission = checkPagePermission('/console/channel', userName);
const hasChannelPermission = checkPagePermission('/console/channel', userName);
const hasSystemStatisticsPermission = checkPagePermission('/console/system-statistics', userName);
// 菜单项配置
@@ -35,10 +36,16 @@ const baseNavItems = [
{ name: 'activation', label: '激活码兑换', icon: 'MagicStick', path: '/console/activation' },
];
// 根据权限动态添加渠道商管理
const navItems = hasPermission
? [...baseNavItems, { name: 'channel', label: '渠道商管理', icon: 'Setting', path: '/console/channel' }]
: baseNavItems;
// 根据权限动态添加菜单项
let navItems = [...baseNavItems];
if (hasChannelPermission) {
navItems.push({ name: 'channel', label: '渠道商管理', icon: 'Setting', path: '/console/channel' });
}
if (hasSystemStatisticsPermission) {
navItems.push({ name: 'system-statistics', label: '系统统计', icon: 'DataAnalysis', path: '/console/system-statistics' });
}
// 当前激活的菜单
const activeNav = computed(() => {