remaining.ts 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733
  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: false,
  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: '/dict',
  98. component: Layout,
  99. name: 'dict',
  100. meta: {
  101. hidden: true
  102. },
  103. children: [
  104. {
  105. path: 'type/data/:dictType',
  106. component: () => import('@/views/system/dict/data/index.vue'),
  107. name: 'SystemDictData',
  108. meta: {
  109. title: '字典数据',
  110. noCache: true,
  111. hidden: true,
  112. canTo: true,
  113. icon: '',
  114. activeMenu: '/system/dict'
  115. }
  116. }
  117. ]
  118. },
  119. {
  120. path: '/codegen',
  121. component: Layout,
  122. name: 'CodegenEdit',
  123. meta: {
  124. hidden: true
  125. },
  126. children: [
  127. {
  128. path: 'edit',
  129. component: () => import('@/views/infra/codegen/EditTable.vue'),
  130. name: 'InfraCodegenEditTable',
  131. meta: {
  132. noCache: true,
  133. hidden: true,
  134. canTo: true,
  135. icon: 'ep:edit',
  136. title: '修改生成配置',
  137. activeMenu: 'infra/codegen/index'
  138. }
  139. }
  140. ]
  141. },
  142. {
  143. path: '/job',
  144. component: Layout,
  145. name: 'JobL',
  146. meta: {
  147. hidden: true
  148. },
  149. children: [
  150. {
  151. path: 'job-log',
  152. component: () => import('@/views/infra/job/logger/index.vue'),
  153. name: 'InfraJobLog',
  154. meta: {
  155. noCache: true,
  156. hidden: true,
  157. canTo: true,
  158. icon: 'ep:edit',
  159. title: '调度日志',
  160. activeMenu: 'infra/job/index'
  161. }
  162. }
  163. ]
  164. },
  165. {
  166. path: '/login',
  167. component: () => import('@/views/Login/Login.vue'),
  168. name: 'Login',
  169. meta: {
  170. hidden: true,
  171. title: t('router.login'),
  172. noTagsView: true
  173. }
  174. },
  175. {
  176. path: '/sso',
  177. component: () => import('@/views/Login/Login.vue'),
  178. name: 'SSOLogin',
  179. meta: {
  180. hidden: true,
  181. title: t('router.login'),
  182. noTagsView: true
  183. }
  184. },
  185. {
  186. path: '/social-login',
  187. component: () => import('@/views/Login/SocialLogin.vue'),
  188. name: 'SocialLogin',
  189. meta: {
  190. hidden: true,
  191. title: t('router.socialLogin'),
  192. noTagsView: true
  193. }
  194. },
  195. {
  196. path: '/403',
  197. component: () => import('@/views/Error/403.vue'),
  198. name: 'NoAccess',
  199. meta: {
  200. hidden: true,
  201. title: '403',
  202. noTagsView: true
  203. }
  204. },
  205. {
  206. path: '/404',
  207. component: () => import('@/views/Error/404.vue'),
  208. name: 'NoFound',
  209. meta: {
  210. hidden: true,
  211. title: '404',
  212. noTagsView: true
  213. }
  214. },
  215. {
  216. path: '/500',
  217. component: () => import('@/views/Error/500.vue'),
  218. name: 'Error',
  219. meta: {
  220. hidden: true,
  221. title: '500',
  222. noTagsView: true
  223. }
  224. },
  225. {
  226. path: '/bpm',
  227. component: Layout,
  228. name: 'bpm',
  229. meta: {
  230. hidden: true
  231. },
  232. children: [
  233. {
  234. path: 'manager/form/edit',
  235. component: () => import('@/views/bpm/form/editor/index.vue'),
  236. name: 'BpmFormEditor',
  237. meta: {
  238. noCache: true,
  239. hidden: true,
  240. canTo: true,
  241. title: '设计流程表单',
  242. activeMenu: '/bpm/manager/form'
  243. }
  244. },
  245. {
  246. path: 'manager/model/edit',
  247. component: () => import('@/views/bpm/model/editor/index.vue'),
  248. name: 'BpmModelEditor',
  249. meta: {
  250. noCache: true,
  251. hidden: true,
  252. canTo: true,
  253. title: '设计流程',
  254. activeMenu: '/bpm/manager/model'
  255. }
  256. },
  257. {
  258. path: 'manager/simple/workflow/model/edit',
  259. component: () => import('@/views/bpm/simpleWorkflow/index.vue'),
  260. name: 'SimpleWorkflowDesignEditor',
  261. meta: {
  262. noCache: true,
  263. hidden: true,
  264. canTo: true,
  265. title: '仿钉钉设计流程',
  266. activeMenu: '/bpm/manager/model'
  267. }
  268. },
  269. {
  270. path: 'manager/definition',
  271. component: () => import('@/views/bpm/definition/index.vue'),
  272. name: 'BpmProcessDefinition',
  273. meta: {
  274. noCache: true,
  275. hidden: true,
  276. canTo: true,
  277. title: '流程定义',
  278. activeMenu: '/bpm/manager/model'
  279. }
  280. },
  281. {
  282. path: 'process-instance/detail',
  283. component: () => import('@/views/bpm/processInstance/detail/index.vue'),
  284. name: 'BpmProcessInstanceDetail',
  285. meta: {
  286. noCache: true,
  287. hidden: true,
  288. canTo: true,
  289. title: '流程详情',
  290. activeMenu: '/bpm/task/my'
  291. }
  292. },
  293. {
  294. path: 'oa/leave/create',
  295. component: () => import('@/views/bpm/oa/leave/create.vue'),
  296. name: 'OALeaveCreate',
  297. meta: {
  298. noCache: true,
  299. hidden: true,
  300. canTo: true,
  301. title: '发起 OA 请假',
  302. activeMenu: '/bpm/oa/leave'
  303. }
  304. },
  305. {
  306. path: 'oa/leave/detail',
  307. component: () => import('@/views/bpm/oa/leave/detail.vue'),
  308. name: 'OALeaveDetail',
  309. meta: {
  310. noCache: true,
  311. hidden: true,
  312. canTo: true,
  313. title: '查看 OA 请假',
  314. activeMenu: '/bpm/oa/leave'
  315. }
  316. }
  317. ]
  318. },
  319. {
  320. path: '/mall/product', // 商品中心
  321. component: Layout,
  322. name: 'ProductCenter',
  323. meta: {
  324. hidden: true
  325. },
  326. children: [
  327. {
  328. path: 'spu/add',
  329. component: () => import('@/views/mall/product/spu/form/index.vue'),
  330. name: 'ProductSpuAdd',
  331. meta: {
  332. noCache: true,
  333. hidden: true,
  334. canTo: true,
  335. icon: 'ep:edit',
  336. title: '商品添加',
  337. activeMenu: '/mall/product/spu'
  338. }
  339. },
  340. {
  341. path: 'spu/edit/:id(\\d+)',
  342. component: () => import('@/views/mall/product/spu/form/index.vue'),
  343. name: 'ProductSpuEdit',
  344. meta: {
  345. noCache: true,
  346. hidden: true,
  347. canTo: true,
  348. icon: 'ep:edit',
  349. title: '商品编辑',
  350. activeMenu: '/mall/product/spu'
  351. }
  352. },
  353. {
  354. path: 'spu/detail/:id(\\d+)',
  355. component: () => import('@/views/mall/product/spu/form/index.vue'),
  356. name: 'ProductSpuDetail',
  357. meta: {
  358. noCache: true,
  359. hidden: true,
  360. canTo: true,
  361. icon: 'ep:view',
  362. title: '商品详情',
  363. activeMenu: '/mall/product/spu'
  364. }
  365. },
  366. {
  367. path: 'property/value/:propertyId(\\d+)',
  368. component: () => import('@/views/mall/product/property/value/index.vue'),
  369. name: 'ProductPropertyValue',
  370. meta: {
  371. noCache: true,
  372. hidden: true,
  373. canTo: true,
  374. icon: 'ep:view',
  375. title: '商品属性值',
  376. activeMenu: '/product/property'
  377. }
  378. }
  379. ]
  380. },
  381. {
  382. path: '/mall/trade', // 交易中心
  383. component: Layout,
  384. name: 'TradeCenter',
  385. meta: {
  386. hidden: true
  387. },
  388. children: [
  389. {
  390. path: 'order/detail/:id(\\d+)',
  391. component: () => import('@/views/mall/trade/order/detail/index.vue'),
  392. name: 'TradeOrderDetail',
  393. meta: { title: '订单详情', icon: 'ep:view', activeMenu: '/mall/trade/order' }
  394. },
  395. {
  396. path: 'after-sale/detail/:id(\\d+)',
  397. component: () => import('@/views/mall/trade/afterSale/detail/index.vue'),
  398. name: 'TradeAfterSaleDetail',
  399. meta: { title: '退款详情', icon: 'ep:view', activeMenu: '/mall/trade/after-sale' }
  400. }
  401. ]
  402. },
  403. {
  404. path: '/member',
  405. component: Layout,
  406. name: 'MemberCenter',
  407. meta: { hidden: true },
  408. children: [
  409. {
  410. path: 'user/detail/:id',
  411. name: 'MemberUserDetail',
  412. meta: {
  413. title: '会员详情',
  414. noCache: true,
  415. hidden: true
  416. },
  417. component: () => import('@/views/member/user/detail/index.vue')
  418. }
  419. ]
  420. },
  421. {
  422. path: '/account',
  423. component: Layout,
  424. name: 'AccountCenter',
  425. meta: { hidden: true },
  426. children: [
  427. {
  428. path: 'user/detail/:id',
  429. name: 'AccountUserDetail',
  430. meta: {
  431. title: '账户详情',
  432. noCache: true,
  433. hidden: true
  434. },
  435. component: () => import('@/views/menduner/system/account/user/detail/index.vue')
  436. },
  437. {
  438. path: 'enterprise/detail/:id',
  439. name: 'AccountEnterpriseUserDetail',
  440. meta: {
  441. title: '账户详情',
  442. noCache: true,
  443. hidden: true
  444. },
  445. component: () => import('@/views/menduner/system/account/enterprise/detail/index.vue')
  446. }
  447. ]
  448. },
  449. {
  450. path: '/enterprise',
  451. component: Layout,
  452. name: 'EnterpriseCenter',
  453. meta: { hidden: true },
  454. children: [
  455. {
  456. path: 'enterprise/detail/:id',
  457. name: 'EnterpriseDetail',
  458. meta: {
  459. title: '企业详情',
  460. noCache: true,
  461. hidden: true
  462. },
  463. component: () => import('@/views/menduner/system/enterprise/message/details/index.vue')
  464. },
  465. {
  466. path: 'enterprise/user/detail',
  467. name: 'EnterpriseUserDetail',
  468. meta: {
  469. title: '用户详情',
  470. noCache: true,
  471. hidden: true
  472. },
  473. component: () => import('@/views/menduner/system/enterprise/userbind/details/index.vue')
  474. }
  475. ]
  476. },
  477. {
  478. path: '/person',
  479. component: Layout,
  480. name: 'PersonCenter',
  481. meta: { hidden: true },
  482. children: [
  483. {
  484. path: 'person/detail',
  485. name: 'PersonDetail',
  486. meta: {
  487. title: '人才详情',
  488. noCache: true,
  489. hidden: true
  490. },
  491. component: () => import('@/views/menduner/system/person/details/index.vue')
  492. }
  493. ]
  494. },
  495. {
  496. path: '/talentMap',
  497. component: Layout,
  498. name: 'talentMapCenter',
  499. meta: { hidden: true },
  500. children: [
  501. {
  502. path: 'talentMap/detail/:id',
  503. name: 'TalentMapDetail',
  504. meta: {
  505. title: '人才详情',
  506. noCache: true,
  507. hidden: true
  508. },
  509. component: () => import('@/views/menduner/system/talentMap/details/index.vue')
  510. }
  511. ]
  512. },
  513. {
  514. path: '/jobFair',
  515. component: Layout,
  516. name: 'jobFairManage',
  517. meta: { hidden: true },
  518. children: [
  519. {
  520. path: 'jobFair/detail/:id',
  521. name: 'JobFairDetail',
  522. meta: {
  523. title: '招聘会详情',
  524. noCache: true,
  525. hidden: true
  526. },
  527. component: () => import('@/views/menduner/system/jobFair/manage/details/index.vue')
  528. },
  529. {
  530. path: 'jobFair/statistics/:id',
  531. name: 'JobFairStatistics',
  532. meta: {
  533. title: '招聘会数据统计详情',
  534. noCache: true,
  535. hidden: true
  536. },
  537. component: () => import('@/views/menduner/system/jobFair/manage/statistics/index.vue')
  538. }
  539. ]
  540. },{
  541. path: '/voting-management',
  542. component: Layout,
  543. name: 'VotingActivityManage',
  544. meta: { hidden: true },
  545. children: [
  546. {
  547. path: ':id',
  548. name: 'VotingActivityJoinItem',
  549. meta: {
  550. title: '投票活动详情',
  551. noCache: true,
  552. hidden: true
  553. },
  554. component: () => import('@/views/menduner/system/vote/VotingActivityJoinItem.vue')
  555. }
  556. ]
  557. },
  558. {
  559. path: '/order',
  560. component: Layout,
  561. name: 'order',
  562. meta: { hidden: true },
  563. children: [
  564. {
  565. path: 'cashier',
  566. name: 'PayCashierOrder',
  567. meta: {
  568. title: '收银台',
  569. noCache: true,
  570. hidden: true
  571. },
  572. component: () => import('@/views/menduner/system/order/pay.vue')
  573. }
  574. ]
  575. },
  576. {
  577. path: '/pay',
  578. component: Layout,
  579. name: 'pay',
  580. meta: { hidden: true },
  581. children: [
  582. {
  583. path: 'cashier',
  584. name: 'PayCashier',
  585. meta: {
  586. title: '收银台',
  587. noCache: true,
  588. hidden: true
  589. },
  590. component: () => import('@/views/pay/cashier/index.vue')
  591. }
  592. ]
  593. },
  594. {
  595. path: '/diy',
  596. name: 'DiyCenter',
  597. meta: { hidden: true },
  598. component: Layout,
  599. children: [
  600. {
  601. path: 'template/decorate/:id',
  602. name: 'DiyTemplateDecorate',
  603. meta: {
  604. title: '模板装修',
  605. noCache: true,
  606. hidden: true,
  607. activeMenu: '/mall/promotion/diy/template'
  608. },
  609. component: () => import('@/views/mall/promotion/diy/template/decorate.vue')
  610. },
  611. {
  612. path: 'page/decorate/:id',
  613. name: 'DiyPageDecorate',
  614. meta: {
  615. title: '页面装修',
  616. noCache: true,
  617. hidden: true,
  618. activeMenu: '/mall/promotion/diy/page'
  619. },
  620. component: () => import('@/views/mall/promotion/diy/page/decorate.vue')
  621. }
  622. ]
  623. },
  624. {
  625. path: '/crm',
  626. component: Layout,
  627. name: 'CrmCenter',
  628. meta: { hidden: true },
  629. children: [
  630. {
  631. path: 'clue/detail/:id',
  632. name: 'CrmClueDetail',
  633. meta: {
  634. title: '线索详情',
  635. noCache: true,
  636. hidden: true,
  637. activeMenu: '/crm/clue'
  638. },
  639. component: () => import('@/views/crm/clue/detail/index.vue')
  640. },
  641. {
  642. path: 'customer/detail/:id',
  643. name: 'CrmCustomerDetail',
  644. meta: {
  645. title: '客户详情',
  646. noCache: true,
  647. hidden: true,
  648. activeMenu: '/crm/customer'
  649. },
  650. component: () => import('@/views/crm/customer/detail/index.vue')
  651. },
  652. {
  653. path: 'business/detail/:id',
  654. name: 'CrmBusinessDetail',
  655. meta: {
  656. title: '商机详情',
  657. noCache: true,
  658. hidden: true,
  659. activeMenu: '/crm/business'
  660. },
  661. component: () => import('@/views/crm/business/detail/index.vue')
  662. },
  663. {
  664. path: 'contract/detail/:id',
  665. name: 'CrmContractDetail',
  666. meta: {
  667. title: '合同详情',
  668. noCache: true,
  669. hidden: true,
  670. activeMenu: '/crm/contract'
  671. },
  672. component: () => import('@/views/crm/contract/detail/index.vue')
  673. },
  674. {
  675. path: 'receivable-plan/detail/:id',
  676. name: 'CrmReceivablePlanDetail',
  677. meta: {
  678. title: '回款计划详情',
  679. noCache: true,
  680. hidden: true,
  681. activeMenu: '/crm/receivable-plan'
  682. },
  683. component: () => import('@/views/crm/receivable/plan/detail/index.vue')
  684. },
  685. {
  686. path: 'receivable/detail/:id',
  687. name: 'CrmReceivableDetail',
  688. meta: {
  689. title: '回款详情',
  690. noCache: true,
  691. hidden: true,
  692. activeMenu: '/crm/receivable'
  693. },
  694. component: () => import('@/views/crm/receivable/detail/index.vue')
  695. },
  696. {
  697. path: 'contact/detail/:id',
  698. name: 'CrmContactDetail',
  699. meta: {
  700. title: '联系人详情',
  701. noCache: true,
  702. hidden: true,
  703. activeMenu: '/crm/contact'
  704. },
  705. component: () => import('@/views/crm/contact/detail/index.vue')
  706. },
  707. {
  708. path: 'product/detail/:id',
  709. name: 'CrmProductDetail',
  710. meta: {
  711. title: '产品详情',
  712. noCache: true,
  713. hidden: true,
  714. activeMenu: '/crm/product'
  715. },
  716. component: () => import('@/views/crm/product/detail/index.vue')
  717. }
  718. ]
  719. }
  720. ]
  721. export default remainingRouter