|
|
@@ -4,11 +4,9 @@ import { useAuth } from './hooks/AuthProvider';
|
|
|
import {
|
|
|
Users,
|
|
|
Settings,
|
|
|
- User,
|
|
|
LogOut,
|
|
|
- BarChart3,
|
|
|
- LayoutDashboard,
|
|
|
- File
|
|
|
+ File,
|
|
|
+ MapPin,
|
|
|
} from 'lucide-react';
|
|
|
|
|
|
export interface MenuItem {
|
|
|
@@ -74,12 +72,12 @@ export const useMenu = () => {
|
|
|
|
|
|
// 基础菜单项配置
|
|
|
const menuItems: MenuItem[] = [
|
|
|
- {
|
|
|
- key: 'dashboard',
|
|
|
- label: '控制台',
|
|
|
- icon: <LayoutDashboard className="h-4 w-4" />,
|
|
|
- path: '/admin/dashboard'
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // key: 'dashboard',
|
|
|
+ // label: '控制台',
|
|
|
+ // icon: <LayoutDashboard className="h-4 w-4" />,
|
|
|
+ // path: '/admin/dashboard'
|
|
|
+ // },
|
|
|
{
|
|
|
key: 'users',
|
|
|
label: '用户管理',
|
|
|
@@ -94,40 +92,74 @@ export const useMenu = () => {
|
|
|
path: '/admin/files',
|
|
|
permission: 'file:manage'
|
|
|
},
|
|
|
+ // {
|
|
|
+ // key: 'analytics',
|
|
|
+ // label: '数据分析',
|
|
|
+ // icon: <BarChart3 className="h-4 w-4" />,
|
|
|
+ // path: '/admin/analytics',
|
|
|
+ // permission: 'analytics:view'
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // key: 'agents',
|
|
|
+ // label: '代理商管理',
|
|
|
+ // icon: <UserCheck className="h-4 w-4" />,
|
|
|
+ // path: '/admin/agents',
|
|
|
+ // permission: 'agent:manage'
|
|
|
+ // },
|
|
|
{
|
|
|
- key: 'analytics',
|
|
|
- label: '数据分析',
|
|
|
- icon: <BarChart3 className="h-4 w-4" />,
|
|
|
- path: '/admin/analytics',
|
|
|
- permission: 'analytics:view'
|
|
|
+ key: 'areas',
|
|
|
+ label: '区域管理',
|
|
|
+ icon: <MapPin className="h-4 w-4" />,
|
|
|
+ path: '/admin/areas',
|
|
|
+ permission: 'area:manage'
|
|
|
},
|
|
|
+ // {
|
|
|
+ // key: 'cards',
|
|
|
+ // label: '卡券管理',
|
|
|
+ // icon: <CreditCard className="h-4 w-4" />,
|
|
|
+ // permission: 'card:manage',
|
|
|
+ // children: [
|
|
|
+ // {
|
|
|
+ // key: 'user-cards',
|
|
|
+ // label: '用户卡管理',
|
|
|
+ // path: '/admin/user-cards',
|
|
|
+ // permission: 'card:manage'
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // key: 'user-card-balance-records',
|
|
|
+ // label: '余额记录',
|
|
|
+ // path: '/admin/user-card-balance-records',
|
|
|
+ // permission: 'card:manage'
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // },
|
|
|
{
|
|
|
- key: 'settings',
|
|
|
- label: '系统设置',
|
|
|
+ key: 'system-configs',
|
|
|
+ label: '系统配置',
|
|
|
icon: <Settings className="h-4 w-4" />,
|
|
|
- path: '/admin/settings',
|
|
|
- permission: 'settings:manage'
|
|
|
+ path: '/admin/system-configs',
|
|
|
+ permission: 'system-config:manage'
|
|
|
},
|
|
|
];
|
|
|
|
|
|
// 用户菜单项
|
|
|
const userMenuItems = [
|
|
|
- {
|
|
|
- key: 'profile',
|
|
|
- label: '个人资料',
|
|
|
- icon: <User className="mr-2 h-4 w-4" />,
|
|
|
- onClick: () => navigate('/admin/profile')
|
|
|
- },
|
|
|
- {
|
|
|
- key: 'settings',
|
|
|
- label: '账户设置',
|
|
|
- icon: <Settings className="mr-2 h-4 w-4" />,
|
|
|
- onClick: () => navigate('/admin/account-settings')
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'separator',
|
|
|
- key: 'divider',
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // key: 'profile',
|
|
|
+ // label: '个人资料',
|
|
|
+ // icon: <User className="mr-2 h-4 w-4" />,
|
|
|
+ // onClick: () => navigate('/admin/profile')
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // key: 'settings',
|
|
|
+ // label: '账户设置',
|
|
|
+ // icon: <Settings className="mr-2 h-4 w-4" />,
|
|
|
+ // onClick: () => navigate('/admin/account-settings')
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: 'separator',
|
|
|
+ // key: 'divider',
|
|
|
+ // },
|
|
|
{
|
|
|
key: 'logout',
|
|
|
label: '退出登录',
|