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