remaining.ts 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. import { Layout } from '@/utils/routerHelper'
  2. import { useI18n } from '@/hooks/web/useI18n'
  3. const { t } = useI18n()
  4. const remainingRouter: AppRouteRecordRaw[] = [
  5. {
  6. path: '/redirect',
  7. component: Layout,
  8. name: 'Redirect',
  9. children: [
  10. {
  11. path: '/redirect/:path(.*)',
  12. name: 'Redirect',
  13. component: () => import('@/views/Redirect/Redirect.vue'),
  14. meta: {}
  15. }
  16. ],
  17. meta: {
  18. hidden: true,
  19. noTagsView: true
  20. }
  21. },
  22. {
  23. path: '/',
  24. component: Layout,
  25. redirect: '/index',
  26. name: 'Home',
  27. meta: {},
  28. children: [
  29. {
  30. path: 'index',
  31. component: () => import('@/views/Home/Index.vue'),
  32. name: 'Index',
  33. meta: {
  34. title: t('router.home'),
  35. icon: 'ep:home-filled',
  36. noCache: true,
  37. affix: true
  38. }
  39. }
  40. ]
  41. },
  42. {
  43. path: '/user',
  44. component: Layout,
  45. name: 'UserInfo',
  46. meta: {
  47. hidden: true
  48. },
  49. children: [
  50. {
  51. path: 'profile',
  52. component: () => import('@/views/Profile/Index.vue'),
  53. name: 'Profile',
  54. meta: {
  55. canTo: true,
  56. hidden: true,
  57. noTagsView: true,
  58. icon: 'ep:user',
  59. title: t('common.profile')
  60. }
  61. }
  62. ]
  63. },
  64. {
  65. path: '/codegen',
  66. component: Layout,
  67. name: 'CodegenEdit',
  68. meta: {
  69. hidden: true
  70. },
  71. children: [
  72. {
  73. path: 'edit',
  74. component: () => import('@/views/infra/codegen/EditTable.vue'),
  75. name: 'EditTable',
  76. meta: {
  77. noCache: true,
  78. hidden: true,
  79. canTo: true,
  80. icon: 'ep:edit',
  81. title: '修改生成配置',
  82. activeMenu: 'infra/codegen/index'
  83. }
  84. }
  85. ]
  86. },
  87. {
  88. path: '/job',
  89. component: Layout,
  90. name: 'JobL',
  91. meta: {
  92. hidden: true
  93. },
  94. children: [
  95. {
  96. path: 'job-log',
  97. component: () => import('@/views/infra/job/JobLog.vue'),
  98. name: 'JobLog',
  99. meta: {
  100. noCache: true,
  101. hidden: true,
  102. canTo: true,
  103. icon: 'ep:edit',
  104. title: '调度日志',
  105. activeMenu: 'infra/job/index'
  106. }
  107. }
  108. ]
  109. },
  110. {
  111. path: '/login',
  112. component: () => import('@/views/Login/Login.vue'),
  113. name: 'Login',
  114. meta: {
  115. hidden: true,
  116. title: t('router.login'),
  117. noTagsView: true
  118. }
  119. },
  120. {
  121. path: '/403',
  122. component: () => import('@/views/Error/403.vue'),
  123. name: 'NoAccess',
  124. meta: {
  125. hidden: true,
  126. title: '403',
  127. noTagsView: true
  128. }
  129. },
  130. {
  131. path: '/404',
  132. component: () => import('@/views/Error/404.vue'),
  133. name: 'NoFound',
  134. meta: {
  135. hidden: true,
  136. title: '404',
  137. noTagsView: true
  138. }
  139. },
  140. {
  141. path: '/500',
  142. component: () => import('@/views/Error/500.vue'),
  143. name: 'Error',
  144. meta: {
  145. hidden: true,
  146. title: '500',
  147. noTagsView: true
  148. }
  149. }
  150. ]
  151. export default remainingRouter