Files
lingji-work-fe/src/layouts/components/siderBar/menu-list.ts
2025-08-18 17:22:11 +08:00

126 lines
3.9 KiB
TypeScript

export interface typeMenuItem {
key?: string | number; // 菜单组key
label?: string; // 菜单组标题
icon?: string; // 菜单组图标
routeName?: string; // 路由名称
requireLogin?: boolean; // 是否需要登录
requireAuth?: boolean; // 是否需要权限验证
activeMatch?: string[]; // 菜单高亮路由组匹配
children?: typeMenuItem[]; // 子菜单列表
}
export const MENU_LIST = <Record<string, typeMenuItem[]>>{
GroupMain: [
{
key: 'ModAccountManage',
label: '账号管理',
icon: 'svg-accountManage',
children: [
{
key: 'ModMediaAccountManage',
icon: 'svg-mediaAccountManage',
label: '账号管理',
routeName: 'MediaAccountAccountManagement',
requireLogin: true,
activeMatch: ['MediaAccountAccountManagement'],
},
{
key: 'ModMediaAccountData',
icon: 'svg-mediaAccountData',
label: '账号数据',
routeName: 'MediaAccountAccountDashboard',
requireLogin: true,
activeMatch: ['MediaAccountAccountDashboard', 'MediaAccountAccountDetails'],
},
{
key: 'ModPutAccountManage',
icon: 'svg-putAccountManage',
label: '账户管理',
routeName: 'PutAccountAccountManagement',
requireLogin: true,
activeMatch: ['PutAccountAccountManagement'],
},
{
key: 'ModPutAccountData',
icon: 'svg-putAccountData',
label: '账户数据',
routeName: 'PutAccountAccountData',
requireLogin: true,
activeMatch: ['PutAccountAccountData'],
},
{
key: 'ModPutAccountAccountDashboard',
icon: 'svg-putAccountAccountDashboard',
label: '投放表现分析',
routeName: 'PutAccountAccountDashboard',
requireLogin: true,
activeMatch: ['PutAccountAccountDashboard'],
},
{
key: 'ModInvestmentGuidelines',
icon: 'svg-putAccountInvestmentGuidelines',
label: '投放指南',
routeName: 'PutAccountInvestmentGuidelines',
requireLogin: true,
activeMatch: ['PutAccountInvestmentGuidelines', 'PutAccountInvestmentGuidelinesDetail'],
},
],
},
{
key: 'ModMaterialCenter',
label: '素材中心',
icon: 'svg-materialCenter',
children: [
{
key: 'ModMediaFinishProductsWareHouse',
icon: 'svg-finishProductsWareHouse',
label: '成品库',
routeName: 'FinishProductsWareHouse',
requireLogin: true,
activeMatch: ['FinishProductsWareHouse', 'FinishProductsWareHouseWriter'],
},
{
key: 'ModMediaRawMaterialStorage',
icon: 'svg-rawMaterialStorage',
label: '原料库',
routeName: 'RawMaterialStorage',
requireLogin: true,
activeMatch: ['RawMaterialStorage', 'RawMaterialStorageWriter'],
},
],
},
{
key: 'ModTaskManage',
label: '任务管理',
icon: 'svg-taskManage',
routeName: 'TaskManagement',
},
],
GroupMainWriter: [
{
key: 'ModMaterialCenter',
label: '素材中心',
icon: 'svg-materialCenter',
children: [
{
key: 'ModMediaFinishProductsWareHouseWriter',
icon: 'svg-finishProductsWareHouseWriter',
label: '成品库',
routeName: 'FinishProductsWareHouseWriter',
requireLogin: true,
activeMatch: ['FinishProductsWareHouseWriter', 'FinishProductsWareHouseWriter'],
},
{
key: 'ModMediaRawMaterialStorageWriter',
icon: 'svg-rawMaterialStorageWriter',
label: '原料库',
routeName: 'RawMaterialStorageWriter',
requireLogin: true,
activeMatch: ['RawMaterialStorageWriter', 'RawMaterialStorageWriter'],
},
],
},
],
};