feat 后台管理动态路由

This commit is contained in:
Ironsp
2026-05-26 11:56:16 +08:00
parent 42ee161da3
commit d6e8afab6c

View File

@@ -27,92 +27,93 @@ import Layout from '@/layout/index.vue';
// 公共路由 // 公共路由
export const constantRoutes: RouteRecordRaw[] = [ export const constantRoutes: RouteRecordRaw[] = [
/* ----------------------------------------自定义路由(查看)-------------------------------------------------------- */ /* ----------------------------------------自定义路由(查看)-------------------------------------------------------- */
//设备管理 // 以下路由已迁移至后端动态路由管理
{ // 设备管理
path: '/equipmentList', // {
component: Layout, // path: '/equipmentList',
name: 'Equipment', // component: Layout,
redirect: '/equipmentList/list', // name: 'Equipment',
alwaysShow: true, // redirect: '/equipmentList/list',
meta: { title: '设备管理', icon: 'equipment' }, // alwaysShow: true,
children: [ // meta: { title: '设备管理', icon: 'equipment' },
{ // children: [
path: 'list', // {
name: 'EquipmentList', // path: 'list',
component: () => import('@/views/equipmentList/list.vue'), // name: 'EquipmentList',
meta: { title: '设备列表', icon: 'equipment' } // component: () => import('@/views/equipmentList/list.vue'),
} // meta: { title: '设备列表', icon: 'equipment' }
] // }
}, // ]
//报警管理 // },
{ // // 报警管理
path: '/warningList', // {
component: Layout, // path: '/warningList',
name: 'Warning', // component: Layout,
redirect: '/warningList/list', // name: 'Warning',
alwaysShow: true, // redirect: '/warningList/list',
meta: { title: '报警管理', icon: 'warningList' }, // alwaysShow: true,
children: [ // meta: { title: '报警管理', icon: 'warningList' },
{ // children: [
path: 'list', // {
name: 'WarningList', // path: 'list',
component: () => import('@/views/WarningList/list.vue'), // name: 'WarningList',
meta: { title: '报警列表', icon: 'warningList' } // component: () => import('@/views/WarningList/list.vue'),
} // meta: { title: '报警列表', icon: 'warningList' }
] // }
}, // ]
//录像文件管理 // },
{ // // 录像文件管理
path: '/fileList', // {
component: Layout, // path: '/fileList',
name: 'File', // component: Layout,
redirect: '/fileList/list', // name: 'File',
meta: { title: '录像文件管理', icon: 'fileList' }, // redirect: '/fileList/list',
alwaysShow: true, // meta: { title: '录像文件管理', icon: 'fileList' },
children: [ // alwaysShow: true,
{ // children: [
path: 'list', // {
name: 'FileList', // path: 'list',
component: () => import('@/views/fileList/list.vue'), // name: 'FileList',
meta: { title: '录像列表', icon: 'fileList' } // component: () => import('@/views/fileList/list.vue'),
} // meta: { title: '录像列表', icon: 'fileList' }
] // }
}, // ]
//系统设置 // },
{ // // 系统设置
path: '/systemList', // {
component: Layout, // path: '/systemList',
name: 'system', // component: Layout,
redirect: '/systemList/base', // name: 'system',
alwaysShow: true, // redirect: '/systemList/base',
meta: { title: '系统设置', icon: 'systemList' }, // alwaysShow: true,
children: [ // meta: { title: '系统设置', icon: 'systemList' },
{ // children: [
path: 'base', // {
name: 'Base', // path: 'base',
component: () => import('@/views/systemList/base/base.vue'), // name: 'Base',
meta: { title: '基础设置', icon: 'base' } // component: () => import('@/views/systemList/base/base.vue'),
}, // meta: { title: '基础设置', icon: 'base' }
{ // },
path: 'password', // {
name: 'Password', // path: 'password',
component: () => import('@/views/systemList/password/password.vue'), // name: 'Password',
meta: { title: '修改密码', icon: 'password' } // component: () => import('@/views/systemList/password/password.vue'),
}, // meta: { title: '修改密码', icon: 'password' }
{ // },
path: 'role', // {
name: 'Role', // path: 'role',
component: () => import('@/views/systemList/role/role.vue'), // name: 'Role',
meta: { title: '角色配置', icon: 'role' } // component: () => import('@/views/systemList/role/role.vue'),
}, // meta: { title: '角色配置', icon: 'role' }
{ // },
path: 'user', // {
name: 'User', // path: 'user',
component: () => import('@/views/systemList/user/user.vue'), // name: 'User',
meta: { title: '用户配置', icon: 'user' } // component: () => import('@/views/systemList/user/user.vue'),
} // meta: { title: '用户配置', icon: 'user' }
] // }
}, // ]
// },
/* ----------------------------------------自带路由配置-------------------------------------------------------- */ /* ----------------------------------------自带路由配置-------------------------------------------------------- */
{ {
path: '/redirect', path: '/redirect',