remaining.ts 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895
  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/index.vue'),
  73. name: 'DeviceAttrTemplateDetail',
  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. ]
  143. },
  144. {
  145. path: '/user',
  146. component: Layout,
  147. name: 'UserInfo',
  148. meta: {
  149. hidden: true
  150. },
  151. children: [
  152. {
  153. path: 'profile',
  154. component: () => import('@/views/Profile/Index.vue'),
  155. name: 'Profile',
  156. meta: {
  157. canTo: true,
  158. hidden: true,
  159. noTagsView: false,
  160. icon: 'ep:user',
  161. title: t('common.profile')
  162. }
  163. },
  164. {
  165. path: 'notify-message',
  166. component: () => import('@/views/system/notify/my/index.vue'),
  167. name: 'MyNotifyMessage',
  168. meta: {
  169. canTo: true,
  170. hidden: true,
  171. noTagsView: false,
  172. icon: 'ep:message',
  173. title: '我的站内信'
  174. }
  175. }
  176. ]
  177. },
  178. {
  179. path: '/dict',
  180. component: Layout,
  181. name: 'dict',
  182. meta: {
  183. hidden: true
  184. },
  185. children: [
  186. {
  187. path: 'type/data/:dictType',
  188. component: () => import('@/views/system/dict/data/index.vue'),
  189. name: 'SystemDictData',
  190. meta: {
  191. title: '字典数据',
  192. noCache: true,
  193. hidden: true,
  194. canTo: true,
  195. icon: '',
  196. activeMenu: '/system/dict'
  197. }
  198. }
  199. ]
  200. },
  201. {
  202. path: '/codegen',
  203. component: Layout,
  204. name: 'CodegenEdit',
  205. meta: {
  206. hidden: true
  207. },
  208. children: [
  209. {
  210. path: 'edit',
  211. component: () => import('@/views/infra/codegen/EditTable.vue'),
  212. name: 'InfraCodegenEditTable',
  213. meta: {
  214. noCache: true,
  215. hidden: true,
  216. canTo: true,
  217. icon: 'ep:edit',
  218. title: '修改生成配置',
  219. activeMenu: 'infra/codegen/index'
  220. }
  221. }
  222. ]
  223. },
  224. {
  225. path: '/job',
  226. component: Layout,
  227. name: 'JobL',
  228. meta: {
  229. hidden: true
  230. },
  231. children: [
  232. {
  233. path: 'job-log',
  234. component: () => import('@/views/infra/job/logger/index.vue'),
  235. name: 'InfraJobLog',
  236. meta: {
  237. noCache: true,
  238. hidden: true,
  239. canTo: true,
  240. icon: 'ep:edit',
  241. title: '调度日志',
  242. activeMenu: 'infra/job/index'
  243. }
  244. }
  245. ]
  246. },
  247. {
  248. path: '/login',
  249. component: () => import('@/views/Login/Login.vue'),
  250. name: 'Login',
  251. meta: {
  252. hidden: true,
  253. title: t('router.login'),
  254. noTagsView: true
  255. }
  256. },
  257. {
  258. path: '/sso',
  259. component: () => import('@/views/Login/Login.vue'),
  260. name: 'SSOLogin',
  261. meta: {
  262. hidden: true,
  263. title: t('router.login'),
  264. noTagsView: true
  265. }
  266. },
  267. {
  268. path: '/social-login',
  269. component: () => import('@/views/Login/SocialLogin.vue'),
  270. name: 'SocialLogin',
  271. meta: {
  272. hidden: true,
  273. title: t('router.socialLogin'),
  274. noTagsView: true
  275. }
  276. },
  277. {
  278. path: '/403',
  279. component: () => import('@/views/Error/403.vue'),
  280. name: 'NoAccess',
  281. meta: {
  282. hidden: true,
  283. title: '403',
  284. noTagsView: true
  285. }
  286. },
  287. {
  288. path: '/404',
  289. component: () => import('@/views/Error/404.vue'),
  290. name: 'NoFound',
  291. meta: {
  292. hidden: true,
  293. title: '404',
  294. noTagsView: true
  295. }
  296. },
  297. {
  298. path: '/500',
  299. component: () => import('@/views/Error/500.vue'),
  300. name: 'Error',
  301. meta: {
  302. hidden: true,
  303. title: '500',
  304. noTagsView: true
  305. }
  306. },
  307. {
  308. path: '/supplier/product', // 商品中心
  309. component: Layout,
  310. name: 'SupplierCenter',
  311. meta: {
  312. hidden: true
  313. },
  314. children: [
  315. {
  316. path: 'supplier/detail/add',
  317. component: () => import('@/views/supplier/base/form/index.vue'),
  318. name: 'SupplierDetailAdd',
  319. meta: {
  320. noCache: false,
  321. hidden: true,
  322. canTo: true,
  323. icon: 'ep:edit',
  324. title: '供应商添加',
  325. activeMenu: '/supplier/base'
  326. }
  327. },
  328. {
  329. path: 'supplier/detail/edit/:id(\\d+)',
  330. component: () => import('@/views/supplier/base/form/index.vue'),
  331. name: 'SupplierDetailEdit',
  332. meta: {
  333. noCache: true,
  334. hidden: true,
  335. canTo: true,
  336. icon: 'ep:edit',
  337. title: '供应商编辑',
  338. activeMenu: '/supplier/base'
  339. }
  340. },
  341. {
  342. path: '/supplier/detail/info/:id(\\d+)',
  343. component: () => import('@/views/supplier/base/form/index.vue'),
  344. name: 'SupplierDetailInfo',
  345. meta: {
  346. noCache: true,
  347. hidden: true,
  348. canTo: true,
  349. icon: 'ep:view',
  350. title: '供应商详情',
  351. activeMenu: '/supplier/base'
  352. }
  353. },
  354. {
  355. path: 'supplier/approvalDetail/:id',
  356. name: 'SupplierApprovalInfo',
  357. meta: {
  358. title: '供应商审核详情',
  359. noCache: true,
  360. hidden: true,
  361. activeMenu: '/supplier/base'
  362. },
  363. component: () => import('@/views/supplier/approvaldetail/ApprovalDetail.vue')
  364. }
  365. ]
  366. },
  367. {
  368. path: '/bpm',
  369. component: Layout,
  370. name: 'bpm',
  371. meta: {
  372. hidden: true
  373. },
  374. children: [
  375. {
  376. path: 'manager/form/edit',
  377. component: () => import('@/views/bpm/form/editor/index.vue'),
  378. name: 'BpmFormEditor',
  379. meta: {
  380. noCache: true,
  381. hidden: true,
  382. canTo: true,
  383. title: '设计流程表单',
  384. activeMenu: '/bpm/manager/form'
  385. }
  386. },
  387. {
  388. path: 'manager/definition',
  389. component: () => import('@/views/bpm/model/definition/index.vue'),
  390. name: 'BpmProcessDefinition',
  391. meta: {
  392. noCache: true,
  393. hidden: true,
  394. canTo: true,
  395. title: '流程定义',
  396. activeMenu: '/bpm/manager/model'
  397. }
  398. },
  399. {
  400. path: 'process-instance/detail',
  401. component: () => import('@/views/bpm/processInstance/detail/index.vue'),
  402. name: 'BpmProcessInstanceDetail',
  403. meta: {
  404. noCache: true,
  405. hidden: true,
  406. canTo: true,
  407. title: '流程详情',
  408. activeMenu: '/bpm/task/my'
  409. },
  410. props: (route) => ({
  411. id: route.query.id,
  412. taskId: route.query.taskId,
  413. activityId: route.query.activityId
  414. })
  415. },
  416. {
  417. path: 'process-instance/report',
  418. component: () => import('@/views/bpm/processInstance/report/index.vue'),
  419. name: 'BpmProcessInstanceReport',
  420. meta: {
  421. noCache: true,
  422. hidden: true,
  423. canTo: true,
  424. title: '数据报表',
  425. activeMenu: '/bpm/manager/model'
  426. }
  427. },
  428. {
  429. path: 'oa/leave/create',
  430. component: () => import('@/views/bpm/oa/leave/create.vue'),
  431. name: 'OALeaveCreate',
  432. meta: {
  433. noCache: true,
  434. hidden: true,
  435. canTo: true,
  436. title: '发起 OA 请假',
  437. activeMenu: '/bpm/oa/leave'
  438. }
  439. },
  440. {
  441. path: 'oa/leave/detail',
  442. component: () => import('@/views/bpm/oa/leave/detail.vue'),
  443. name: 'OALeaveDetail',
  444. meta: {
  445. noCache: true,
  446. hidden: true,
  447. canTo: true,
  448. title: '查看 OA 请假',
  449. activeMenu: '/bpm/oa/leave'
  450. }
  451. },
  452. {
  453. path: 'manager/model/create',
  454. component: () => import('@/views/bpm/model/form/index.vue'),
  455. name: 'BpmModelCreate',
  456. meta: {
  457. noCache: true,
  458. hidden: true,
  459. canTo: true,
  460. title: '创建流程',
  461. activeMenu: '/bpm/manager/model'
  462. }
  463. },
  464. {
  465. path: 'manager/model/:type/:id',
  466. component: () => import('@/views/bpm/model/form/index.vue'),
  467. name: 'BpmModelUpdate',
  468. meta: {
  469. noCache: true,
  470. hidden: true,
  471. canTo: true,
  472. title: '修改流程',
  473. activeMenu: '/bpm/manager/model'
  474. }
  475. }
  476. ]
  477. },
  478. {
  479. path: '/mall/product', // 商品中心
  480. component: Layout,
  481. name: 'ProductCenter',
  482. meta: {
  483. hidden: true
  484. },
  485. children: [
  486. {
  487. path: 'spu/add',
  488. component: () => import('@/views/mall/product/spu/form/index.vue'),
  489. name: 'ProductSpuAdd',
  490. meta: {
  491. noCache: false, // 需要缓存
  492. hidden: true,
  493. canTo: true,
  494. icon: 'ep:edit',
  495. title: '商品添加',
  496. activeMenu: '/mall/product/spu'
  497. }
  498. },
  499. {
  500. path: 'spu/edit/:id(\\d+)',
  501. component: () => import('@/views/mall/product/spu/form/index.vue'),
  502. name: 'ProductSpuEdit',
  503. meta: {
  504. noCache: true,
  505. hidden: true,
  506. canTo: true,
  507. icon: 'ep:edit',
  508. title: '商品编辑',
  509. activeMenu: '/mall/product/spu'
  510. }
  511. },
  512. {
  513. path: 'spu/detail/:id(\\d+)',
  514. component: () => import('@/views/mall/product/spu/form/index.vue'),
  515. name: 'ProductSpuDetail',
  516. meta: {
  517. noCache: true,
  518. hidden: true,
  519. canTo: true,
  520. icon: 'ep:view',
  521. title: '商品详情',
  522. activeMenu: '/mall/product/spu'
  523. }
  524. },
  525. {
  526. path: 'property/value/:propertyId(\\d+)',
  527. component: () => import('@/views/mall/product/property/value/index.vue'),
  528. name: 'ProductPropertyValue',
  529. meta: {
  530. noCache: true,
  531. hidden: true,
  532. canTo: true,
  533. icon: 'ep:view',
  534. title: '商品属性值',
  535. activeMenu: '/product/property'
  536. }
  537. }
  538. ]
  539. },
  540. {
  541. path: '/mall/trade', // 交易中心
  542. component: Layout,
  543. name: 'TradeCenter',
  544. meta: {
  545. hidden: true
  546. },
  547. children: [
  548. {
  549. path: 'order/detail/:id(\\d+)',
  550. component: () => import('@/views/mall/trade/order/detail/index.vue'),
  551. name: 'TradeOrderDetail',
  552. meta: { title: '订单详情', icon: 'ep:view', activeMenu: '/mall/trade/order' }
  553. },
  554. {
  555. path: 'after-sale/detail/:id(\\d+)',
  556. component: () => import('@/views/mall/trade/afterSale/detail/index.vue'),
  557. name: 'TradeAfterSaleDetail',
  558. meta: { title: '退款详情', icon: 'ep:view', activeMenu: '/mall/trade/after-sale' }
  559. }
  560. ]
  561. },
  562. {
  563. path: '/member',
  564. component: Layout,
  565. name: 'MemberCenter',
  566. meta: { hidden: true },
  567. children: [
  568. {
  569. path: 'user/detail/:id',
  570. name: 'MemberUserDetail',
  571. meta: {
  572. title: '会员详情',
  573. noCache: true,
  574. hidden: true
  575. },
  576. component: () => import('@/views/member/user/detail/index.vue')
  577. }
  578. ]
  579. },
  580. {
  581. path: '/pay',
  582. component: Layout,
  583. name: 'pay',
  584. meta: { hidden: true },
  585. children: [
  586. {
  587. path: 'cashier',
  588. name: 'PayCashier',
  589. meta: {
  590. title: '收银台',
  591. noCache: true,
  592. hidden: true
  593. },
  594. component: () => import('@/views/pay/cashier/index.vue')
  595. }
  596. ]
  597. },
  598. {
  599. path: '/diy',
  600. name: 'DiyCenter',
  601. meta: { hidden: true },
  602. component: Layout,
  603. children: [
  604. {
  605. path: 'template/decorate/:id',
  606. name: 'DiyTemplateDecorate',
  607. meta: {
  608. title: '模板装修',
  609. noCache: true,
  610. hidden: true,
  611. activeMenu: '/mall/promotion/diy/template'
  612. },
  613. component: () => import('@/views/mall/promotion/diy/template/decorate.vue')
  614. },
  615. {
  616. path: 'page/decorate/:id',
  617. name: 'DiyPageDecorate',
  618. meta: {
  619. title: '页面装修',
  620. noCache: true,
  621. hidden: true,
  622. activeMenu: '/mall/promotion/diy/page'
  623. },
  624. component: () => import('@/views/mall/promotion/diy/page/decorate.vue')
  625. }
  626. ]
  627. },
  628. {
  629. path: '/crm',
  630. component: Layout,
  631. name: 'CrmCenter',
  632. meta: { hidden: true },
  633. children: [
  634. {
  635. path: 'clue/detail/:id',
  636. name: 'CrmClueDetail',
  637. meta: {
  638. title: '线索详情',
  639. noCache: true,
  640. hidden: true,
  641. activeMenu: '/crm/clue'
  642. },
  643. component: () => import('@/views/crm/clue/detail/index.vue')
  644. },
  645. {
  646. path: 'customer/detail/:id',
  647. name: 'CrmCustomerDetail',
  648. meta: {
  649. title: '客户详情',
  650. noCache: true,
  651. hidden: true,
  652. activeMenu: '/crm/customer'
  653. },
  654. component: () => import('@/views/crm/customer/detail/index.vue')
  655. },
  656. {
  657. path: 'business/detail/:id',
  658. name: 'CrmBusinessDetail',
  659. meta: {
  660. title: '商机详情',
  661. noCache: true,
  662. hidden: true,
  663. activeMenu: '/crm/business'
  664. },
  665. component: () => import('@/views/crm/business/detail/index.vue')
  666. },
  667. {
  668. path: 'contract/detail/:id',
  669. name: 'CrmContractDetail',
  670. meta: {
  671. title: '合同详情',
  672. noCache: true,
  673. hidden: true,
  674. activeMenu: '/crm/contract'
  675. },
  676. component: () => import('@/views/crm/contract/detail/index.vue')
  677. },
  678. {
  679. path: 'receivable-plan/detail/:id',
  680. name: 'CrmReceivablePlanDetail',
  681. meta: {
  682. title: '回款计划详情',
  683. noCache: true,
  684. hidden: true,
  685. activeMenu: '/crm/receivable-plan'
  686. },
  687. component: () => import('@/views/crm/receivable/plan/detail/index.vue')
  688. },
  689. {
  690. path: 'receivable/detail/:id',
  691. name: 'CrmReceivableDetail',
  692. meta: {
  693. title: '回款详情',
  694. noCache: true,
  695. hidden: true,
  696. activeMenu: '/crm/receivable'
  697. },
  698. component: () => import('@/views/crm/receivable/detail/index.vue')
  699. },
  700. {
  701. path: 'contact/detail/:id',
  702. name: 'CrmContactDetail',
  703. meta: {
  704. title: '联系人详情',
  705. noCache: true,
  706. hidden: true,
  707. activeMenu: '/crm/contact'
  708. },
  709. component: () => import('@/views/crm/contact/detail/index.vue')
  710. },
  711. {
  712. path: 'product/detail/:id',
  713. name: 'CrmProductDetail',
  714. meta: {
  715. title: '产品详情',
  716. noCache: true,
  717. hidden: true,
  718. activeMenu: '/crm/product'
  719. },
  720. component: () => import('@/views/crm/product/detail/index.vue')
  721. }
  722. ]
  723. },
  724. {
  725. path: '/ai',
  726. component: Layout,
  727. name: 'Ai',
  728. meta: {
  729. hidden: true
  730. },
  731. children: [
  732. {
  733. path: 'image/square',
  734. component: () => import('@/views/ai/image/square/index.vue'),
  735. name: 'AiImageSquare',
  736. meta: {
  737. title: '绘图作品',
  738. icon: 'ep:home-filled',
  739. noCache: false
  740. }
  741. },
  742. {
  743. path: 'knowledge/document',
  744. component: () => import('@/views/ai/knowledge/document/index.vue'),
  745. name: 'AiKnowledgeDocument',
  746. meta: {
  747. title: '知识库文档',
  748. icon: 'ep:document',
  749. noCache: false,
  750. activeMenu: '/ai/knowledge'
  751. }
  752. },
  753. {
  754. path: 'knowledge/document/create',
  755. component: () => import('@/views/ai/knowledge/document/form/index.vue'),
  756. name: 'AiKnowledgeDocumentCreate',
  757. meta: {
  758. title: '创建文档',
  759. icon: 'ep:plus',
  760. noCache: true,
  761. hidden: true,
  762. activeMenu: '/ai/knowledge'
  763. }
  764. },
  765. {
  766. path: 'knowledge/document/update',
  767. component: () => import('@/views/ai/knowledge/document/form/index.vue'),
  768. name: 'AiKnowledgeDocumentUpdate',
  769. meta: {
  770. title: '修改文档',
  771. icon: 'ep:edit',
  772. noCache: true,
  773. hidden: true,
  774. activeMenu: '/ai/knowledge'
  775. }
  776. },
  777. {
  778. path: 'knowledge/retrieval',
  779. component: () => import('@/views/ai/knowledge/knowledge/retrieval/index.vue'),
  780. name: 'AiKnowledgeRetrieval',
  781. meta: {
  782. title: '文档召回测试',
  783. icon: 'ep:search',
  784. noCache: true,
  785. hidden: true,
  786. activeMenu: '/ai/knowledge'
  787. }
  788. },
  789. {
  790. path: 'knowledge/segment',
  791. component: () => import('@/views/ai/knowledge/segment/index.vue'),
  792. name: 'AiKnowledgeSegment',
  793. meta: {
  794. title: '知识库分段',
  795. icon: 'ep:tickets',
  796. noCache: true,
  797. hidden: true,
  798. activeMenu: '/ai/knowledge'
  799. }
  800. },
  801. {
  802. path: 'console/workflow/create',
  803. component: () => import('@/views/ai/workflow/form/index.vue'),
  804. name: 'AiWorkflowCreate',
  805. meta: {
  806. noCache: true,
  807. hidden: true,
  808. canTo: true,
  809. title: '设计 AI 工作流',
  810. activeMenu: '/ai/console/workflow'
  811. }
  812. },
  813. {
  814. path: 'console/workflow/:type/:id',
  815. component: () => import('@/views/ai/workflow/form/index.vue'),
  816. name: 'AiWorkflowUpdate',
  817. meta: {
  818. noCache: true,
  819. hidden: true,
  820. canTo: true,
  821. title: '设计 AI 工作流',
  822. activeMenu: '/ai/console/workflow'
  823. }
  824. }
  825. ]
  826. },
  827. {
  828. path: '/:pathMatch(.*)*',
  829. component: () => import('@/views/Error/404.vue'),
  830. name: '',
  831. meta: {
  832. title: '404',
  833. hidden: true,
  834. breadcrumb: false
  835. }
  836. },
  837. {
  838. path: '/iot',
  839. component: Layout,
  840. name: 'IOT',
  841. meta: {
  842. hidden: true
  843. },
  844. children: [
  845. {
  846. path: 'product/product/detail/:id',
  847. name: 'IoTProductDetail',
  848. meta: {
  849. title: '产品详情',
  850. noCache: true,
  851. hidden: true,
  852. activeMenu: '/iot/device/product'
  853. },
  854. component: () => import('@/views/iot/product/product/detail/index.vue')
  855. },
  856. {
  857. path: 'device/detail/:id',
  858. name: 'IoTDeviceDetail',
  859. meta: {
  860. title: '设备详情',
  861. noCache: true,
  862. hidden: true,
  863. activeMenu: '/iot/device/device'
  864. },
  865. component: () => import('@/views/iot/device/device/detail/index.vue')
  866. },
  867. {
  868. path: 'plugin/detail/:id',
  869. name: 'IoTPluginDetail',
  870. meta: {
  871. title: '插件详情',
  872. noCache: true,
  873. hidden: true,
  874. activeMenu: '/iot/plugin'
  875. },
  876. component: () => import('@/views/iot/plugin/detail/index.vue')
  877. }
  878. ]
  879. },
  880. ]
  881. export default remainingRouter