remaining.ts 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467
  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: true,
  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: '/pressure',
  98. component: Layout,
  99. name: 'pressure',
  100. meta: {
  101. hidden: true
  102. },
  103. children: [
  104. {
  105. path: 'turnover/register',
  106. component: () => import('@/views/pressure/turnoverRegister/index.vue'),
  107. name: 'TurnoverRegister',
  108. meta: {
  109. title: '流转登记',
  110. noCache: true,
  111. hidden: true,
  112. canTo: true,
  113. icon: '',
  114. activeMenu: '/pressure/profileRegister'
  115. }
  116. }
  117. ]
  118. },
  119. {
  120. path: '/dict',
  121. component: Layout,
  122. name: 'dict',
  123. meta: {
  124. hidden: true
  125. },
  126. children: [
  127. {
  128. path: 'type/data/:dictType',
  129. component: () => import('@/views/system/dict/data/index.vue'),
  130. name: 'SystemDictData',
  131. meta: {
  132. title: '字典数据',
  133. noCache: true,
  134. hidden: true,
  135. canTo: true,
  136. icon: '',
  137. activeMenu: '/system/dict'
  138. }
  139. }
  140. ]
  141. },
  142. {
  143. path: '/codegen',
  144. component: Layout,
  145. name: 'CodegenEdit',
  146. meta: {
  147. hidden: true
  148. },
  149. children: [
  150. {
  151. path: 'edit',
  152. component: () => import('@/views/infra/codegen/EditTable.vue'),
  153. name: 'InfraCodegenEditTable',
  154. meta: {
  155. noCache: true,
  156. hidden: true,
  157. canTo: true,
  158. icon: 'ep:edit',
  159. title: '修改生成配置',
  160. activeMenu: 'infra/codegen/index'
  161. }
  162. }
  163. ]
  164. },
  165. {
  166. path: '/job',
  167. component: Layout,
  168. name: 'JobL',
  169. meta: {
  170. hidden: true
  171. },
  172. children: [
  173. {
  174. path: 'job-log',
  175. component: () => import('@/views/infra/job/logger/index.vue'),
  176. name: 'InfraJobLog',
  177. meta: {
  178. noCache: true,
  179. hidden: true,
  180. canTo: true,
  181. icon: 'ep:edit',
  182. title: '调度日志',
  183. activeMenu: 'infra/job/index'
  184. }
  185. }
  186. ]
  187. },
  188. {
  189. path: '/login',
  190. component: () => import('@/views/Login/Login.vue'),
  191. name: 'Login',
  192. meta: {
  193. hidden: true,
  194. title: t('router.login'),
  195. noTagsView: true
  196. }
  197. },
  198. {
  199. path: '/pressure2/qr-report/boiler',
  200. component: () => import('@/views/pressure2/qrReport/BoilerQrReport.vue'),
  201. name: 'BoilerQrReport',
  202. meta: {
  203. hidden: true,
  204. title: '锅炉检验报告',
  205. noTagsView: true
  206. }
  207. },
  208. {
  209. path: '/pressure2/qr-report/pipe',
  210. component: () => import('@/views/pressure2/qrReport/PipeQrReport.vue'),
  211. name: 'PipeQrReport',
  212. meta: {
  213. hidden: true,
  214. title: '管道检验报告',
  215. noTagsView: true
  216. }
  217. },
  218. {
  219. path: '/sso',
  220. component: () => import('@/views/Login/Login.vue'),
  221. name: 'SSOLogin',
  222. meta: {
  223. hidden: true,
  224. title: t('router.login'),
  225. noTagsView: true
  226. }
  227. },
  228. {
  229. path: '/403',
  230. component: () => import('@/views/Error/403.vue'),
  231. name: 'NoAccess',
  232. meta: {
  233. hidden: true,
  234. title: '403',
  235. noTagsView: true
  236. }
  237. },
  238. {
  239. path: '/404',
  240. component: () => import('@/views/Error/404.vue'),
  241. name: 'NoFound',
  242. meta: {
  243. hidden: true,
  244. title: '404',
  245. noTagsView: true
  246. }
  247. },
  248. {
  249. path: '/500',
  250. component: () => import('@/views/Error/500.vue'),
  251. name: 'Error',
  252. meta: {
  253. hidden: true,
  254. title: '500',
  255. noTagsView: true
  256. }
  257. },
  258. {
  259. path: '/financeOrder',
  260. component: Layout,
  261. name: 'FinanceOrder',
  262. meta: {
  263. hidden: true
  264. },
  265. children: [
  266. {
  267. path: 'view',
  268. component: () => import('@/views/pressure/financeOrder/view.vue'),
  269. name: 'FinanceOrderView',
  270. meta: {
  271. noCache: true,
  272. hidden: true,
  273. title: '结算订单详情'
  274. }
  275. }
  276. ]
  277. },
  278. // {
  279. // path: '/laboratory',
  280. // component: Layout,
  281. // name: 'laboratory',
  282. // meta: {
  283. // hidden: true
  284. // },
  285. // children: [
  286. // {
  287. // path: 'test',
  288. // component: () => import('@/views/Functional/test.vue'),
  289. // name: 'laboratoryTest',
  290. // meta: {
  291. // noCache: true,
  292. // hidden: true,
  293. // canTo: true,
  294. // title: '测试菜单',
  295. // activeMenu: '/laboratory'
  296. // }
  297. // }
  298. // ]
  299. // },
  300. {
  301. path: '/bpm',
  302. component: Layout,
  303. name: 'bpm',
  304. meta: {
  305. hidden: true
  306. },
  307. children: [
  308. {
  309. path: 'manager/form/edit',
  310. component: () => import('@/views/bpm/form/editor/index.vue'),
  311. name: 'BpmFormEditor',
  312. meta: {
  313. noCache: true,
  314. hidden: true,
  315. canTo: true,
  316. title: '设计流程表单',
  317. activeMenu: '/bpm/manager/form'
  318. }
  319. },
  320. {
  321. path: 'manager/model/edit',
  322. component: () => import('@/views/bpm/model/editor/index.vue'),
  323. name: 'BpmModelEditor',
  324. meta: {
  325. noCache: true,
  326. hidden: true,
  327. canTo: true,
  328. title: '设计流程',
  329. activeMenu: '/bpm/manager/model'
  330. }
  331. },
  332. {
  333. path: 'manager/simple/model',
  334. component: () => import('@/views/bpm/simple/SimpleModelDesign.vue'),
  335. name: 'SimpleModelDesign',
  336. meta: {
  337. noCache: true,
  338. hidden: true,
  339. canTo: true,
  340. title: '仿钉钉设计流程',
  341. activeMenu: '/bpm/manager/model'
  342. }
  343. },
  344. {
  345. path: 'manager/definition',
  346. component: () => import('@/views/bpm/definition/index.vue'),
  347. name: 'BpmProcessDefinition',
  348. meta: {
  349. noCache: true,
  350. hidden: true,
  351. canTo: true,
  352. title: '流程定义',
  353. activeMenu: '/bpm/manager/model'
  354. }
  355. },
  356. {
  357. path: 'process-instance/detail',
  358. component: () => import('@/views/bpm/processInstance/detail/index.vue'),
  359. name: 'BpmProcessInstanceDetail',
  360. meta: {
  361. noCache: true,
  362. hidden: true,
  363. canTo: true,
  364. title: '流程详情',
  365. activeMenu: '/bpm/task/my'
  366. },
  367. props: (route) => ({
  368. id: route.query.id,
  369. taskId: route.query.taskId,
  370. activityId: route.query.activityId
  371. })
  372. },
  373. {
  374. path: 'oa/leave/create',
  375. component: () => import('@/views/bpm/oa/leave/create.vue'),
  376. name: 'OALeaveCreate',
  377. meta: {
  378. noCache: true,
  379. hidden: true,
  380. canTo: true,
  381. title: '发起 OA 请假',
  382. activeMenu: '/bpm/oa/leave'
  383. }
  384. },
  385. {
  386. path: 'oa/leave/detail',
  387. component: () => import('@/views/bpm/oa/leave/detail.vue'),
  388. name: 'OALeaveDetail',
  389. meta: {
  390. noCache: true,
  391. hidden: true,
  392. canTo: true,
  393. title: '查看 OA 请假',
  394. activeMenu: '/bpm/oa/leave'
  395. }
  396. },
  397. {
  398. path: 'manager/model/create',
  399. component: () => import('@/views/bpm/model/form/index.vue'),
  400. name: 'BpmModelCreate',
  401. meta: {
  402. noCache: true,
  403. hidden: true,
  404. canTo: true,
  405. title: '创建流程',
  406. activeMenu: '/bpm/manager/model'
  407. }
  408. },
  409. {
  410. path: 'manager/model/update/:id',
  411. component: () => import('@/views/bpm/model/form/index.vue'),
  412. name: 'BpmModelUpdate',
  413. meta: {
  414. noCache: true,
  415. hidden: true,
  416. canTo: true,
  417. title: '修改流程',
  418. activeMenu: '/bpm/manager/model'
  419. }
  420. }
  421. ]
  422. },
  423. {
  424. path: '/synboy-demo',
  425. component: Layout,
  426. name: 'SynboyDemo',
  427. meta: {
  428. hidden: true
  429. },
  430. children: [
  431. {
  432. path: '',
  433. component: () => import('@/views/synboy-demo/index.vue'),
  434. name: 'SynboyDemoIndex',
  435. meta: {
  436. title: '葡萄城组件演示',
  437. icon: 'ep:picture',
  438. canTo: true,
  439. noCache: true
  440. }
  441. }
  442. ]
  443. },
  444. {
  445. path: '/:pathMatch(.*)*',
  446. component: () => import('@/views/Error/404.vue'),
  447. name: '',
  448. meta: {
  449. title: '404',
  450. hidden: true,
  451. breadcrumb: false
  452. }
  453. }
  454. ]
  455. export default remainingRouter