remaining.ts 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  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. path: 'collectionDetail',
  130. component: () => import('@/views/OaSystem/home/collectionDetail.vue'),
  131. name: 'projectDetail',
  132. meta: {
  133. title: '回款信息'
  134. }
  135. }
  136. ]
  137. },
  138. {
  139. path: '/user',
  140. component: Layout,
  141. name: 'UserInfo',
  142. meta: {
  143. hidden: true
  144. },
  145. children: [
  146. {
  147. path: 'profile',
  148. component: () => import('@/views/Profile/Index.vue'),
  149. name: 'Profile',
  150. meta: {
  151. canTo: true,
  152. hidden: true,
  153. noTagsView: false,
  154. icon: 'ep:user',
  155. title: t('common.profile')
  156. }
  157. },
  158. {
  159. path: 'notify-message',
  160. component: () => import('@/views/system/notify/my/index.vue'),
  161. name: 'MyNotifyMessage',
  162. meta: {
  163. canTo: true,
  164. hidden: true,
  165. noTagsView: false,
  166. icon: 'ep:message',
  167. title: '我的站内信'
  168. }
  169. }
  170. ]
  171. },
  172. {
  173. path: '/dict',
  174. component: Layout,
  175. name: 'dict',
  176. meta: {
  177. hidden: true
  178. },
  179. children: [
  180. {
  181. path: 'type/data/:dictType',
  182. component: () => import('@/views/system/dict/data/index.vue'),
  183. name: 'SystemDictData',
  184. meta: {
  185. title: '字典数据',
  186. noCache: true,
  187. hidden: true,
  188. canTo: true,
  189. icon: '',
  190. activeMenu: '/system/dict'
  191. }
  192. }
  193. ]
  194. },
  195. {
  196. path: '/codegen',
  197. component: Layout,
  198. name: 'CodegenEdit',
  199. meta: {
  200. hidden: true
  201. },
  202. children: [
  203. {
  204. path: 'edit',
  205. component: () => import('@/views/infra/codegen/EditTable.vue'),
  206. name: 'InfraCodegenEditTable',
  207. meta: {
  208. noCache: true,
  209. hidden: true,
  210. canTo: true,
  211. icon: 'ep:edit',
  212. title: '修改生成配置',
  213. activeMenu: 'infra/codegen/index'
  214. }
  215. }
  216. ]
  217. },
  218. {
  219. path: '/job',
  220. component: Layout,
  221. name: 'JobL',
  222. meta: {
  223. hidden: true
  224. },
  225. children: [
  226. {
  227. path: 'job-log',
  228. component: () => import('@/views/infra/job/logger/index.vue'),
  229. name: 'InfraJobLog',
  230. meta: {
  231. noCache: true,
  232. hidden: true,
  233. canTo: true,
  234. icon: 'ep:edit',
  235. title: '调度日志',
  236. activeMenu: 'infra/job/index'
  237. }
  238. }
  239. ]
  240. },
  241. {
  242. path: '/loginAdmin',
  243. component: () => import('@/views/Login/Login.vue'),
  244. name: 'LoginAdmin',
  245. meta: {
  246. hidden: true,
  247. title: t('router.login'),
  248. noTagsView: true
  249. }
  250. },
  251. {
  252. path: '/login',
  253. component: () => import('@/views/Login/OALogin.vue'),
  254. name: 'Login',
  255. meta: {
  256. hidden: true,
  257. title: t('router.login'),
  258. noTagsView: true
  259. }
  260. },
  261. {
  262. path: '/social-login',
  263. component: () => import('@/views/Login/SocialLogin.vue'),
  264. name: 'SocialLogin',
  265. meta: {
  266. hidden: true,
  267. title: t('router.login'),
  268. noTagsView: true
  269. }
  270. },
  271. {
  272. path: '/sso',
  273. component: () => import('@/views/Login/Login.vue'),
  274. name: 'SSOLogin',
  275. meta: {
  276. hidden: true,
  277. title: t('router.login'),
  278. noTagsView: true
  279. }
  280. },
  281. {
  282. path: '/403',
  283. component: () => import('@/views/Error/403.vue'),
  284. name: 'NoAccess',
  285. meta: {
  286. hidden: true,
  287. title: '403',
  288. noTagsView: true
  289. }
  290. },
  291. {
  292. path: '/404',
  293. component: () => import('@/views/Error/404.vue'),
  294. name: 'NoFound',
  295. meta: {
  296. hidden: true,
  297. title: '404',
  298. noTagsView: true
  299. }
  300. },
  301. {
  302. path: '/500',
  303. component: () => import('@/views/Error/500.vue'),
  304. name: 'Error',
  305. meta: {
  306. hidden: true,
  307. title: '500',
  308. noTagsView: true
  309. }
  310. }
  311. ]
  312. export default remainingRouter