remaining.ts 15 KB

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