forked from wangziqi/gongxue-base
refactor: reorganize sidebar into nested two-level menu groups
This commit is contained in:
@@ -44,48 +44,73 @@ const allMenuItems: MenuItemType[] = [
|
|||||||
label: '数据面板',
|
label: '数据面板',
|
||||||
permission: 'dashboard:view',
|
permission: 'dashboard:view',
|
||||||
},
|
},
|
||||||
{ key: '/room-visual', icon: <AppstoreOutlined />, label: '宿舍总览', permission: 'room:view' },
|
|
||||||
{ key: '/students', icon: <TeamOutlined />, label: '学生管理', permission: 'student:view' },
|
|
||||||
{ key: '/rooms', icon: <HomeOutlined />, label: '宿舍管理', permission: 'room:view' },
|
|
||||||
{ key: '/occupancies', icon: <SwapOutlined />, label: '入住管理', permission: 'occupancy:view' },
|
|
||||||
{ key: '/expenses', icon: <DollarOutlined />, label: '费用录入', permission: 'expense:view' },
|
|
||||||
{ key: '/deposits', icon: <WalletOutlined />, label: '押金管理', permission: 'deposit:view' },
|
|
||||||
{ key: '/bills', icon: <FileTextOutlined />, label: '账单管理', permission: 'bill:view' },
|
|
||||||
{ key: '/classes', icon: <TeamOutlined />, label: '班级管理', permission: 'class:view' },
|
|
||||||
{ key: '/teacher-workspace', icon: <LaptopOutlined />, label: '教师工作台', permission: 'class:view' },
|
|
||||||
{
|
{
|
||||||
key: 'classroom-group',
|
key: 'dorm-group',
|
||||||
icon: <ReadOutlined />,
|
icon: <HomeOutlined />,
|
||||||
label: '教室管理',
|
label: '宿舍运营',
|
||||||
permission: 'classroom:view',
|
permission: 'room:view',
|
||||||
children: [
|
children: [
|
||||||
{
|
{ key: '/room-visual', icon: <AppstoreOutlined />, label: '宿舍总览', permission: 'room:view' },
|
||||||
key: '/classroom-schedule',
|
{ key: '/rooms', icon: <HomeOutlined />, label: '宿舍管理', permission: 'room:view' },
|
||||||
icon: <CalendarOutlined />,
|
{ key: '/occupancies', icon: <SwapOutlined />, label: '入住管理', permission: 'occupancy:view' },
|
||||||
label: '排期总览',
|
],
|
||||||
permission: 'classroom:view',
|
},
|
||||||
},
|
{
|
||||||
{
|
key: 'student-group',
|
||||||
key: '/classrooms',
|
icon: <TeamOutlined />,
|
||||||
icon: <ReadOutlined />,
|
label: '学员管理',
|
||||||
label: '教室列表',
|
permission: 'student:view',
|
||||||
permission: 'classroom:view',
|
children: [
|
||||||
},
|
{ key: '/students', icon: <TeamOutlined />, label: '学生管理', permission: 'student:view' },
|
||||||
{
|
{ key: '/classes', icon: <TeamOutlined />, label: '班级管理', permission: 'class:view' },
|
||||||
key: '/classroom-rentals',
|
{ key: '/attendance', icon: <CheckCircleOutlined />, label: '考勤管理', permission: 'attendance:view' },
|
||||||
icon: <FileProtectOutlined />,
|
],
|
||||||
label: '租赁订单',
|
},
|
||||||
permission: 'rental:view',
|
{
|
||||||
},
|
key: 'academic-group',
|
||||||
{ key: '/tenants', icon: <TagsOutlined />, label: '租赁方', permission: 'tenant:view' },
|
icon: <CalendarOutlined />,
|
||||||
|
label: '教务管理',
|
||||||
|
permission: 'schedule:view',
|
||||||
|
children: [
|
||||||
|
{ key: '/schedules', icon: <CalendarOutlined />, label: '排课管理', permission: 'schedule:view' },
|
||||||
|
{ key: '/teacher-workspace', icon: <LaptopOutlined />, label: '教师工作台', permission: 'class:view' },
|
||||||
|
{
|
||||||
|
key: 'classroom-group',
|
||||||
|
icon: <ReadOutlined />,
|
||||||
|
label: '教室管理',
|
||||||
|
permission: 'classroom:view',
|
||||||
|
children: [
|
||||||
|
{ key: '/classroom-schedule', icon: <CalendarOutlined />, label: '排期总览', permission: 'classroom:view' },
|
||||||
|
{ key: '/classrooms', icon: <ReadOutlined />, label: '教室列表', permission: 'classroom:view' },
|
||||||
|
{ key: '/classroom-rentals', icon: <FileProtectOutlined />, label: '租赁订单', permission: 'rental:view' },
|
||||||
|
{ key: '/tenants', icon: <TagsOutlined />, label: '租赁方', permission: 'tenant:view' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'finance-group',
|
||||||
|
icon: <DollarOutlined />,
|
||||||
|
label: '财务管理',
|
||||||
|
permission: 'expense:view',
|
||||||
|
children: [
|
||||||
|
{ key: '/expenses', icon: <DollarOutlined />, label: '费用录入', permission: 'expense:view' },
|
||||||
|
{ key: '/deposits', icon: <WalletOutlined />, label: '押金管理', permission: 'deposit:view' },
|
||||||
|
{ key: '/bills', icon: <FileTextOutlined />, label: '账单管理', permission: 'bill:view' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'system-group',
|
||||||
|
icon: <SettingOutlined />,
|
||||||
|
label: '系统管理',
|
||||||
|
permission: 'log:view',
|
||||||
|
children: [
|
||||||
|
{ key: '/operation-logs', icon: <AuditOutlined />, label: '操作日志', permission: 'log:view' },
|
||||||
|
{ key: '/roles', icon: <SafetyOutlined />, label: '角色管理', permission: 'role:view' },
|
||||||
|
{ key: '/permissions', icon: <KeyOutlined />, label: '权限一览', permission: 'role:view' },
|
||||||
|
{ key: '/users', icon: <SettingOutlined />, label: '账号管理', permission: 'user:view' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{ key: '/attendance', icon: <CheckCircleOutlined />, label: '考勤管理', permission: 'attendance:view' },
|
|
||||||
{ key: '/schedules', icon: <CalendarOutlined />, label: '排课管理', permission: 'schedule:view' },
|
|
||||||
{ key: '/operation-logs', icon: <AuditOutlined />, label: '操作日志', permission: 'log:view' },
|
|
||||||
{ key: '/roles', icon: <SafetyOutlined />, label: '角色管理', permission: 'role:view' },
|
|
||||||
{ key: '/permissions', icon: <KeyOutlined />, label: '权限一览', permission: 'role:view' },
|
|
||||||
{ key: '/users', icon: <SettingOutlined />, label: '账号管理', permission: 'user:view' },
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const MainLayout: React.FC = () => {
|
const MainLayout: React.FC = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user