remaining.ts 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. import { Layout, OaLayout } 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: '/',
  64. component: OaLayout,
  65. redirect: '/home',
  66. name: 'Home',
  67. meta: {},
  68. children: [
  69. {
  70. path: 'home',
  71. component: () => import('@/views/OaSystem/home/index.vue'),
  72. name: 'home',
  73. meta: {
  74. title: t('首页'),
  75. icon: 'ep:home-filled',
  76. noCache: false,
  77. affix: true
  78. }
  79. },
  80. {
  81. path: 'mainOfficeCenter',
  82. component: () => import('@/views/OaSystem/officeCenter/main/index.vue'),
  83. name: 'mainOfficeCenter',
  84. meta: {
  85. title: '办件中心'
  86. }
  87. },
  88. {
  89. path: 'newsEditor',
  90. component: () => import('@/views/OaSystem/newsCenter/newsSetting/editor.vue'),
  91. name: 'newsEditor',
  92. meta: {
  93. title: '新闻编辑'
  94. }
  95. },
  96. {
  97. path: 'newsLook',
  98. component: () => import('@/views/OaSystem/newsCenter/newsLook/index.vue'),
  99. name: 'newsLook',
  100. meta: {
  101. title: '新闻中心'
  102. }
  103. },
  104. {
  105. path: 'newlookDetail',
  106. component: () => import('@/views/OaSystem/newsCenter/newsLook/lookDetail.vue'),
  107. name: 'newlookDetail',
  108. meta: {
  109. title: '新闻详情'
  110. }
  111. },
  112. {
  113. path: 'projectDetail',
  114. component: () => import('@/views/OaSystem/projectCenter/projectDetail/projectDetail.vue'),
  115. name: 'projectDetail',
  116. meta: {
  117. title: '项目详细'
  118. }
  119. },
  120. {
  121. path: 'processCenter',
  122. component: () => import('@/views/OaSystem/platformManagement/processCenter/index.vue'),
  123. name: 'processCenter',
  124. meta: {
  125. title: '流程模版'
  126. }
  127. }
  128. ]
  129. },
  130. {
  131. path: '/user',
  132. component: Layout,
  133. name: 'UserInfo',
  134. meta: {
  135. hidden: true
  136. },
  137. children: [
  138. {
  139. path: 'profile',
  140. component: () => import('@/views/Profile/Index.vue'),
  141. name: 'Profile',
  142. meta: {
  143. canTo: true,
  144. hidden: true,
  145. noTagsView: false,
  146. icon: 'ep:user',
  147. title: t('common.profile')
  148. }
  149. },
  150. {
  151. path: 'notify-message',
  152. component: () => import('@/views/system/notify/my/index.vue'),
  153. name: 'MyNotifyMessage',
  154. meta: {
  155. canTo: true,
  156. hidden: true,
  157. noTagsView: false,
  158. icon: 'ep:message',
  159. title: '我的站内信'
  160. }
  161. }
  162. ]
  163. },
  164. {
  165. path: '/dict',
  166. component: Layout,
  167. name: 'dict',
  168. meta: {
  169. hidden: true
  170. },
  171. children: [
  172. {
  173. path: 'type/data/:dictType',
  174. component: () => import('@/views/system/dict/data/index.vue'),
  175. name: 'SystemDictData',
  176. meta: {
  177. title: '字典数据',
  178. noCache: true,
  179. hidden: true,
  180. canTo: true,
  181. icon: '',
  182. activeMenu: '/system/dict'
  183. }
  184. }
  185. ]
  186. },
  187. {
  188. path: '/codegen',
  189. component: Layout,
  190. name: 'CodegenEdit',
  191. meta: {
  192. hidden: true
  193. },
  194. children: [
  195. {
  196. path: 'edit',
  197. component: () => import('@/views/infra/codegen/EditTable.vue'),
  198. name: 'InfraCodegenEditTable',
  199. meta: {
  200. noCache: true,
  201. hidden: true,
  202. canTo: true,
  203. icon: 'ep:edit',
  204. title: '修改生成配置',
  205. activeMenu: 'infra/codegen/index'
  206. }
  207. }
  208. ]
  209. },
  210. {
  211. path: '/job',
  212. component: Layout,
  213. name: 'JobL',
  214. meta: {
  215. hidden: true
  216. },
  217. children: [
  218. {
  219. path: 'job-log',
  220. component: () => import('@/views/infra/job/logger/index.vue'),
  221. name: 'InfraJobLog',
  222. meta: {
  223. noCache: true,
  224. hidden: true,
  225. canTo: true,
  226. icon: 'ep:edit',
  227. title: '调度日志',
  228. activeMenu: 'infra/job/index'
  229. }
  230. }
  231. ]
  232. },
  233. {
  234. path: '/loginAdmin',
  235. component: () => import('@/views/Login/Login.vue'),
  236. name: 'LoginAdmin',
  237. meta: {
  238. hidden: true,
  239. title: t('router.login'),
  240. noTagsView: true
  241. }
  242. },
  243. {
  244. path: '/login',
  245. component: () => import('@/views/Login/OALogin.vue'),
  246. name: 'Login',
  247. meta: {
  248. hidden: true,
  249. title: t('router.login'),
  250. noTagsView: true
  251. }
  252. },
  253. {
  254. path: '/social-login',
  255. component: () => import('@/views/Login/SocialLogin.vue'),
  256. name: 'SocialLogin',
  257. meta: {
  258. hidden: true,
  259. title: t('router.login'),
  260. noTagsView: true
  261. }
  262. },
  263. {
  264. path: '/sso',
  265. component: () => import('@/views/Login/Login.vue'),
  266. name: 'SSOLogin',
  267. meta: {
  268. hidden: true,
  269. title: t('router.login'),
  270. noTagsView: true
  271. }
  272. },
  273. {
  274. path: '/403',
  275. component: () => import('@/views/Error/403.vue'),
  276. name: 'NoAccess',
  277. meta: {
  278. hidden: true,
  279. title: '403',
  280. noTagsView: true
  281. }
  282. },
  283. {
  284. path: '/404',
  285. component: () => import('@/views/Error/404.vue'),
  286. name: 'NoFound',
  287. meta: {
  288. hidden: true,
  289. title: '404',
  290. noTagsView: true
  291. }
  292. },
  293. {
  294. path: '/500',
  295. component: () => import('@/views/Error/500.vue'),
  296. name: 'Error',
  297. meta: {
  298. hidden: true,
  299. title: '500',
  300. noTagsView: true
  301. }
  302. }
  303. ]
  304. export default remainingRouter