remaining.ts 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  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: '/redirect2',
  64. component: OaLayout,
  65. name: 'Redirect2',
  66. children: [
  67. {
  68. path: '/redirect2/:path(.*)',
  69. name: 'Redirect2',
  70. component: () => import('@/views/Redirect/Redirect.vue'),
  71. meta: {}
  72. }
  73. ],
  74. meta: {
  75. hidden: true,
  76. noTagsView: true
  77. }
  78. },
  79. {
  80. path: '/',
  81. component: OaLayout,
  82. redirect: '/home',
  83. name: 'Home',
  84. meta: {},
  85. children: [
  86. {
  87. path: 'home',
  88. component: () => import('@/views/OaSystem/home/index.vue'),
  89. name: 'Home',
  90. meta: {
  91. title: t('首页'),
  92. icon: 'ep:home-filled',
  93. noCache: false,
  94. affix: true
  95. }
  96. },
  97. {
  98. path: 'mainOfficeCenter',
  99. name: 'MainOfficeCenter',
  100. meta: {
  101. title: '办件中心'
  102. }
  103. },
  104. // {
  105. // path: 'mainOfficeCenter2',
  106. // component: () => import('@/views/OaSystem/officeCenter/mainOfficeCenter/index.vue'),
  107. // name: 'mainOfficeCenter',
  108. // meta: {
  109. // title: '办件中心'
  110. // }
  111. // },
  112. {
  113. path: 'createNewProcess',
  114. component: () => import('@/views/OaSystem/officeCenter/createNewProcess/index.vue'),
  115. name: 'CreateNewProcess',
  116. meta: {
  117. title: '新建流程'
  118. }
  119. },
  120. {
  121. path: 'createNewOffice',
  122. component: () => import('@/views/OaSystem/officeCenter/createNewOffice/index.vue'),
  123. name: 'CreateNewOffice',
  124. meta: {
  125. title: '新建办件'
  126. }
  127. },
  128. {
  129. path: 'processEdit',
  130. component: () => import('@/views/OaSystem/officeCenter/createNewOffice/index.vue'),
  131. name: 'ProcessEdit',
  132. meta: {
  133. title: '流程办理'
  134. }
  135. },
  136. {
  137. path: 'processLook',
  138. component: () => import('@/views/OaSystem/officeCenter/createNewOffice/index.vue'),
  139. name: 'ProcessLook',
  140. meta: {
  141. title: '流程查看'
  142. }
  143. },
  144. {
  145. path: 'processLog',
  146. component: () => import('@/views/OaSystem/officeCenter/createNewOffice/index.vue'),
  147. name: 'ProcessLog',
  148. meta: {
  149. title: '流程日志'
  150. }
  151. },
  152. {
  153. path: 'ReportPrint',
  154. component: () => import('@/views/OaSystem/officeCenter/createNewOffice/index.vue'),
  155. name: 'ReportPrint',
  156. meta: {
  157. title: '报表打印'
  158. }
  159. },
  160. {
  161. path: 'newsEditor',
  162. component: () => import('@/views/OaSystem/newsCenter/newsSetting/editor.vue'),
  163. name: 'newsEditor',
  164. meta: {
  165. title: '新闻编辑'
  166. }
  167. },
  168. {
  169. path: 'newsLook',
  170. component: () => import('@/views/OaSystem/newsCenter/newsLook/index.vue'),
  171. name: 'newsLook',
  172. meta: {
  173. title: '新闻中心'
  174. }
  175. },
  176. {
  177. path: 'newlookDetail',
  178. component: () => import('@/views/OaSystem/newsCenter/newsLook/lookDetail.vue'),
  179. name: 'newlookDetail',
  180. meta: {
  181. title: '新闻详情'
  182. }
  183. },
  184. {
  185. path: 'noticeLook',
  186. component: () => import('@/views/OaSystem/officeCenter/noticeAndLearn/noticeLook.vue'),
  187. name: 'noticeLook',
  188. meta: {
  189. title: '通知公告查看'
  190. }
  191. },
  192. {
  193. path: 'learnCenterLook',
  194. component: () => import('@/views/OaSystem/officeCenter/noticeAndLearn/learnCenterLook.vue'),
  195. name: 'learnCenterLook',
  196. meta: {
  197. title: '学习中心查看'
  198. }
  199. },
  200. {
  201. path: 'noticeAdd',
  202. component: () => import('@/views/OaSystem/officeCenter/noticeAndLearn/addoreditor.vue'),
  203. name: 'noticeAdd',
  204. meta: {
  205. title: '通知公告新增'
  206. }
  207. },
  208. {
  209. path: 'noticeEditor',
  210. component: () => import('@/views/OaSystem/officeCenter/noticeAndLearn/addoreditor.vue'),
  211. name: 'noticeEditor',
  212. meta: {
  213. title: '通知公告编辑',
  214. keepAlive: false
  215. }
  216. },
  217. {
  218. path: 'noticeDetail',
  219. component: () => import('@/views/OaSystem/officeCenter/noticeAndLearn/detail.vue'),
  220. name: 'noticeDetail',
  221. meta: {
  222. title: '通知公告详情'
  223. }
  224. },
  225. {
  226. path: 'learnCenterAdd',
  227. component: () => import('@/views/OaSystem/officeCenter/noticeAndLearn/addoreditor.vue'),
  228. name: 'learnCenterAdd',
  229. meta: {
  230. title: '学习中心新增'
  231. }
  232. },
  233. {
  234. path: 'learnCenterEditor',
  235. component: () => import('@/views/OaSystem/officeCenter/noticeAndLearn/addoreditor.vue'),
  236. name: 'learnCenterEditor',
  237. meta: {
  238. title: '学习中心编辑'
  239. }
  240. },
  241. {
  242. path: 'learnCenterDetail',
  243. component: () => import('@/views/OaSystem/officeCenter/noticeAndLearn/detail.vue'),
  244. name: 'learnCenterDetail',
  245. meta: {
  246. title: '学习中心详情'
  247. }
  248. },
  249. {
  250. path: 'projectDetail',
  251. component: () => import('@/views/OaSystem/projectCenter/projectDetail/projectDetail.vue'),
  252. name: 'ProjectDetail',
  253. meta: {
  254. title: '项目详情'
  255. }
  256. },
  257. {
  258. path: 'processCenter',
  259. component: () => import('@/views/OaSystem/platformManagement/processCenter/index.vue'),
  260. name: 'processCenter',
  261. meta: {
  262. title: '流程模版'
  263. }
  264. },
  265. {
  266. path: 'processContainer',
  267. component: () => import('@/views/OaSystem/processContainer/index.vue'),
  268. name: 'processContainer',
  269. meta: {
  270. title: ''
  271. }
  272. },
  273. {
  274. path: 'collectionDetail',
  275. component: () => import('@/views/OaSystem/home/collectionDetail.vue'),
  276. name: 'collectionDetail',
  277. meta: {
  278. title: '回款信息'
  279. }
  280. },
  281. {
  282. path: 'staffDetail',
  283. component: () => import('@/views/OaSystem/personnelManagement/ygdaPage/staffDetail.vue'),
  284. name: 'staffDetail',
  285. meta: {
  286. title: '档案详情'
  287. }
  288. },
  289. {
  290. path: 'dailyLogDetail',
  291. component: () => import('@/views/OaSystem/personnelManagement/dailyDetail/index.vue'),
  292. name: 'dailyLogDetail',
  293. meta: {
  294. title: '日报详情'
  295. }
  296. },
  297. {
  298. path: 'weeklyLogDetail',
  299. component: () => import('@/views/OaSystem/personnelManagement/weeklyDetail/index.vue'),
  300. name: 'weeklyLogDetail',
  301. meta: {
  302. title: '周报详情'
  303. }
  304. },
  305. {
  306. path: 'mySendLog',
  307. component: () => import('@/views/OaSystem/personnelManagement/mySendLog/index.vue'),
  308. name: 'mySendLog',
  309. meta: {
  310. title: '发出的日志'
  311. }
  312. },
  313. {
  314. path: 'newCustomer',
  315. component: () => import('@/views/OaSystem/marketCenter/khxjPage/index.vue'),
  316. name: 'newCustomer',
  317. meta: {
  318. title: '新建客户'
  319. }
  320. },
  321. {
  322. path: 'editCustomer',
  323. component: () => import('@/views/OaSystem/marketCenter/khxjPage/index.vue'),
  324. name: 'editCustomer',
  325. meta: {
  326. title: '编辑客户'
  327. }
  328. },
  329. {
  330. path: 'customerDetail',
  331. component: () => import('@/views/OaSystem/marketCenter/khxqPage/index.vue'),
  332. name: 'customerDetail',
  333. meta: {
  334. title: '客户详情'
  335. }
  336. },
  337. {
  338. path: 'salaryManagement',
  339. component: () => import('@/views/OaSystem/salaryManagement/Manage/index.vue'),
  340. name: 'salaryManagement',
  341. meta: {
  342. title: '薪资管理'
  343. }
  344. },
  345. {
  346. path: 'departmentalSalary',
  347. component: () => import('@/views/OaSystem/salaryManagement/DepartmentalSalary/index.vue'),
  348. name: 'departmentalSalary',
  349. meta: {
  350. title: '部门薪资'
  351. }
  352. },
  353. {
  354. path: 'mySalary',
  355. component: () => import('@/views/OaSystem/salaryManagement/MySalary/index.vue'),
  356. name: 'mySalary',
  357. meta: {
  358. title: '我的薪资'
  359. }
  360. },
  361. {
  362. path: 'dailyStatistic2',
  363. component: () => import('@/views/OaSystem/personnelManagement/dailyStatistic/index.vue'),
  364. name: 'dailyStatistic',
  365. meta: {
  366. title: '部门日报统计'
  367. }
  368. },
  369. {
  370. path: 'weeklyStatistic2',
  371. component: () => import('@/views/OaSystem/personnelManagement/weeklyStatistic/index.vue'),
  372. name: '"DeptWeeklyStatistic"',
  373. meta: {
  374. title: '部门周报统计'
  375. }
  376. }
  377. ]
  378. },
  379. {
  380. path: '/user',
  381. component: Layout,
  382. name: 'UserInfo',
  383. meta: {
  384. hidden: true
  385. },
  386. children: [
  387. {
  388. path: 'profile',
  389. component: () => import('@/views/Profile/Index.vue'),
  390. name: 'Profile',
  391. meta: {
  392. canTo: true,
  393. hidden: true,
  394. noTagsView: false,
  395. icon: 'ep:user',
  396. title: t('common.profile')
  397. }
  398. },
  399. {
  400. path: 'notify-message',
  401. component: () => import('@/views/system/notify/my/index.vue'),
  402. name: 'MyNotifyMessage',
  403. meta: {
  404. canTo: true,
  405. hidden: true,
  406. noTagsView: false,
  407. icon: 'ep:message',
  408. title: '我的站内信'
  409. }
  410. }
  411. ]
  412. },
  413. {
  414. path: '/dict',
  415. component: Layout,
  416. name: 'dict',
  417. meta: {
  418. hidden: true
  419. },
  420. children: [
  421. {
  422. path: 'type/data/:dictType',
  423. component: () => import('@/views/system/dict/data/index.vue'),
  424. name: 'SystemDictData',
  425. meta: {
  426. title: '字典数据',
  427. noCache: true,
  428. hidden: true,
  429. canTo: true,
  430. icon: '',
  431. activeMenu: '/system/dict'
  432. }
  433. }
  434. ]
  435. },
  436. {
  437. path: '/codegen',
  438. component: Layout,
  439. name: 'CodegenEdit',
  440. meta: {
  441. hidden: true
  442. },
  443. children: [
  444. {
  445. path: 'edit',
  446. component: () => import('@/views/infra/codegen/EditTable.vue'),
  447. name: 'InfraCodegenEditTable',
  448. meta: {
  449. noCache: true,
  450. hidden: true,
  451. canTo: true,
  452. icon: 'ep:edit',
  453. title: '修改生成配置',
  454. activeMenu: 'infra/codegen/index'
  455. }
  456. }
  457. ]
  458. },
  459. {
  460. path: '/job',
  461. component: Layout,
  462. name: 'JobL',
  463. meta: {
  464. hidden: true
  465. },
  466. children: [
  467. {
  468. path: 'job-log',
  469. component: () => import('@/views/infra/job/logger/index.vue'),
  470. name: 'InfraJobLog',
  471. meta: {
  472. noCache: true,
  473. hidden: true,
  474. canTo: true,
  475. icon: 'ep:edit',
  476. title: '调度日志',
  477. activeMenu: 'infra/job/index'
  478. }
  479. }
  480. ]
  481. },
  482. {
  483. path: '/loginAdmin',
  484. component: () => import('@/views/Login/Login.vue'),
  485. name: 'LoginAdmin',
  486. meta: {
  487. hidden: true,
  488. title: t('router.login'),
  489. noTagsView: true
  490. }
  491. },
  492. {
  493. path: '/login',
  494. component: () => import('@/views/Login/OALogin.vue'),
  495. name: 'Login',
  496. meta: {
  497. hidden: true,
  498. title: t('router.login'),
  499. noTagsView: true
  500. }
  501. },
  502. {
  503. path: '/social-login',
  504. component: () => import('@/views/Login/SocialLogin.vue'),
  505. name: 'SocialLogin',
  506. meta: {
  507. hidden: true,
  508. title: t('router.login'),
  509. noTagsView: true
  510. }
  511. },
  512. {
  513. path: '/sso',
  514. component: () => import('@/views/Login/Login.vue'),
  515. name: 'SSOLogin',
  516. meta: {
  517. hidden: true,
  518. title: t('router.login'),
  519. noTagsView: true
  520. }
  521. },
  522. {
  523. path: '/403',
  524. component: () => import('@/views/Error/403.vue'),
  525. name: 'NoAccess',
  526. meta: {
  527. hidden: true,
  528. title: '403',
  529. noTagsView: true
  530. }
  531. },
  532. {
  533. path: '/404',
  534. component: () => import('@/views/Error/404.vue'),
  535. name: 'NoFound',
  536. meta: {
  537. hidden: true,
  538. title: '404',
  539. noTagsView: true
  540. }
  541. },
  542. {
  543. path: '/500',
  544. component: () => import('@/views/Error/500.vue'),
  545. name: 'Error',
  546. meta: {
  547. hidden: true,
  548. title: '500',
  549. noTagsView: true
  550. }
  551. }
  552. ]
  553. export default remainingRouter