feat: 完成系统监控页面
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user