remaining.ts 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  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/add',
  354. component: () => import('@/views/mall/product/spu/form/index.vue'),
  355. name: 'ProductSpuAdd',
  356. meta: {
  357. noCache: true,
  358. hidden: true,
  359. canTo: true,
  360. icon: 'ep:edit',
  361. title: '商品添加',
  362. activeMenu: '/mall/product/spu'
  363. }
  364. },
  365. {
  366. path: 'spu/edit/:id(\\d+)',
  367. component: () => import('@/views/mall/product/spu/form/index.vue'),
  368. name: 'ProductSpuEdit',
  369. meta: {
  370. noCache: true,
  371. hidden: true,
  372. canTo: true,
  373. icon: 'ep:edit',
  374. title: '商品编辑',
  375. activeMenu: '/mall/product/spu'
  376. }
  377. },
  378. {
  379. path: 'spu/MobileIndex/:id(\\d+)',
  380. component: () => import('@/views/mall/product/spu/form/MobileIndex.vue'),
  381. name: 'ProductSpuMobileDetail',
  382. meta: {
  383. noCache: true,
  384. hidden: true,
  385. canTo: true,
  386. icon: 'ep:view',
  387. title: '商品移动端详情',
  388. }
  389. },
  390. {
  391. path: 'spu/detail/:id(\\d+)',
  392. component: () => import('@/views/mall/product/spu/form/index.vue'),
  393. name: 'ProductSpuDetail',
  394. meta: {
  395. noCache: true,
  396. hidden: true,
  397. canTo: true,
  398. icon: 'ep:view',
  399. title: '商品详情',
  400. activeMenu: '/mall/product/spu'
  401. }
  402. },
  403. {
  404. path: 'property/value/:propertyId(\\d+)',
  405. component: () => import('@/views/mall/product/property/value/index.vue'),
  406. name: 'ProductPropertyValue',
  407. meta: {
  408. noCache: true,
  409. hidden: true,
  410. canTo: true,
  411. icon: 'ep:view',
  412. title: '商品属性值',
  413. activeMenu: '/product/property'
  414. }
  415. }
  416. ]
  417. },
  418. {
  419. path: '/merchant', // 交易中心
  420. component: Layout,
  421. name: 'MerchantCenter',
  422. meta: {
  423. hidden: true
  424. },
  425. children: [
  426. {
  427. path: '/merchant',
  428. component: () => import('@/views/system/sale/merchant/index.vue'),
  429. name: 'Merchant',
  430. meta: { title: '商户管理', }
  431. },
  432. {
  433. path: '/merchant/mobileApply',
  434. component: () => import('@/views/system/sale/merchant/Apply/MerchantApplyMobileTabs.vue'),
  435. name: 'MerchantApply',
  436. meta: { }
  437. },
  438. ]
  439. },
  440. {
  441. path: '/mall/trade', // 交易中心
  442. component: Layout,
  443. name: 'TradeCenter',
  444. meta: {
  445. hidden: true
  446. },
  447. children: [
  448. {
  449. path: 'order/detail/:id(\\d+)',
  450. component: () => import('@/views/mall/trade/order/detail/index.vue'),
  451. name: 'TradeOrderDetail',
  452. meta: { title: '订单详情', icon: 'ep:view', activeMenu: '/mall/trade/order' }
  453. },
  454. {
  455. path: 'order/mobileDetail/:id(\\d+)',
  456. component: () => import('@/views/mall/trade/order/components/OrderMobileIndex.vue'),
  457. props: true,
  458. name: 'TradeOrderMobileDetail',
  459. meta: { title: '移动端订单详情', icon: 'ep:view' },
  460. },
  461. {
  462. path: 'after-sale/detail/:id(\\d+)',
  463. component: () => import('@/views/mall/trade/afterSale/detail/index.vue'),
  464. name: 'TradeAfterSaleDetail',
  465. meta: { title: '退款详情', icon: 'ep:view', activeMenu: '/mall/trade/after-sale' }
  466. },
  467. {
  468. path: 'AfterSaleMobileTab',
  469. component: () => import('@/views/mall/trade/afterSale/AfterSaleMobileTab.vue'),
  470. name: 'AfterSaleMobileTab',
  471. meta: { title: '移动端退款详情', icon: 'ep:view', }
  472. },
  473. {
  474. path: 'PickUpStoreMobileTab',
  475. component: () => import('@/views/mall/trade/delivery/pickUpStore/components/PickUpStoreMobileTab.vue'),
  476. name: 'PickUpStoreMobileTab',
  477. meta: { title: '移动端自提门店详情', icon: 'ep:view', }
  478. }
  479. ]
  480. },
  481. {
  482. path: '/member',
  483. component: Layout,
  484. name: 'MemberCenter',
  485. meta: { hidden: true },
  486. children: [
  487. {
  488. path: 'user/detail/:id',
  489. name: 'MemberUserDetail',
  490. meta: {
  491. title: '会员详情',
  492. noCache: true,
  493. hidden: true
  494. },
  495. component: () => import('@/views/member/user/detail/index.vue')
  496. },
  497. {
  498. path: 'MemberUserMobileTab',
  499. component: () => import('@/views/member/user/components/MemberUserMobileTab.vue'),
  500. // props: true,
  501. name: 'MemberUserMobileTab',
  502. meta: { title: '消费者/原会员移动端详情', icon: 'ep:view' },
  503. },
  504. ]
  505. },
  506. {
  507. path: '/pay',
  508. component: Layout,
  509. name: 'pay',
  510. meta: { hidden: true },
  511. children: [
  512. {
  513. path: 'cashier',
  514. name: 'PayCashier',
  515. meta: {
  516. title: '收银台',
  517. noCache: true,
  518. hidden: true
  519. },
  520. component: () => import('@/views/pay/cashier/index.vue')
  521. },
  522. {
  523. path: 'PayOrderMobileTab',
  524. component: () => import('@/views/pay/order/PayOrderMobileTab.vue'),
  525. // props: true,
  526. name: 'PayOrderMobileTab',
  527. meta: { title: '收费订单移动端详情', icon: 'ep:view' },
  528. },
  529. ]
  530. },
  531. {
  532. path: '/diy',
  533. name: 'DiyCenter',
  534. meta: { hidden: true },
  535. component: Layout,
  536. children: [
  537. {
  538. path: 'template/decorate/:id',
  539. name: 'DiyTemplateDecorate',
  540. meta: {
  541. title: '模板装修',
  542. noCache: true,
  543. hidden: true,
  544. activeMenu: '/mall/promotion/diy/template'
  545. },
  546. component: () => import('@/views/mall/promotion/diy/template/decorate.vue')
  547. },
  548. {
  549. path: 'page/decorate/:id',
  550. name: 'DiyPageDecorate',
  551. meta: {
  552. title: '页面装修',
  553. noCache: true,
  554. hidden: true,
  555. activeMenu: '/mall/promotion/diy/page'
  556. },
  557. component: () => import('@/views/mall/promotion/diy/page/decorate.vue')
  558. }
  559. ]
  560. },
  561. {
  562. path: '/crm',
  563. component: Layout,
  564. name: 'CrmCenter',
  565. meta: { hidden: true },
  566. children: [
  567. {
  568. path: 'customer/detail/:id',
  569. name: 'CrmCustomerDetail',
  570. meta: {
  571. title: '客户详情',
  572. noCache: true,
  573. hidden: true,
  574. activeMenu: '/crm/customer'
  575. },
  576. component: () => import('@/views/crm/customer/detail/index.vue')
  577. },
  578. {
  579. path: 'contact/detail/:id',
  580. name: 'CrmContactDetail',
  581. meta: {
  582. title: '联系人详情',
  583. noCache: true,
  584. hidden: true,
  585. activeMenu: '/crm/contact'
  586. },
  587. component: () => import('@/views/crm/contact/detail/index.vue')
  588. },
  589. {
  590. path: 'product/detail/:id',
  591. name: 'CrmProductDetail',
  592. meta: {
  593. title: '产品详情',
  594. noCache: true,
  595. hidden: true,
  596. activeMenu: '/crm/product'
  597. },
  598. component: () => import('@/views/crm/product/detail/index.vue')
  599. },
  600. {
  601. path: 'message',
  602. name: 'CrmMessage',
  603. meta: {
  604. title: '待办事项',
  605. noCache: true,
  606. hidden: true
  607. },
  608. // TODO @db52:后面搞,搞成菜单
  609. component: () => import('@/views/crm/message/index.vue')
  610. }
  611. ]
  612. }
  613. ]
  614. export default remainingRouter