remaining.ts 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. import { Layout } from '@/utils/routerHelper'
  2. const { t } = useI18n()
  3. /**
  4. * redirect: noredirect 当设置 noredirect 的时候该路由在面包屑导航中不可被点击
  5. * name:'router-name' 设定路由的名字,一定要填写不然使用<keep-alive>时会出现各种问题
  6. * meta : {
  7. hidden: true 当设置 true 的时候该路由不会再侧边栏出现 如404,login等页面(默认 false)
  8. alwaysShow: true 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式,
  9. 只有一个时,会将那个子路由当做根路由显示在侧边栏,
  10. 若你想不管路由下面的 children 声明的个数都显示你的根路由,
  11. 你可以设置 alwaysShow: true,这样它就会忽略之前定义的规则,
  12. 一直显示根路由(默认 false)
  13. title: 'title' 设置该路由在侧边栏和面包屑中展示的名字
  14. icon: 'svg-name' 设置该路由的图标
  15. noCache: true 如果设置为true,则不会被 <keep-alive> 缓存(默认 false)
  16. breadcrumb: false 如果设置为false,则不会在breadcrumb面包屑中显示(默认 true)
  17. affix: true 如果设置为true,则会一直固定在tag项中(默认 false)
  18. noTagsView: true 如果设置为true,则不会出现在tag中(默认 false)
  19. activeMenu: '/dashboard' 显示高亮的路由路径
  20. followAuth: '/dashboard' 跟随哪个路由进行权限过滤
  21. canTo: true 设置为true即使hidden为true,也依然可以进行路由跳转(默认 false)
  22. }
  23. **/
  24. const remainingRouter: AppRouteRecordRaw[] = [
  25. {
  26. path: '/redirect',
  27. component: Layout,
  28. name: 'Redirect',
  29. children: [
  30. {
  31. path: '/redirect/:path(.*)',
  32. name: 'Redirect',
  33. component: () => import('@/views/Redirect/Redirect.vue'),
  34. meta: {}
  35. }
  36. ],
  37. meta: {
  38. hidden: true,
  39. noTagsView: true
  40. }
  41. },
  42. {
  43. path: '/',
  44. component: Layout,
  45. redirect: '/index',
  46. name: 'Home',
  47. meta: {},
  48. children: [
  49. {
  50. path: 'index',
  51. component: () => import('@/views/Home/Index.vue'),
  52. name: 'Index',
  53. meta: {
  54. title: t('router.home'),
  55. icon: 'ep:home-filled',
  56. noCache: false,
  57. affix: true
  58. }
  59. }
  60. ]
  61. },
  62. {
  63. path: '/user',
  64. component: Layout,
  65. name: 'UserInfo',
  66. meta: {
  67. hidden: true
  68. },
  69. children: [
  70. {
  71. path: 'profile',
  72. component: () => import('@/views/Profile/Index.vue'),
  73. name: 'Profile',
  74. meta: {
  75. canTo: true,
  76. hidden: true,
  77. noTagsView: false,
  78. icon: 'ep:user',
  79. title: t('common.profile')
  80. }
  81. },
  82. {
  83. path: 'notify-message',
  84. component: () => import('@/views/system/notify/my/index.vue'),
  85. name: 'MyNotifyMessage',
  86. meta: {
  87. canTo: true,
  88. hidden: true,
  89. noTagsView: false,
  90. icon: 'ep:message',
  91. title: '我的站内信'
  92. }
  93. }
  94. ]
  95. },
  96. {
  97. path: '/codegen',
  98. component: Layout,
  99. name: 'CodegenEdit',
  100. meta: {
  101. hidden: true
  102. },
  103. children: [
  104. {
  105. path: 'edit',
  106. component: () => import('@/views/infra/codegen/EditTable.vue'),
  107. name: 'EditTable',
  108. meta: {
  109. noCache: true,
  110. hidden: true,
  111. canTo: true,
  112. icon: 'ep:edit',
  113. title: '修改生成配置',
  114. activeMenu: 'infra/codegen/index'
  115. }
  116. }
  117. ]
  118. },
  119. {
  120. path: '/job',
  121. component: Layout,
  122. name: 'JobL',
  123. meta: {
  124. hidden: true
  125. },
  126. children: [
  127. {
  128. path: 'job-log',
  129. component: () => import('@/views/infra/job/JobLog.vue'),
  130. name: 'JobLog',
  131. meta: {
  132. noCache: true,
  133. hidden: true,
  134. canTo: true,
  135. icon: 'ep:edit',
  136. title: '调度日志',
  137. activeMenu: 'infra/job/index'
  138. }
  139. }
  140. ]
  141. },
  142. {
  143. path: '/login',
  144. component: () => import('@/views/Login/Login.vue'),
  145. name: 'Login',
  146. meta: {
  147. hidden: true,
  148. title: t('router.login'),
  149. noTagsView: true
  150. }
  151. },
  152. {
  153. path: '/403',
  154. component: () => import('@/views/Error/403.vue'),
  155. name: 'NoAccess',
  156. meta: {
  157. hidden: true,
  158. title: '403',
  159. noTagsView: true
  160. }
  161. },
  162. {
  163. path: '/404',
  164. component: () => import('@/views/Error/404.vue'),
  165. name: 'NoFound',
  166. meta: {
  167. hidden: true,
  168. title: '404',
  169. noTagsView: true
  170. }
  171. },
  172. {
  173. path: '/500',
  174. component: () => import('@/views/Error/500.vue'),
  175. name: 'Error',
  176. meta: {
  177. hidden: true,
  178. title: '500',
  179. noTagsView: true
  180. }
  181. },
  182. {
  183. path: '/bpm',
  184. component: Layout,
  185. name: 'bpm',
  186. meta: {
  187. hidden: true
  188. },
  189. children: [
  190. {
  191. path: '/manager/form/edit',
  192. component: () => import('@/views/bpm/form/formEditor.vue'),
  193. name: 'bpmFormEditor',
  194. meta: {
  195. noCache: true,
  196. hidden: true,
  197. canTo: true,
  198. title: '设计流程表单',
  199. activeMenu: 'bpm/manager/form/formEditor'
  200. }
  201. },
  202. {
  203. path: '/manager/model/edit',
  204. component: () => import('@/views/bpm/model/modelEditor.vue'),
  205. name: 'modelEditor',
  206. meta: {
  207. noCache: true,
  208. hidden: true,
  209. canTo: true,
  210. title: '设计流程',
  211. activeMenu: 'bpm/manager/model/design'
  212. }
  213. },
  214. {
  215. path: '/manager/definition',
  216. component: () => import('@/views/bpm/definition/index.vue'),
  217. name: 'BpmProcessDefinitionList',
  218. meta: {
  219. noCache: true,
  220. hidden: true,
  221. canTo: true,
  222. title: '流程定义',
  223. activeMenu: 'bpm/definition/index'
  224. }
  225. },
  226. {
  227. path: '/manager/task-assign-rule',
  228. component: () => import('@/views/bpm/taskAssignRule/index.vue'),
  229. name: 'BpmTaskAssignRuleList',
  230. meta: {
  231. noCache: true,
  232. hidden: true,
  233. canTo: true,
  234. title: '任务分配规则'
  235. }
  236. },
  237. {
  238. path: '/process-instance/create',
  239. component: () => import('@/views/bpm/processInstance/create.vue'),
  240. name: 'BpmProcessInstanceCreate',
  241. meta: {
  242. noCache: true,
  243. hidden: true,
  244. canTo: true,
  245. title: '发起流程',
  246. activeMenu: 'bpm/processInstance/create'
  247. }
  248. },
  249. {
  250. path: '/process-instance/detail',
  251. component: () => import('@/views/bpm/processInstance/detail.vue'),
  252. name: 'BpmProcessInstanceDetail',
  253. meta: {
  254. noCache: true,
  255. hidden: true,
  256. canTo: true,
  257. title: '流程详情',
  258. activeMenu: 'bpm/processInstance/detail'
  259. }
  260. },
  261. {
  262. path: '/bpm/oa/leave/create',
  263. component: () => import('@/views/bpm/oa/leave/create.vue'),
  264. name: 'OALeaveCreate',
  265. meta: {
  266. noCache: true,
  267. hidden: true,
  268. canTo: true,
  269. title: '发起 OA 请假',
  270. activeMenu: 'bpm/oa/leave/create'
  271. }
  272. },
  273. {
  274. path: '/bpm/oa/leave/detail',
  275. component: () => import('@/views/bpm/oa/leave/detail.vue'),
  276. name: 'OALeaveDetail',
  277. meta: {
  278. noCache: true,
  279. hidden: true,
  280. canTo: true,
  281. title: '查看 OA 请假',
  282. activeMenu: 'bpm/oa/leave/detail'
  283. }
  284. }
  285. ]
  286. }
  287. ]
  288. export default remainingRouter