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

@@ -25,6 +25,11 @@ export const PAGE_PERMISSIONS: PermissionConfig[] = [
allowedUsers: ['cc', 'Guo'],
description: '渠道商管理页面 - 仅限cc和Guo用户访问',
},
{
path: '/console/system-statistics',
allowedUsers: ['cc', 'Guo'],
description: '系统统计页面 - 仅限cc和Guo用户访问',
},
// 可以在这里继续添加其他需要权限控制的页面
// {
// path: '/console/admin',

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(() => {

View File

@@ -223,6 +223,14 @@ export const layoutRouter: RouteRecordRaw[] = [
title: '意心Ai-渠道商管理',
},
},
{
path: 'system-statistics',
name: 'consoleSystemStatistics',
component: () => import('@/pages/console/system-statistics/index.vue'),
meta: {
title: '意心Ai-系统统计',
},
},
],
},
],