remaining.ts 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658
  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/MobileIndex.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. path: 'mobileDetail/',
  96. component: () => import('@/components/ZxMobileDialog/src/ZxMobileDialog.vue'),
  97. // props: true,
  98. name: 'MobileDetail',
  99. meta: { title: '移动端详情', icon: 'ep:view' },
  100. },
  101. {
  102. path: 'userMobleTabs',
  103. component: () => import('@/views/system/user/UserMobileTab.vue'),
  104. // props: true,
  105. name: 'UserMobileTab',
  106. meta: { title: '平台用户移动端详情', icon: 'ep:view' },
  107. },
  108. ]
  109. },
  110. {
  111. path: '/dict',
  112. component: Layout,
  113. name: 'dict',
  114. meta: {
  115. hidden: true
  116. },
  117. children: [
  118. {
  119. path: 'type/data/:dictType',
  120. component: () => import('@/views/system/dict/data/index.vue'),
  121. name: 'SystemDictData',
  122. meta: {
  123. title: '字典数据',
  124. noCache: true,
  125. hidden: true,
  126. canTo: true,
  127. icon: '',
  128. activeMenu: '/system/dict'
  129. }
  130. }
  131. ]
  132. },
  133. {
  134. path: '/codegen',
  135. component: Layout,
  136. name: 'CodegenEdit',
  137. meta: {
  138. hidden: true
  139. },
  140. children: [
  141. {
  142. path: 'edit',
  143. component: () => import('@/views/infra/codegen/EditTable.vue'),
  144. name: 'InfraCodegenEditTable',
  145. meta: {
  146. noCache: true,
  147. hidden: true,
  148. canTo: true,
  149. icon: 'ep:edit',
  150. title: '修改生成配置',
  151. activeMenu: 'infra/codegen/index'
  152. }
  153. }
  154. ]
  155. },
  156. {
  157. path: '/job',
  158. component: Layout,
  159. name: 'JobL',
  160. meta: {
  161. hidden: true
  162. },
  163. children: [
  164. {
  165. path: 'job-log',
  166. component: () => import('@/views/infra/job/logger/index.vue'),
  167. name: 'InfraJobLog',
  168. meta: {
  169. noCache: true,
  170. hidden: true,
  171. canTo: true,
  172. icon: 'ep:edit',
  173. title: '调度日志',
  174. activeMenu: 'infra/job/index'
  175. }
  176. }
  177. ]
  178. },
  179. {
  180. path: '/login',
  181. component: () => import('@/views/Login/Login.vue'),
  182. name: 'Login',
  183. meta: {
  184. hidden: true,
  185. title: t('router.login'),
  186. noTagsView: true
  187. }
  188. },
  189. {
  190. path: '/sso',
  191. component: () => import('@/views/Login/Login.vue'),
  192. name: 'SSOLogin',
  193. meta: {
  194. hidden: true,
  195. title: t('router.login'),
  196. noTagsView: true
  197. }
  198. },
  199. {
  200. path: '/social-login',
  201. component: () => import('@/views/Login/SocialLogin.vue'),
  202. name: 'SocialLogin',
  203. meta: {
  204. hidden: true,
  205. title: t('router.socialLogin'),
  206. noTagsView: true
  207. }
  208. },
  209. {
  210. path: '/403',
  211. component: () => import('@/views/Error/403.vue'),
  212. name: 'NoAccess',
  213. meta: {
  214. hidden: true,
  215. title: '403',
  216. noTagsView: true
  217. }
  218. },
  219. {
  220. path: '/404',
  221. component: () => import('@/views/Error/404.vue'),
  222. name: 'NoFound',
  223. meta: {
  224. hidden: true,
  225. title: '404',
  226. noTagsView: true
  227. }
  228. },
  229. {
  230. path: '/500',
  231. component: () => import('@/views/Error/500.vue'),
  232. name: 'Error',
  233. meta: {
  234. hidden: true,
  235. title: '500',
  236. noTagsView: true
  237. }
  238. },
  239. {
  240. path: '/bpm',
  241. component: Layout,
  242. name: 'bpm',
  243. meta: {
  244. hidden: true
  245. },
  246. children: [
  247. {
  248. path: '/manager/form/edit',
  249. component: () => import('@/views/bpm/form/editor/index.vue'),
  250. name: 'BpmFormEditor',
  251. meta: {
  252. noCache: true,
  253. hidden: true,
  254. canTo: true,
  255. title: '设计流程表单',
  256. activeMenu: '/bpm/manager/form'
  257. }
  258. },
  259. {
  260. path: '/manager/model/edit',
  261. component: () => import('@/views/bpm/model/editor/index.vue'),
  262. name: 'BpmModelEditor',
  263. meta: {
  264. noCache: true,
  265. hidden: true,
  266. canTo: true,
  267. title: '设计流程',
  268. activeMenu: '/bpm/manager/model'
  269. }
  270. },
  271. {
  272. path: '/manager/definition',
  273. component: () => import('@/views/bpm/definition/index.vue'),
  274. name: 'BpmProcessDefinition',
  275. meta: {
  276. noCache: true,
  277. hidden: true,
  278. canTo: true,
  279. title: '流程定义',
  280. activeMenu: '/bpm/manager/model'
  281. }
  282. },
  283. {
  284. path: '/manager/task-assign-rule',
  285. component: () => import('@/views/bpm/taskAssignRule/index.vue'),
  286. name: 'BpmTaskAssignRuleList',
  287. meta: {
  288. noCache: true,
  289. hidden: true,
  290. canTo: true,
  291. title: '任务分配规则'
  292. }
  293. },
  294. {
  295. path: '/process-instance/create',
  296. component: () => import('@/views/bpm/processInstance/create/index.vue'),
  297. name: 'BpmProcessInstanceCreate',
  298. meta: {
  299. noCache: true,
  300. hidden: true,
  301. canTo: true,
  302. title: '发起流程',
  303. activeMenu: 'bpm/processInstance/create'
  304. }
  305. },
  306. {
  307. path: '/process-instance/detail',
  308. component: () => import('@/views/bpm/processInstance/detail/index.vue'),
  309. name: 'BpmProcessInstanceDetail',
  310. meta: {
  311. noCache: true,
  312. hidden: true,
  313. canTo: true,
  314. title: '流程详情',
  315. activeMenu: 'bpm/processInstance/detail'
  316. }
  317. },
  318. {
  319. path: '/bpm/oa/leave/create',
  320. component: () => import('@/views/bpm/oa/leave/create.vue'),
  321. name: 'OALeaveCreate',
  322. meta: {
  323. noCache: true,
  324. hidden: true,
  325. canTo: true,
  326. title: '发起 OA 请假',
  327. activeMenu: '/bpm/oa/leave'
  328. }
  329. },
  330. {
  331. path: '/bpm/oa/leave/detail',
  332. component: () => import('@/views/bpm/oa/leave/detail.vue'),
  333. name: 'OALeaveDetail',
  334. meta: {
  335. noCache: true,
  336. hidden: true,
  337. canTo: true,
  338. title: '查看 OA 请假',
  339. activeMenu: '/bpm/oa/leave'
  340. }
  341. }
  342. ]
  343. },
  344. {
  345. path: '/mall/product', // 商品中心
  346. component: Layout,
  347. name: 'ProductCenter',
  348. meta: {
  349. hidden: true
  350. },
  351. children: [
  352. {
  353. path: '/spu',
  354. component: () => import('@/views/mall/product/spu/index.vue'),
  355. name: 'ProductSpu',
  356. meta: { title: '商户管理', }
  357. },
  358. {
  359. path: 'spu/add',
  360. component: () => import('@/views/mall/product/spu/form/index.vue'),
  361. name: 'ProductSpuAdd',
  362. meta: {
  363. noCache: true,
  364. hidden: true,
  365. canTo: true,
  366. icon: 'ep:edit',
  367. title: '商品添加',
  368. activeMenu: '/mall/product/spu'
  369. }
  370. },
  371. {
  372. path: 'spu/edit/:id(\\d+)',
  373. component: () => import('@/views/mall/product/spu/form/index.vue'),
  374. name: 'ProductSpuEdit',
  375. meta: {
  376. noCache: true,
  377. hidden: true,
  378. canTo: true,
  379. icon: 'ep:edit',
  380. title: '商品编辑',
  381. activeMenu: '/mall/product/spu'
  382. }
  383. },
  384. {
  385. path: 'spu/MobileIndex/:id(\\d+)/:applyMemberUserId(\d+)/:checkStatus(\d+)',
  386. component: () => import('@/views/mall/product/spu/form/MobileIndex.vue'),
  387. name: 'ProductSpuMobileDetail',
  388. meta: {
  389. noCache: true,
  390. hidden: true,
  391. canTo: true,
  392. icon: 'ep:view',
  393. title: '商品移动端详情',
  394. }
  395. },
  396. {
  397. path: 'spu/detail/:id(\\d+)',
  398. component: () => import('@/views/mall/product/spu/form/index.vue'),
  399. name: 'ProductSpuDetail',
  400. meta: {
  401. noCache: true,
  402. hidden: true,
  403. canTo: true,
  404. icon: 'ep:view',
  405. title: '商品详情',
  406. activeMenu: '/mall/product/spu'
  407. }
  408. },
  409. {
  410. path: 'property/value/:propertyId(\\d+)',
  411. component: () => import('@/views/mall/product/property/value/index.vue'),
  412. name: 'ProductPropertyValue',
  413. meta: {
  414. noCache: true,
  415. hidden: true,
  416. canTo: true,
  417. icon: 'ep:view',
  418. title: '商品属性值',
  419. activeMenu: '/product/property'
  420. }
  421. }
  422. ]
  423. },
  424. {
  425. path: '/merchant', // 交易中心
  426. component: Layout,
  427. name: 'MerchantCenter',
  428. meta: {
  429. hidden: true
  430. },
  431. children: [
  432. {
  433. path: '/merchant',
  434. component: () => import('@/views/system/sale/merchant/index.vue'),
  435. name: 'Merchant',
  436. meta: { title: '商户管理', }
  437. },
  438. {
  439. path: '/merchant/mobileApply',
  440. component: () => import('@/views/system/sale/merchant/Apply/MerchantApplyMobileTabs.vue'),
  441. name: 'MerchantApply',
  442. meta: { }
  443. },
  444. ]
  445. },
  446. {
  447. path: '/mall/trade', // 交易中心
  448. component: Layout,
  449. name: 'TradeCenter',
  450. meta: {
  451. hidden: true
  452. },
  453. children: [
  454. {
  455. path: 'order/detail/:id(\\d+)',
  456. component: () => import('@/views/mall/trade/order/detail/index.vue'),
  457. name: 'TradeOrderDetail',
  458. meta: { title: '订单详情', icon: 'ep:view', activeMenu: '/mall/trade/order' }
  459. },
  460. {
  461. path: 'order/mobileDetail/:id(\\d+)',
  462. component: () => import('@/views/mall/trade/order/components/OrderMobileIndex.vue'),
  463. props: true,
  464. name: 'TradeOrderMobileDetail',
  465. meta: { title: '移动端订单详情', icon: 'ep:view' },
  466. },
  467. {
  468. path: 'after-sale/detail/:id(\\d+)',
  469. component: () => import('@/views/mall/trade/afterSale/detail/index.vue'),
  470. name: 'TradeAfterSaleDetail',
  471. meta: { title: '退款详情', icon: 'ep:view', activeMenu: '/mall/trade/after-sale' }
  472. },
  473. {
  474. path: 'AfterSaleMobileTab',
  475. component: () => import('@/views/mall/trade/afterSale/AfterSaleMobileTab.vue'),
  476. name: 'AfterSaleMobileTab',
  477. meta: { title: '移动端退款详情', icon: 'ep:view', }
  478. },
  479. {
  480. path: 'PickUpStoreMobileTab',
  481. component: () => import('@/views/mall/trade/delivery/pickUpStore/components/PickUpStoreMobileTab.vue'),
  482. name: 'PickUpStoreMobileTab',
  483. meta: { title: '移动端自提门店详情', icon: 'ep:view', }
  484. }
  485. ]
  486. },
  487. {
  488. path: '/member',
  489. component: Layout,
  490. name: 'MemberCenter',
  491. meta: { hidden: true },
  492. children: [
  493. {
  494. path: 'user/detail/:id',
  495. name: 'MemberUserDetail',
  496. meta: {
  497. title: '会员详情',
  498. noCache: true,
  499. hidden: true
  500. },
  501. component: () => import('@/views/member/user/detail/index.vue')
  502. },
  503. {
  504. path: 'MemberUserMobileTab',
  505. component: () => import('@/views/member/user/components/MemberUserMobileTab.vue'),
  506. // props: true,
  507. name: 'MemberUserMobileTab',
  508. meta: { title: '消费者/原会员移动端详情', icon: 'ep:view' },
  509. },
  510. ]
  511. },
  512. {
  513. path: '/finance',
  514. component: Layout,
  515. name: 'FinanceCenter',
  516. meta: { hidden: true },
  517. children: [
  518. {
  519. path: 'Consumption',
  520. component: () =>
  521. import('@/views/system/distri/consumption/index.vue'),
  522. name: 'Consumption',
  523. meta: { title: '消费分', icon: 'ep:view' }
  524. },
  525. {
  526. path: 'ConsumptionAdd',
  527. component: () =>
  528. import('@/views/system/distri/consumption/ConsumptionTopUpLogMobileForm.vue'),
  529. name: 'ConsumptionAdd',
  530. meta: { title: '消费分充值', icon: 'ep:view' }
  531. }
  532. ]
  533. },
  534. {
  535. path: '/pay',
  536. component: Layout,
  537. name: 'pay',
  538. meta: { hidden: true },
  539. children: [
  540. {
  541. path: 'cashier',
  542. name: 'PayCashier',
  543. meta: {
  544. title: '收银台',
  545. noCache: true,
  546. hidden: true
  547. },
  548. component: () => import('@/views/pay/cashier/index.vue')
  549. },
  550. {
  551. path: 'PayOrderMobileTab',
  552. component: () => import('@/views/pay/order/PayOrderMobileTab.vue'),
  553. // props: true,
  554. name: 'PayOrderMobileTab',
  555. meta: { title: '收费订单移动端详情', icon: 'ep:view' },
  556. },
  557. ]
  558. },
  559. {
  560. path: '/diy',
  561. name: 'DiyCenter',
  562. meta: { hidden: true },
  563. component: Layout,
  564. children: [
  565. {
  566. path: 'template/decorate/:id',
  567. name: 'DiyTemplateDecorate',
  568. meta: {
  569. title: '模板装修',
  570. noCache: true,
  571. hidden: true,
  572. activeMenu: '/mall/promotion/diy/template'
  573. },
  574. component: () => import('@/views/mall/promotion/diy/template/decorate.vue')
  575. },
  576. {
  577. path: 'page/decorate/:id',
  578. name: 'DiyPageDecorate',
  579. meta: {
  580. title: '页面装修',
  581. noCache: true,
  582. hidden: true,
  583. activeMenu: '/mall/promotion/diy/page'
  584. },
  585. component: () => import('@/views/mall/promotion/diy/page/decorate.vue')
  586. }
  587. ]
  588. },
  589. {
  590. path: '/crm',
  591. component: Layout,
  592. name: 'CrmCenter',
  593. meta: { hidden: true },
  594. children: [
  595. {
  596. path: 'customer/detail/:id',
  597. name: 'CrmCustomerDetail',
  598. meta: {
  599. title: '客户详情',
  600. noCache: true,
  601. hidden: true,
  602. activeMenu: '/crm/customer'
  603. },
  604. component: () => import('@/views/crm/customer/detail/index.vue')
  605. },
  606. {
  607. path: 'contact/detail/:id',
  608. name: 'CrmContactDetail',
  609. meta: {
  610. title: '联系人详情',
  611. noCache: true,
  612. hidden: true,
  613. activeMenu: '/crm/contact'
  614. },
  615. component: () => import('@/views/crm/contact/detail/index.vue')
  616. },
  617. {
  618. path: 'product/detail/:id',
  619. name: 'CrmProductDetail',
  620. meta: {
  621. title: '产品详情',
  622. noCache: true,
  623. hidden: true,
  624. activeMenu: '/crm/product'
  625. },
  626. component: () => import('@/views/crm/product/detail/index.vue')
  627. },
  628. {
  629. path: 'message',
  630. name: 'CrmMessage',
  631. meta: {
  632. title: '待办事项',
  633. noCache: true,
  634. hidden: true
  635. },
  636. // TODO @db52:后面搞,搞成菜单
  637. component: () => import('@/views/crm/message/index.vue')
  638. }
  639. ]
  640. }
  641. ]
  642. export default remainingRouter