routes-file-two.ts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. import Layout from '@/layout'
  2. const HomeRoutes = {
  3. path: '/userManagement',
  4. component: Layout,
  5. name: 'UserManagement',
  6. redirect: '/userManagement/permission',
  7. //using el svg icon, the elSvgIcon first when at the same time using elSvgIcon and icon
  8. meta: {
  9. title: '权限管理',
  10. elSvgIcon: 'Avatar',
  11. roles: ['permission_management_menu'],
  12. },
  13. children: [
  14. {
  15. path: '/userManagement/permission',
  16. name: 'Permission',
  17. meta: { title: '权限项管理', roles: ['permission_item_management_page'] },
  18. component: () => import('@/views/userManagement/permission/index.vue'),
  19. },
  20. {
  21. path: '/userManagement/role',
  22. name: 'Role',
  23. meta: { title: '角色管理', roles: ['role_management_page'] },
  24. redirect: '/userManagement/role',
  25. component: {
  26. render: () => h(resolveComponent('router-view')),
  27. },
  28. children: [
  29. {
  30. path: '/userManagement/role',
  31. name: 'Role',
  32. hidden: true,
  33. component: () => import('@/views/userManagement/role/index.vue'),
  34. },
  35. {
  36. path: '/userManagement/role/auth',
  37. name: 'Auth',
  38. hidden: true,
  39. meta: { title: '角色授权' },
  40. component: () => import('@/views/userManagement/role/auth.vue'),
  41. },
  42. ],
  43. },
  44. {
  45. path: '/userManagement/account',
  46. name: 'Account',
  47. meta: { title: '账号管理', roles: ['account_management_page'] },
  48. redirect: '/userManagement/account',
  49. component: {
  50. render: () => h(resolveComponent('router-view')),
  51. },
  52. children: [
  53. {
  54. path: '/userManagement/account',
  55. component: () => import('@/views/userManagement/account/index.vue'),
  56. hidden: true,
  57. },
  58. {
  59. path: '/userManagement/account/accountAuth',
  60. name: 'AccountAuth',
  61. hidden: true,
  62. meta: { title: '账号权限' },
  63. component: () => import('@/views/userManagement/account/auth.vue'),
  64. },
  65. ],
  66. },
  67. {
  68. path: '/userManagement/accountGroup',
  69. name: 'AccountGroup',
  70. meta: { title: '账号组管理', roles: ['account_group_management_page'] },
  71. component: () => import('@/views/userManagement/accountGroup/index.vue'),
  72. },
  73. {
  74. path: '/userManagement/application',
  75. name: 'Application',
  76. meta: { title: '应用管理', roles: ['application_managemen_page'] },
  77. component: () => import('@/views/userManagement/application/index.vue'),
  78. },
  79. {
  80. path: '/userManagement/securityPolicy',
  81. name: 'SecurityPolicy',
  82. meta: { title: '登录策略', roles: ['login_strategy_page'] },
  83. component: () =>
  84. import('@/views/systemSettings/securityPolicy/index.vue'),
  85. },
  86. ],
  87. }
  88. export default [HomeRoutes]