system.ts 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. import { RouteRecordRaw } from 'vue-router';
  2. import { Layout } from '@/router/constant';
  3. import { OptionsSharp } from '@vicons/ionicons5';
  4. import { renderIcon } from '@/utils/index';
  5. /**
  6. * @param name 路由名称, 必须设置,且不能重名
  7. * @param meta 路由元信息(路由附带扩展信息)
  8. * @param redirect 重定向地址, 访问这个路由时,自定进行重定向
  9. * @param meta.disabled 禁用整个菜单
  10. * @param meta.title 菜单名称
  11. * @param meta.icon 菜单图标
  12. * @param meta.keepAlive 缓存该路由
  13. * @param meta.sort 排序越小越排前
  14. *
  15. * */
  16. const routes: Array<RouteRecordRaw> = [
  17. {
  18. path: '/system',
  19. name: 'System',
  20. redirect: '/system/menu',
  21. component: Layout,
  22. meta: {
  23. title: '系统管理',
  24. icon: renderIcon(OptionsSharp),
  25. sort: 1,
  26. },
  27. children: [
  28. {
  29. path: 'online',
  30. name: 'online',
  31. meta: {
  32. title: '在线用户',
  33. },
  34. component: () => import('@/views/system/online/online.vue'),
  35. },
  36. {
  37. path: 'tenant',
  38. name: 'system_tenant',
  39. meta: {
  40. title: '租户管理',
  41. },
  42. component: () => import('@/views/system/tenant/tenant.vue'),
  43. },
  44. {
  45. path: 'menu',
  46. name: 'system_menu',
  47. meta: {
  48. title: '菜单管理',
  49. },
  50. component: () => import('@/views/system/menu/menu.vue'),
  51. },
  52. {
  53. path: 'tenant',
  54. name: 'system_tenant',
  55. meta: {
  56. title: '租户管理',
  57. },
  58. component: () => import('@/views/system/tenant/tenant.vue'),
  59. },
  60. {
  61. path: 'dictionary',
  62. name: 'system_dictionary',
  63. meta: {
  64. title: '字典管理',
  65. },
  66. component: () => import('@/views/system/dictionary/dictionary.vue'),
  67. },
  68. {
  69. path: 'logs',
  70. name: 'system_logs',
  71. meta: {
  72. title: '日志管理',
  73. },
  74. component: () => import('@/views/system/logs/operlog.vue'),
  75. },
  76. {
  77. path: 'region',
  78. name: 'system_region',
  79. meta: {
  80. title: '区域管理',
  81. },
  82. component: () => import('@/views/system/region/region.vue'),
  83. },
  84. {
  85. path: 'config',
  86. name: 'system_config',
  87. meta: {
  88. title: '配置管理',
  89. },
  90. component: () => import('@/views/system/config/list.vue'),
  91. },
  92. {
  93. path: 'tasks',
  94. name: 'system_tasks',
  95. meta: {
  96. title: '定时任务管理',
  97. },
  98. component: () => import('@/views/system/tasks/list.vue'),
  99. },
  100. ],
  101. },
  102. ];
  103. export default routes;