remaining.ts 27 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078
  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: '/deviceattrstemplate',
  64. component: Layout,
  65. name: 'DeviceAttrsCenter',
  66. meta: {
  67. hidden: true
  68. },
  69. children: [
  70. {
  71. path: 'template/detail/:id',
  72. component: () => import('@/views/pms/devicetemplate/detail/attrsModel/index.vue'),
  73. name: 'DeviceAttrTemplateModel',
  74. meta: {
  75. title: '设备属性模板详情',
  76. noCache: false,
  77. hidden: true,
  78. canTo: true,
  79. activeMenu: '/template/info'
  80. }
  81. }
  82. ]
  83. },
  84. {
  85. path: '/iotpms/iotdevicepms', // 商品中心
  86. component: Layout,
  87. name: 'PmsDeviceCenter',
  88. meta: {
  89. hidden: true
  90. },
  91. children: [
  92. {
  93. path: 'device/detail/add',
  94. component: () => import('@/views/pms/device/IotDeviceForm.vue'),
  95. name: 'DeviceDetailAdd',
  96. meta: {
  97. noCache: false,
  98. hidden: true,
  99. canTo: true,
  100. icon: 'ep:add',
  101. title: '设备台账添加',
  102. activeMenu: '/device/base'
  103. }
  104. },
  105. {
  106. path: 'device/detail/edit/:id(\\d+)',
  107. component: () => import('@/views/pms/device/IotDeviceForm.vue'),
  108. name: 'DeviceDetailEdit',
  109. meta: {
  110. noCache: true,
  111. hidden: true,
  112. canTo: true,
  113. icon: 'ep:edit',
  114. title: '设备台账编辑',
  115. activeMenu: '/device/base'
  116. }
  117. },{
  118. path: 'device/detail/:id',
  119. component: () => import('@/views/pms/device/DeviceInfo.vue'),
  120. name: 'DeviceDetailInfo',
  121. meta: {
  122. noCache: false,
  123. hidden: true,
  124. canTo: true,
  125. icon: 'ep:info',
  126. title: '设备台账详情',
  127. activeMenu: '/device/info'
  128. }
  129. },{
  130. path: 'device/upload/:id',
  131. component: () => import('@/views/pms/device/DeviceUpload.vue'),
  132. name: 'DeviceUpload',
  133. meta: {
  134. noCache: false,
  135. hidden: true,
  136. canTo: true,
  137. icon: 'ep:info',
  138. title: '设备台账资料上传',
  139. activeMenu: '/device/upload'
  140. }
  141. },{
  142. path: 'device/bom/:id',
  143. component: () => import('@/views/pms/device/BomInfo.vue'),
  144. name: 'DeviceBom',
  145. meta: {
  146. noCache: false,
  147. hidden: true,
  148. canTo: true,
  149. icon: 'ep:info',
  150. title: '设备BOM',
  151. activeMenu: '/device/bom'
  152. }
  153. },
  154. ]
  155. },
  156. {
  157. path: '/iotpms/iotlockstock',
  158. component: Layout,
  159. name: 'PmsLockStockCenter',
  160. meta: {
  161. hidden: true
  162. },
  163. children: [
  164. {
  165. path: 'lockstock',
  166. component: () => import('@/views/pms/iotlockstock/index.vue'),
  167. name: 'IotLockStock',
  168. meta: {
  169. noCache: false,
  170. hidden: true,
  171. canTo: true,
  172. icon: 'ep:menu',
  173. title: '本地库存',
  174. activeMenu: '/lockstock/index'
  175. }
  176. },
  177. {
  178. path: 'lockstock/add',
  179. component: () => import('@/views/pms/iotlockstock/IotAddToStock.vue'),
  180. name: 'LockStockAdd',
  181. meta: {
  182. noCache: false,
  183. hidden: true,
  184. canTo: true,
  185. icon: 'ep:add',
  186. title: '添加入库',
  187. activeMenu: '/lockstock/add'
  188. }
  189. },
  190. {
  191. path: 'lockstock/edit/:id(\\d+)',
  192. component: () => import('@/views/pms/iotlockstock/IotAddToStock.vue'),
  193. name: 'LockStockEdit',
  194. meta: {
  195. noCache: true,
  196. hidden: true,
  197. canTo: true,
  198. icon: 'ep:edit',
  199. title: '修改入库',
  200. activeMenu: '/lockstock/edit'
  201. }
  202. }
  203. ]
  204. },
  205. {
  206. path: '/iotpms/iotmaintain',
  207. component: Layout,
  208. name: 'PmsMaintainCenter',
  209. meta: {
  210. hidden: true
  211. },
  212. children: [
  213. {
  214. path: 'maintain/add',
  215. component: () => import('@/views/pms/maintain/IotMaintain.vue'),
  216. name: 'MaintainAdd',
  217. meta: {
  218. noCache: false,
  219. hidden: true,
  220. canTo: true,
  221. icon: 'ep:add',
  222. title: '维修工单添加',
  223. activeMenu: '/maintain/add'
  224. }
  225. },
  226. {
  227. path: 'maintain/edit/:id(\\d+)',
  228. component: () => import('@/views/pms/maintain/IotMaintain.vue'),
  229. name: 'MaintainEdit',
  230. meta: {
  231. noCache: true,
  232. hidden: true,
  233. canTo: true,
  234. icon: 'ep:edit',
  235. title: '维修工单编辑',
  236. activeMenu: '/maintain/edit'
  237. }
  238. },{
  239. path: 'maintain/detail/:id(\\d+)',
  240. component: () => import('@/views/pms/maintain/IotMaintainDetail.vue'),
  241. name: 'MaintainDetail',
  242. meta: {
  243. noCache: false,
  244. hidden: true,
  245. canTo: true,
  246. icon: 'ep:add',
  247. title: '维修工单详情',
  248. activeMenu: '/maintain/detail'
  249. }
  250. },
  251. ]
  252. },
  253. {
  254. path: '/iotpms/iotmaintenance',
  255. component: Layout,
  256. name: 'PmsMaintenanceCenter',
  257. meta: {
  258. hidden: true
  259. },
  260. children: [
  261. {
  262. path: 'maintenance/add',
  263. component: () => import('@/views/pms/maintenance/IotMaintenance.vue'),
  264. name: 'MaintenanceAdd',
  265. meta: {
  266. noCache: false,
  267. hidden: true,
  268. canTo: true,
  269. icon: 'ep:add',
  270. title: '保养计划添加',
  271. activeMenu: '/maintenance/add'
  272. }
  273. },
  274. {
  275. path: 'maintenance/edit/:id(\\d+)',
  276. component: () => import('@/views/pms/maintenance/IotMaintenance.vue'),
  277. name: 'MaintenanceEdit',
  278. meta: {
  279. noCache: true,
  280. hidden: true,
  281. canTo: true,
  282. icon: 'ep:edit',
  283. title: '保养计划编辑',
  284. activeMenu: '/maintenance/edit'
  285. }
  286. },
  287. // {
  288. // path: 'maintenance/detail/:id(\\d+)',
  289. // component: () => import('@/views/pms/maintenance/IotMaintenanceDetail.vue'),
  290. // name: 'MaintenanceDetail',
  291. // meta: {
  292. // noCache: false,
  293. // hidden: true,
  294. // canTo: true,
  295. // icon: 'ep:add',
  296. // title: '保养计划详情',
  297. // activeMenu: '/maintenance/detail'
  298. // }
  299. // },
  300. ]
  301. },
  302. {
  303. path: '/failure',
  304. component: Layout,
  305. name: 'failure',
  306. meta: {
  307. hidden: true
  308. },
  309. children: [
  310. {
  311. path: 'failure/detail/:id',
  312. component: () => import('@/views/pms/failure/FailureInfo.vue'),
  313. name: 'FailureDetail',
  314. meta: {
  315. noCache: true,
  316. hidden: true,
  317. canTo: true,
  318. title: '查看故障详情',
  319. activeMenu: '/failure/detail'
  320. }
  321. }
  322. ]
  323. },
  324. {
  325. path: '/user',
  326. component: Layout,
  327. name: 'UserInfo',
  328. meta: {
  329. hidden: true
  330. },
  331. children: [
  332. {
  333. path: 'profile',
  334. component: () => import('@/views/Profile/Index.vue'),
  335. name: 'Profile',
  336. meta: {
  337. canTo: true,
  338. hidden: true,
  339. noTagsView: false,
  340. icon: 'ep:user',
  341. title: t('common.profile')
  342. }
  343. },
  344. {
  345. path: 'notify-message',
  346. component: () => import('@/views/system/notify/my/index.vue'),
  347. name: 'MyNotifyMessage',
  348. meta: {
  349. canTo: true,
  350. hidden: true,
  351. noTagsView: false,
  352. icon: 'ep:message',
  353. title: '我的站内信'
  354. }
  355. }
  356. ]
  357. },
  358. {
  359. path: '/dict',
  360. component: Layout,
  361. name: 'dict',
  362. meta: {
  363. hidden: true
  364. },
  365. children: [
  366. {
  367. path: 'type/data/:dictType',
  368. component: () => import('@/views/system/dict/data/index.vue'),
  369. name: 'SystemDictData',
  370. meta: {
  371. title: '字典数据',
  372. noCache: true,
  373. hidden: true,
  374. canTo: true,
  375. icon: '',
  376. activeMenu: '/system/dict'
  377. }
  378. }
  379. ]
  380. },
  381. {
  382. path: '/codegen',
  383. component: Layout,
  384. name: 'CodegenEdit',
  385. meta: {
  386. hidden: true
  387. },
  388. children: [
  389. {
  390. path: 'edit',
  391. component: () => import('@/views/infra/codegen/EditTable.vue'),
  392. name: 'InfraCodegenEditTable',
  393. meta: {
  394. noCache: true,
  395. hidden: true,
  396. canTo: true,
  397. icon: 'ep:edit',
  398. title: '修改生成配置',
  399. activeMenu: 'infra/codegen/index'
  400. }
  401. }
  402. ]
  403. },
  404. {
  405. path: '/job',
  406. component: Layout,
  407. name: 'JobL',
  408. meta: {
  409. hidden: true
  410. },
  411. children: [
  412. {
  413. path: 'job-log',
  414. component: () => import('@/views/infra/job/logger/index.vue'),
  415. name: 'InfraJobLog',
  416. meta: {
  417. noCache: true,
  418. hidden: true,
  419. canTo: true,
  420. icon: 'ep:edit',
  421. title: '调度日志',
  422. activeMenu: 'infra/job/index'
  423. }
  424. }
  425. ]
  426. },
  427. {
  428. path: '/login',
  429. component: () => import('@/views/Login/Login.vue'),
  430. name: 'Login',
  431. meta: {
  432. hidden: true,
  433. title: t('router.login'),
  434. noTagsView: true
  435. }
  436. },
  437. {
  438. path: '/sso',
  439. component: () => import('@/views/Login/Login.vue'),
  440. name: 'SSOLogin',
  441. meta: {
  442. hidden: true,
  443. title: t('router.login'),
  444. noTagsView: true
  445. }
  446. },
  447. {
  448. path: '/social-login',
  449. component: () => import('@/views/Login/SocialLogin.vue'),
  450. name: 'SocialLogin',
  451. meta: {
  452. hidden: true,
  453. title: t('router.socialLogin'),
  454. noTagsView: true
  455. }
  456. },
  457. {
  458. path: '/403',
  459. component: () => import('@/views/Error/403.vue'),
  460. name: 'NoAccess',
  461. meta: {
  462. hidden: true,
  463. title: '403',
  464. noTagsView: true
  465. }
  466. },
  467. {
  468. path: '/404',
  469. component: () => import('@/views/Error/404.vue'),
  470. name: 'NoFound',
  471. meta: {
  472. hidden: true,
  473. title: '404',
  474. noTagsView: true
  475. }
  476. },
  477. {
  478. path: '/500',
  479. component: () => import('@/views/Error/500.vue'),
  480. name: 'Error',
  481. meta: {
  482. hidden: true,
  483. title: '500',
  484. noTagsView: true
  485. }
  486. },
  487. {
  488. path: '/supplier/product', // 商品中心
  489. component: Layout,
  490. name: 'SupplierCenter',
  491. meta: {
  492. hidden: true
  493. },
  494. children: [
  495. {
  496. path: 'supplier/detail/add',
  497. component: () => import('@/views/supplier/base/form/index.vue'),
  498. name: 'SupplierDetailAdd',
  499. meta: {
  500. noCache: false,
  501. hidden: true,
  502. canTo: true,
  503. icon: 'ep:edit',
  504. title: '供应商添加',
  505. activeMenu: '/supplier/base'
  506. }
  507. },
  508. {
  509. path: 'supplier/detail/edit/:id(\\d+)',
  510. component: () => import('@/views/supplier/base/form/index.vue'),
  511. name: 'SupplierDetailEdit',
  512. meta: {
  513. noCache: true,
  514. hidden: true,
  515. canTo: true,
  516. icon: 'ep:edit',
  517. title: '供应商编辑',
  518. activeMenu: '/supplier/base'
  519. }
  520. },
  521. {
  522. path: '/supplier/detail/info/:id(\\d+)',
  523. component: () => import('@/views/supplier/base/form/index.vue'),
  524. name: 'SupplierDetailInfo',
  525. meta: {
  526. noCache: true,
  527. hidden: true,
  528. canTo: true,
  529. icon: 'ep:view',
  530. title: '供应商详情',
  531. activeMenu: '/supplier/base'
  532. }
  533. },
  534. {
  535. path: 'supplier/approvalDetail/:id',
  536. name: 'SupplierApprovalInfo',
  537. meta: {
  538. title: '供应商审核详情',
  539. noCache: true,
  540. hidden: true,
  541. activeMenu: '/supplier/base'
  542. },
  543. component: () => import('@/views/supplier/approvaldetail/ApprovalDetail.vue')
  544. }
  545. ]
  546. },
  547. {
  548. path: '/bpm',
  549. component: Layout,
  550. name: 'bpm',
  551. meta: {
  552. hidden: true
  553. },
  554. children: [
  555. {
  556. path: 'manager/form/edit',
  557. component: () => import('@/views/bpm/form/editor/index.vue'),
  558. name: 'BpmFormEditor',
  559. meta: {
  560. noCache: true,
  561. hidden: true,
  562. canTo: true,
  563. title: '设计流程表单',
  564. activeMenu: '/bpm/manager/form'
  565. }
  566. },
  567. {
  568. path: 'manager/definition',
  569. component: () => import('@/views/bpm/model/definition/index.vue'),
  570. name: 'BpmProcessDefinition',
  571. meta: {
  572. noCache: true,
  573. hidden: true,
  574. canTo: true,
  575. title: '流程定义',
  576. activeMenu: '/bpm/manager/model'
  577. }
  578. },
  579. {
  580. path: 'process-instance/detail',
  581. component: () => import('@/views/bpm/processInstance/detail/index.vue'),
  582. name: 'BpmProcessInstanceDetail',
  583. meta: {
  584. noCache: true,
  585. hidden: true,
  586. canTo: true,
  587. title: '流程详情',
  588. activeMenu: '/bpm/task/my'
  589. },
  590. props: (route) => ({
  591. id: route.query.id,
  592. taskId: route.query.taskId,
  593. activityId: route.query.activityId
  594. })
  595. },
  596. {
  597. path: 'process-instance/report',
  598. component: () => import('@/views/bpm/processInstance/report/index.vue'),
  599. name: 'BpmProcessInstanceReport',
  600. meta: {
  601. noCache: true,
  602. hidden: true,
  603. canTo: true,
  604. title: '数据报表',
  605. activeMenu: '/bpm/manager/model'
  606. }
  607. },
  608. {
  609. path: 'oa/leave/create',
  610. component: () => import('@/views/bpm/oa/leave/create.vue'),
  611. name: 'OALeaveCreate',
  612. meta: {
  613. noCache: true,
  614. hidden: true,
  615. canTo: true,
  616. title: '发起 OA 请假',
  617. activeMenu: '/bpm/oa/leave'
  618. }
  619. },
  620. {
  621. path: 'oa/leave/detail',
  622. component: () => import('@/views/bpm/oa/leave/detail.vue'),
  623. name: 'OALeaveDetail',
  624. meta: {
  625. noCache: true,
  626. hidden: true,
  627. canTo: true,
  628. title: '查看 OA 请假',
  629. activeMenu: '/bpm/oa/leave'
  630. }
  631. },
  632. {
  633. path: 'manager/model/create',
  634. component: () => import('@/views/bpm/model/form/index.vue'),
  635. name: 'BpmModelCreate',
  636. meta: {
  637. noCache: true,
  638. hidden: true,
  639. canTo: true,
  640. title: '创建流程',
  641. activeMenu: '/bpm/manager/model'
  642. }
  643. },
  644. {
  645. path: 'manager/model/:type/:id',
  646. component: () => import('@/views/bpm/model/form/index.vue'),
  647. name: 'BpmModelUpdate',
  648. meta: {
  649. noCache: true,
  650. hidden: true,
  651. canTo: true,
  652. title: '修改流程',
  653. activeMenu: '/bpm/manager/model'
  654. }
  655. }
  656. ]
  657. },
  658. {
  659. path: '/mall/product', // 商品中心
  660. component: Layout,
  661. name: 'ProductCenter',
  662. meta: {
  663. hidden: true
  664. },
  665. children: [
  666. {
  667. path: 'spu/add',
  668. component: () => import('@/views/mall/product/spu/form/index.vue'),
  669. name: 'ProductSpuAdd',
  670. meta: {
  671. noCache: false, // 需要缓存
  672. hidden: true,
  673. canTo: true,
  674. icon: 'ep:edit',
  675. title: '商品添加',
  676. activeMenu: '/mall/product/spu'
  677. }
  678. },
  679. {
  680. path: 'spu/edit/:id(\\d+)',
  681. component: () => import('@/views/mall/product/spu/form/index.vue'),
  682. name: 'ProductSpuEdit',
  683. meta: {
  684. noCache: true,
  685. hidden: true,
  686. canTo: true,
  687. icon: 'ep:edit',
  688. title: '商品编辑',
  689. activeMenu: '/mall/product/spu'
  690. }
  691. },
  692. {
  693. path: 'spu/detail/:id(\\d+)',
  694. component: () => import('@/views/mall/product/spu/form/index.vue'),
  695. name: 'ProductSpuDetail',
  696. meta: {
  697. noCache: true,
  698. hidden: true,
  699. canTo: true,
  700. icon: 'ep:view',
  701. title: '商品详情',
  702. activeMenu: '/mall/product/spu'
  703. }
  704. },
  705. {
  706. path: 'property/value/:propertyId(\\d+)',
  707. component: () => import('@/views/mall/product/property/value/index.vue'),
  708. name: 'ProductPropertyValue',
  709. meta: {
  710. noCache: true,
  711. hidden: true,
  712. canTo: true,
  713. icon: 'ep:view',
  714. title: '商品属性值',
  715. activeMenu: '/product/property'
  716. }
  717. }
  718. ]
  719. },
  720. {
  721. path: '/mall/trade', // 交易中心
  722. component: Layout,
  723. name: 'TradeCenter',
  724. meta: {
  725. hidden: true
  726. },
  727. children: [
  728. {
  729. path: 'order/detail/:id(\\d+)',
  730. component: () => import('@/views/mall/trade/order/detail/index.vue'),
  731. name: 'TradeOrderDetail',
  732. meta: { title: '订单详情', icon: 'ep:view', activeMenu: '/mall/trade/order' }
  733. },
  734. {
  735. path: 'after-sale/detail/:id(\\d+)',
  736. component: () => import('@/views/mall/trade/afterSale/detail/index.vue'),
  737. name: 'TradeAfterSaleDetail',
  738. meta: { title: '退款详情', icon: 'ep:view', activeMenu: '/mall/trade/after-sale' }
  739. }
  740. ]
  741. },
  742. {
  743. path: '/member',
  744. component: Layout,
  745. name: 'MemberCenter',
  746. meta: { hidden: true },
  747. children: [
  748. {
  749. path: 'user/detail/:id',
  750. name: 'MemberUserDetail',
  751. meta: {
  752. title: '会员详情',
  753. noCache: true,
  754. hidden: true
  755. },
  756. component: () => import('@/views/member/user/detail/index.vue')
  757. }
  758. ]
  759. },
  760. {
  761. path: '/pay',
  762. component: Layout,
  763. name: 'pay',
  764. meta: { hidden: true },
  765. children: [
  766. {
  767. path: 'cashier',
  768. name: 'PayCashier',
  769. meta: {
  770. title: '收银台',
  771. noCache: true,
  772. hidden: true
  773. },
  774. component: () => import('@/views/pay/cashier/index.vue')
  775. }
  776. ]
  777. },
  778. {
  779. path: '/diy',
  780. name: 'DiyCenter',
  781. meta: { hidden: true },
  782. component: Layout,
  783. children: [
  784. {
  785. path: 'template/decorate/:id',
  786. name: 'DiyTemplateDecorate',
  787. meta: {
  788. title: '模板装修',
  789. noCache: true,
  790. hidden: true,
  791. activeMenu: '/mall/promotion/diy/template'
  792. },
  793. component: () => import('@/views/mall/promotion/diy/template/decorate.vue')
  794. },
  795. {
  796. path: 'page/decorate/:id',
  797. name: 'DiyPageDecorate',
  798. meta: {
  799. title: '页面装修',
  800. noCache: true,
  801. hidden: true,
  802. activeMenu: '/mall/promotion/diy/page'
  803. },
  804. component: () => import('@/views/mall/promotion/diy/page/decorate.vue')
  805. }
  806. ]
  807. },
  808. {
  809. path: '/crm',
  810. component: Layout,
  811. name: 'CrmCenter',
  812. meta: { hidden: true },
  813. children: [
  814. {
  815. path: 'clue/detail/:id',
  816. name: 'CrmClueDetail',
  817. meta: {
  818. title: '线索详情',
  819. noCache: true,
  820. hidden: true,
  821. activeMenu: '/crm/clue'
  822. },
  823. component: () => import('@/views/crm/clue/detail/index.vue')
  824. },
  825. {
  826. path: 'customer/detail/:id',
  827. name: 'CrmCustomerDetail',
  828. meta: {
  829. title: '客户详情',
  830. noCache: true,
  831. hidden: true,
  832. activeMenu: '/crm/customer'
  833. },
  834. component: () => import('@/views/crm/customer/detail/index.vue')
  835. },
  836. {
  837. path: 'business/detail/:id',
  838. name: 'CrmBusinessDetail',
  839. meta: {
  840. title: '商机详情',
  841. noCache: true,
  842. hidden: true,
  843. activeMenu: '/crm/business'
  844. },
  845. component: () => import('@/views/crm/business/detail/index.vue')
  846. },
  847. {
  848. path: 'contract/detail/:id',
  849. name: 'CrmContractDetail',
  850. meta: {
  851. title: '合同详情',
  852. noCache: true,
  853. hidden: true,
  854. activeMenu: '/crm/contract'
  855. },
  856. component: () => import('@/views/crm/contract/detail/index.vue')
  857. },
  858. {
  859. path: 'receivable-plan/detail/:id',
  860. name: 'CrmReceivablePlanDetail',
  861. meta: {
  862. title: '回款计划详情',
  863. noCache: true,
  864. hidden: true,
  865. activeMenu: '/crm/receivable-plan'
  866. },
  867. component: () => import('@/views/crm/receivable/plan/detail/index.vue')
  868. },
  869. {
  870. path: 'receivable/detail/:id',
  871. name: 'CrmReceivableDetail',
  872. meta: {
  873. title: '回款详情',
  874. noCache: true,
  875. hidden: true,
  876. activeMenu: '/crm/receivable'
  877. },
  878. component: () => import('@/views/crm/receivable/detail/index.vue')
  879. },
  880. {
  881. path: 'contact/detail/:id',
  882. name: 'CrmContactDetail',
  883. meta: {
  884. title: '联系人详情',
  885. noCache: true,
  886. hidden: true,
  887. activeMenu: '/crm/contact'
  888. },
  889. component: () => import('@/views/crm/contact/detail/index.vue')
  890. },
  891. {
  892. path: 'product/detail/:id',
  893. name: 'CrmProductDetail',
  894. meta: {
  895. title: '产品详情',
  896. noCache: true,
  897. hidden: true,
  898. activeMenu: '/crm/product'
  899. },
  900. component: () => import('@/views/crm/product/detail/index.vue')
  901. }
  902. ]
  903. },
  904. {
  905. path: '/ai',
  906. component: Layout,
  907. name: 'Ai',
  908. meta: {
  909. hidden: true
  910. },
  911. children: [
  912. {
  913. path: 'image/square',
  914. component: () => import('@/views/ai/image/square/index.vue'),
  915. name: 'AiImageSquare',
  916. meta: {
  917. title: '绘图作品',
  918. icon: 'ep:home-filled',
  919. noCache: false
  920. }
  921. },
  922. {
  923. path: 'knowledge/document',
  924. component: () => import('@/views/ai/knowledge/document/index.vue'),
  925. name: 'AiKnowledgeDocument',
  926. meta: {
  927. title: '知识库文档',
  928. icon: 'ep:document',
  929. noCache: false,
  930. activeMenu: '/ai/knowledge'
  931. }
  932. },
  933. {
  934. path: 'knowledge/document/create',
  935. component: () => import('@/views/ai/knowledge/document/form/index.vue'),
  936. name: 'AiKnowledgeDocumentCreate',
  937. meta: {
  938. title: '创建文档',
  939. icon: 'ep:plus',
  940. noCache: true,
  941. hidden: true,
  942. activeMenu: '/ai/knowledge'
  943. }
  944. },
  945. {
  946. path: 'knowledge/document/update',
  947. component: () => import('@/views/ai/knowledge/document/form/index.vue'),
  948. name: 'AiKnowledgeDocumentUpdate',
  949. meta: {
  950. title: '修改文档',
  951. icon: 'ep:edit',
  952. noCache: true,
  953. hidden: true,
  954. activeMenu: '/ai/knowledge'
  955. }
  956. },
  957. {
  958. path: 'knowledge/retrieval',
  959. component: () => import('@/views/ai/knowledge/knowledge/retrieval/index.vue'),
  960. name: 'AiKnowledgeRetrieval',
  961. meta: {
  962. title: '文档召回测试',
  963. icon: 'ep:search',
  964. noCache: true,
  965. hidden: true,
  966. activeMenu: '/ai/knowledge'
  967. }
  968. },
  969. {
  970. path: 'knowledge/segment',
  971. component: () => import('@/views/ai/knowledge/segment/index.vue'),
  972. name: 'AiKnowledgeSegment',
  973. meta: {
  974. title: '知识库分段',
  975. icon: 'ep:tickets',
  976. noCache: true,
  977. hidden: true,
  978. activeMenu: '/ai/knowledge'
  979. }
  980. },
  981. {
  982. path: 'console/workflow/create',
  983. component: () => import('@/views/ai/workflow/form/index.vue'),
  984. name: 'AiWorkflowCreate',
  985. meta: {
  986. noCache: true,
  987. hidden: true,
  988. canTo: true,
  989. title: '设计 AI 工作流',
  990. activeMenu: '/ai/console/workflow'
  991. }
  992. },
  993. {
  994. path: 'console/workflow/:type/:id',
  995. component: () => import('@/views/ai/workflow/form/index.vue'),
  996. name: 'AiWorkflowUpdate',
  997. meta: {
  998. noCache: true,
  999. hidden: true,
  1000. canTo: true,
  1001. title: '设计 AI 工作流',
  1002. activeMenu: '/ai/console/workflow'
  1003. }
  1004. }
  1005. ]
  1006. },
  1007. {
  1008. path: '/:pathMatch(.*)*',
  1009. component: () => import('@/views/Error/404.vue'),
  1010. name: '',
  1011. meta: {
  1012. title: '404',
  1013. hidden: true,
  1014. breadcrumb: false
  1015. }
  1016. },
  1017. {
  1018. path: '/iot',
  1019. component: Layout,
  1020. name: 'IOT',
  1021. meta: {
  1022. hidden: true
  1023. },
  1024. children: [
  1025. {
  1026. path: 'product/product/detail/:id',
  1027. name: 'IoTProductDetail',
  1028. meta: {
  1029. title: '产品详情',
  1030. noCache: true,
  1031. hidden: true,
  1032. activeMenu: '/iot/device/product'
  1033. },
  1034. component: () => import('@/views/iot/product/product/detail/index.vue')
  1035. },
  1036. {
  1037. path: 'device/detail/:id',
  1038. name: 'IoTDeviceDetail',
  1039. meta: {
  1040. title: '设备详情',
  1041. noCache: true,
  1042. hidden: true,
  1043. activeMenu: '/iot/device/device'
  1044. },
  1045. component: () => import('@/views/iot/device/device/detail/index.vue')
  1046. },
  1047. {
  1048. path: 'plugin/detail/:id',
  1049. name: 'IoTPluginDetail',
  1050. meta: {
  1051. title: '插件详情',
  1052. noCache: true,
  1053. hidden: true,
  1054. activeMenu: '/iot/plugin'
  1055. },
  1056. component: () => import('@/views/iot/plugin/detail/index.vue')
  1057. }
  1058. ]
  1059. },
  1060. ]
  1061. export default remainingRouter