remaining.ts 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227
  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/iotmaintenanceplan',
  207. component: Layout,
  208. name: 'PmsMaintenanceCenter',
  209. meta: {
  210. hidden: true
  211. },
  212. children: [
  213. {
  214. path: 'maintenanceplan',
  215. component: () => import('@/views/pms/maintenance/index.vue'),
  216. name: 'IotMaintenancePlan',
  217. meta: {
  218. noCache: false,
  219. hidden: true,
  220. canTo: true,
  221. icon: 'ep:menu',
  222. title: '保养计划',
  223. activeMenu: '/maintenanceplan/index'
  224. }
  225. },
  226. {
  227. path: 'maintenanceplan/add',
  228. component: () => import('@/views/pms/maintenance/IotMaintenancePlan.vue'),
  229. name: 'IotAddMainPlan',
  230. meta: {
  231. noCache: false,
  232. hidden: true,
  233. canTo: true,
  234. icon: 'ep:add',
  235. title: '新增保养计划',
  236. activeMenu: '/maintenanceplan/add'
  237. }
  238. },
  239. {
  240. path: 'maintenanceplan/edit/:id(\\d+)',
  241. component: () => import('@/views/pms/maintenance/IotMaintenancePlan.vue'),
  242. name: 'IotEditMainPlan',
  243. meta: {
  244. noCache: true,
  245. hidden: true,
  246. canTo: true,
  247. icon: 'ep:edit',
  248. title: '修改保养计划',
  249. activeMenu: '/maintenanceplan/edit'
  250. }
  251. }
  252. ]
  253. },
  254. {
  255. path: '/iotpms/iotmaintain',
  256. component: Layout,
  257. name: 'PmsMaintainCenter',
  258. meta: {
  259. hidden: true
  260. },
  261. children: [
  262. {
  263. path: 'maintain/add',
  264. component: () => import('@/views/pms/maintain/IotMaintain.vue'),
  265. name: 'MaintainAdd',
  266. meta: {
  267. noCache: false,
  268. hidden: true,
  269. canTo: true,
  270. icon: 'ep:add',
  271. title: '维修工单添加',
  272. activeMenu: '/maintain/add'
  273. }
  274. },
  275. {
  276. path: 'maintain/edit/:id(\\d+)',
  277. component: () => import('@/views/pms/maintain/IotMaintain.vue'),
  278. name: 'MaintainEdit',
  279. meta: {
  280. noCache: true,
  281. hidden: true,
  282. canTo: true,
  283. icon: 'ep:edit',
  284. title: '维修工单编辑',
  285. activeMenu: '/maintain/edit'
  286. }
  287. },{
  288. path: 'maintain/detail/:id(\\d+)',
  289. component: () => import('@/views/pms/maintain/IotMaintainDetail.vue'),
  290. name: 'MaintainDetail',
  291. meta: {
  292. noCache: false,
  293. hidden: true,
  294. canTo: true,
  295. icon: 'ep:add',
  296. title: '维修工单详情',
  297. activeMenu: '/maintain/detail'
  298. }
  299. },
  300. ]
  301. },
  302. {
  303. path: '/iotpms/iotinspectroute',
  304. component: Layout,
  305. name: 'PmsInspectRouteCenter',
  306. meta: {
  307. hidden: true
  308. },
  309. children: [
  310. {
  311. path: 'route/add',
  312. component: () => import('@/views/pms/inspect/route/IotInspectRoute.vue'),
  313. name: 'RouteAdd',
  314. meta: {
  315. noCache: false,
  316. hidden: true,
  317. canTo: true,
  318. icon: 'ep:add',
  319. title: '巡检路线添加',
  320. activeMenu: '/route/add'
  321. }
  322. },
  323. {
  324. path: 'route/edit/:id(\\d+)',
  325. component: () => import('@/views/pms/inspect/route/IotInspectRoute.vue'),
  326. name: 'RouteEdit',
  327. meta: {
  328. noCache: true,
  329. hidden: true,
  330. canTo: true,
  331. icon: 'ep:edit',
  332. title: '巡检路线编辑',
  333. activeMenu: '/route/edit'
  334. }
  335. // }
  336. // ,{
  337. // path: 'route/detail/:id(\\d+)',
  338. // component: () => import('@/views/pms/maintain/IotMaintainDetail.vue'),
  339. // name: 'InspectRouteDetail',
  340. // meta: {
  341. // noCache: false,
  342. // hidden: true,
  343. // canTo: true,
  344. // icon: 'ep:add',
  345. // title: '巡检路线详情',
  346. // activeMenu: '/route/detail'
  347. // }
  348. },
  349. ]
  350. },
  351. {
  352. path: '/iotpms/iotinspectplan',
  353. component: Layout,
  354. name: 'PmsInspectPlanCenter',
  355. meta: {
  356. hidden: true
  357. },
  358. children: [
  359. {
  360. path: 'inspect/plan/add',
  361. component: () => import('@/views/pms/inspect/plan/IotInspectPlan.vue'),
  362. name: 'InspectPlanAdd',
  363. meta: {
  364. noCache: false,
  365. hidden: true,
  366. canTo: true,
  367. icon: 'ep:add',
  368. title: '巡检计划添加',
  369. activeMenu: '/inspect/plan/add'
  370. }
  371. },
  372. {
  373. path: 'inspect/plan/edit/:id(\\d+)',
  374. component: () => import('@/views/pms/inspect/plan/IotInspectPlan.vue'),
  375. name: 'InspectPlanEdit',
  376. meta: {
  377. noCache: true,
  378. hidden: true,
  379. canTo: true,
  380. icon: 'ep:edit',
  381. title: '巡检计划编辑',
  382. activeMenu: '/inspect/plan/edit'
  383. }
  384. // }
  385. // ,{
  386. // path: 'route/detail/:id(\\d+)',
  387. // component: () => import('@/views/pms/maintain/IotMaintainDetail.vue'),
  388. // name: 'InspectRouteDetail',
  389. // meta: {
  390. // noCache: false,
  391. // hidden: true,
  392. // canTo: true,
  393. // icon: 'ep:add',
  394. // title: '巡检路线详情',
  395. // activeMenu: '/route/detail'
  396. // }
  397. },
  398. ]
  399. },
  400. {
  401. path: '/iotpms/iotinspectorder',
  402. component: Layout,
  403. name: 'PmsInspectOrderCenter',
  404. meta: {
  405. hidden: true
  406. },
  407. children: [
  408. {
  409. path: 'inspect/order/add',
  410. component: () => import('@/views/pms/inspect/order/InspectOrderDetail.vue'),
  411. name: 'InspectOrderAdd',
  412. meta: {
  413. noCache: false,
  414. hidden: true,
  415. canTo: true,
  416. icon: 'ep:add',
  417. title: '巡检工单填写',
  418. activeMenu: '/inspect/order/add'
  419. }
  420. },
  421. {
  422. path: 'inspect/order/edit/:id(\\d+)',
  423. component: () => import('@/views/pms/inspect/order/InspectOrderDetail.vue'),
  424. name: 'InspectOrderEdit',
  425. meta: {
  426. noCache: true,
  427. hidden: true,
  428. canTo: true,
  429. icon: 'ep:edit',
  430. title: '巡检计划编辑',
  431. activeMenu: '/inspect/order/edit'
  432. }
  433. }
  434. ,{
  435. path: '/inspect/order/detail/:id(\\d+)',
  436. component: () => import('@/views/pms/inspect/order/InspectOrderDetail.vue'),
  437. name: 'InspectOrderDetail',
  438. meta: {
  439. noCache: false,
  440. hidden: true,
  441. canTo: true,
  442. icon: 'ep:add',
  443. title: '巡检工单详情',
  444. activeMenu: '/inspect/order/detail'
  445. }
  446. },
  447. ]
  448. },
  449. {
  450. path: '/failure',
  451. component: Layout,
  452. name: 'failure',
  453. meta: {
  454. hidden: true
  455. },
  456. children: [
  457. {
  458. path: 'failure/detail/:id',
  459. component: () => import('@/views/pms/failure/FailureInfo.vue'),
  460. name: 'FailureDetail',
  461. meta: {
  462. noCache: true,
  463. hidden: true,
  464. canTo: true,
  465. title: '查看故障详情',
  466. activeMenu: '/failure/detail'
  467. }
  468. }
  469. ]
  470. },
  471. {
  472. path: '/user',
  473. component: Layout,
  474. name: 'UserInfo',
  475. meta: {
  476. hidden: true
  477. },
  478. children: [
  479. {
  480. path: 'profile',
  481. component: () => import('@/views/Profile/Index.vue'),
  482. name: 'Profile',
  483. meta: {
  484. canTo: true,
  485. hidden: true,
  486. noTagsView: false,
  487. icon: 'ep:user',
  488. title: t('common.profile')
  489. }
  490. },
  491. {
  492. path: 'notify-message',
  493. component: () => import('@/views/system/notify/my/index.vue'),
  494. name: 'MyNotifyMessage',
  495. meta: {
  496. canTo: true,
  497. hidden: true,
  498. noTagsView: false,
  499. icon: 'ep:message',
  500. title: '我的站内信'
  501. }
  502. }
  503. ]
  504. },
  505. {
  506. path: '/dict',
  507. component: Layout,
  508. name: 'dict',
  509. meta: {
  510. hidden: true
  511. },
  512. children: [
  513. {
  514. path: 'type/data/:dictType',
  515. component: () => import('@/views/system/dict/data/index.vue'),
  516. name: 'SystemDictData',
  517. meta: {
  518. title: '字典数据',
  519. noCache: true,
  520. hidden: true,
  521. canTo: true,
  522. icon: '',
  523. activeMenu: '/system/dict'
  524. }
  525. }
  526. ]
  527. },
  528. {
  529. path: '/codegen',
  530. component: Layout,
  531. name: 'CodegenEdit',
  532. meta: {
  533. hidden: true
  534. },
  535. children: [
  536. {
  537. path: 'edit',
  538. component: () => import('@/views/infra/codegen/EditTable.vue'),
  539. name: 'InfraCodegenEditTable',
  540. meta: {
  541. noCache: true,
  542. hidden: true,
  543. canTo: true,
  544. icon: 'ep:edit',
  545. title: '修改生成配置',
  546. activeMenu: 'infra/codegen/index'
  547. }
  548. }
  549. ]
  550. },
  551. {
  552. path: '/job',
  553. component: Layout,
  554. name: 'JobL',
  555. meta: {
  556. hidden: true
  557. },
  558. children: [
  559. {
  560. path: 'job-log',
  561. component: () => import('@/views/infra/job/logger/index.vue'),
  562. name: 'InfraJobLog',
  563. meta: {
  564. noCache: true,
  565. hidden: true,
  566. canTo: true,
  567. icon: 'ep:edit',
  568. title: '调度日志',
  569. activeMenu: 'infra/job/index'
  570. }
  571. }
  572. ]
  573. },
  574. {
  575. path: '/login',
  576. component: () => import('@/views/Login/Login.vue'),
  577. name: 'Login',
  578. meta: {
  579. hidden: true,
  580. title: t('router.login'),
  581. noTagsView: true
  582. }
  583. },
  584. {
  585. path: '/sso',
  586. component: () => import('@/views/Login/Login.vue'),
  587. name: 'SSOLogin',
  588. meta: {
  589. hidden: true,
  590. title: t('router.login'),
  591. noTagsView: true
  592. }
  593. },
  594. {
  595. path: '/social-login',
  596. component: () => import('@/views/Login/SocialLogin.vue'),
  597. name: 'SocialLogin',
  598. meta: {
  599. hidden: true,
  600. title: t('router.socialLogin'),
  601. noTagsView: true
  602. }
  603. },
  604. {
  605. path: '/403',
  606. component: () => import('@/views/Error/403.vue'),
  607. name: 'NoAccess',
  608. meta: {
  609. hidden: true,
  610. title: '403',
  611. noTagsView: true
  612. }
  613. },
  614. {
  615. path: '/404',
  616. component: () => import('@/views/Error/404.vue'),
  617. name: 'NoFound',
  618. meta: {
  619. hidden: true,
  620. title: '404',
  621. noTagsView: true
  622. }
  623. },
  624. {
  625. path: '/500',
  626. component: () => import('@/views/Error/500.vue'),
  627. name: 'Error',
  628. meta: {
  629. hidden: true,
  630. title: '500',
  631. noTagsView: true
  632. }
  633. },
  634. {
  635. path: '/supplier/product', // 商品中心
  636. component: Layout,
  637. name: 'SupplierCenter',
  638. meta: {
  639. hidden: true
  640. },
  641. children: [
  642. {
  643. path: 'supplier/detail/add',
  644. component: () => import('@/views/supplier/base/form/index.vue'),
  645. name: 'SupplierDetailAdd',
  646. meta: {
  647. noCache: false,
  648. hidden: true,
  649. canTo: true,
  650. icon: 'ep:edit',
  651. title: '供应商添加',
  652. activeMenu: '/supplier/base'
  653. }
  654. },
  655. {
  656. path: 'supplier/detail/edit/:id(\\d+)',
  657. component: () => import('@/views/supplier/base/form/index.vue'),
  658. name: 'SupplierDetailEdit',
  659. meta: {
  660. noCache: true,
  661. hidden: true,
  662. canTo: true,
  663. icon: 'ep:edit',
  664. title: '供应商编辑',
  665. activeMenu: '/supplier/base'
  666. }
  667. },
  668. {
  669. path: '/supplier/detail/info/:id(\\d+)',
  670. component: () => import('@/views/supplier/base/form/index.vue'),
  671. name: 'SupplierDetailInfo',
  672. meta: {
  673. noCache: true,
  674. hidden: true,
  675. canTo: true,
  676. icon: 'ep:view',
  677. title: '供应商详情',
  678. activeMenu: '/supplier/base'
  679. }
  680. },
  681. {
  682. path: 'supplier/approvalDetail/:id',
  683. name: 'SupplierApprovalInfo',
  684. meta: {
  685. title: '供应商审核详情',
  686. noCache: true,
  687. hidden: true,
  688. activeMenu: '/supplier/base'
  689. },
  690. component: () => import('@/views/supplier/approvaldetail/ApprovalDetail.vue')
  691. }
  692. ]
  693. },
  694. {
  695. path: '/bpm',
  696. component: Layout,
  697. name: 'bpm',
  698. meta: {
  699. hidden: true
  700. },
  701. children: [
  702. {
  703. path: 'manager/form/edit',
  704. component: () => import('@/views/bpm/form/editor/index.vue'),
  705. name: 'BpmFormEditor',
  706. meta: {
  707. noCache: true,
  708. hidden: true,
  709. canTo: true,
  710. title: '设计流程表单',
  711. activeMenu: '/bpm/manager/form'
  712. }
  713. },
  714. {
  715. path: 'manager/definition',
  716. component: () => import('@/views/bpm/model/definition/index.vue'),
  717. name: 'BpmProcessDefinition',
  718. meta: {
  719. noCache: true,
  720. hidden: true,
  721. canTo: true,
  722. title: '流程定义',
  723. activeMenu: '/bpm/manager/model'
  724. }
  725. },
  726. {
  727. path: 'process-instance/detail',
  728. component: () => import('@/views/bpm/processInstance/detail/index.vue'),
  729. name: 'BpmProcessInstanceDetail',
  730. meta: {
  731. noCache: true,
  732. hidden: true,
  733. canTo: true,
  734. title: '流程详情',
  735. activeMenu: '/bpm/task/my'
  736. },
  737. props: (route) => ({
  738. id: route.query.id,
  739. taskId: route.query.taskId,
  740. activityId: route.query.activityId
  741. })
  742. },
  743. {
  744. path: 'process-instance/report',
  745. component: () => import('@/views/bpm/processInstance/report/index.vue'),
  746. name: 'BpmProcessInstanceReport',
  747. meta: {
  748. noCache: true,
  749. hidden: true,
  750. canTo: true,
  751. title: '数据报表',
  752. activeMenu: '/bpm/manager/model'
  753. }
  754. },
  755. {
  756. path: 'oa/leave/create',
  757. component: () => import('@/views/bpm/oa/leave/create.vue'),
  758. name: 'OALeaveCreate',
  759. meta: {
  760. noCache: true,
  761. hidden: true,
  762. canTo: true,
  763. title: '发起 OA 请假',
  764. activeMenu: '/bpm/oa/leave'
  765. }
  766. },
  767. {
  768. path: 'oa/leave/detail',
  769. component: () => import('@/views/bpm/oa/leave/detail.vue'),
  770. name: 'OALeaveDetail',
  771. meta: {
  772. noCache: true,
  773. hidden: true,
  774. canTo: true,
  775. title: '查看 OA 请假',
  776. activeMenu: '/bpm/oa/leave'
  777. }
  778. },
  779. {
  780. path: 'manager/model/create',
  781. component: () => import('@/views/bpm/model/form/index.vue'),
  782. name: 'BpmModelCreate',
  783. meta: {
  784. noCache: true,
  785. hidden: true,
  786. canTo: true,
  787. title: '创建流程',
  788. activeMenu: '/bpm/manager/model'
  789. }
  790. },
  791. {
  792. path: 'manager/model/:type/:id',
  793. component: () => import('@/views/bpm/model/form/index.vue'),
  794. name: 'BpmModelUpdate',
  795. meta: {
  796. noCache: true,
  797. hidden: true,
  798. canTo: true,
  799. title: '修改流程',
  800. activeMenu: '/bpm/manager/model'
  801. }
  802. }
  803. ]
  804. },
  805. {
  806. path: '/mall/product', // 商品中心
  807. component: Layout,
  808. name: 'ProductCenter',
  809. meta: {
  810. hidden: true
  811. },
  812. children: [
  813. {
  814. path: 'spu/add',
  815. component: () => import('@/views/mall/product/spu/form/index.vue'),
  816. name: 'ProductSpuAdd',
  817. meta: {
  818. noCache: false, // 需要缓存
  819. hidden: true,
  820. canTo: true,
  821. icon: 'ep:edit',
  822. title: '商品添加',
  823. activeMenu: '/mall/product/spu'
  824. }
  825. },
  826. {
  827. path: 'spu/edit/:id(\\d+)',
  828. component: () => import('@/views/mall/product/spu/form/index.vue'),
  829. name: 'ProductSpuEdit',
  830. meta: {
  831. noCache: true,
  832. hidden: true,
  833. canTo: true,
  834. icon: 'ep:edit',
  835. title: '商品编辑',
  836. activeMenu: '/mall/product/spu'
  837. }
  838. },
  839. {
  840. path: 'spu/detail/:id(\\d+)',
  841. component: () => import('@/views/mall/product/spu/form/index.vue'),
  842. name: 'ProductSpuDetail',
  843. meta: {
  844. noCache: true,
  845. hidden: true,
  846. canTo: true,
  847. icon: 'ep:view',
  848. title: '商品详情',
  849. activeMenu: '/mall/product/spu'
  850. }
  851. },
  852. {
  853. path: 'property/value/:propertyId(\\d+)',
  854. component: () => import('@/views/mall/product/property/value/index.vue'),
  855. name: 'ProductPropertyValue',
  856. meta: {
  857. noCache: true,
  858. hidden: true,
  859. canTo: true,
  860. icon: 'ep:view',
  861. title: '商品属性值',
  862. activeMenu: '/product/property'
  863. }
  864. }
  865. ]
  866. },
  867. {
  868. path: '/mall/trade', // 交易中心
  869. component: Layout,
  870. name: 'TradeCenter',
  871. meta: {
  872. hidden: true
  873. },
  874. children: [
  875. {
  876. path: 'order/detail/:id(\\d+)',
  877. component: () => import('@/views/mall/trade/order/detail/index.vue'),
  878. name: 'TradeOrderDetail',
  879. meta: { title: '订单详情', icon: 'ep:view', activeMenu: '/mall/trade/order' }
  880. },
  881. {
  882. path: 'after-sale/detail/:id(\\d+)',
  883. component: () => import('@/views/mall/trade/afterSale/detail/index.vue'),
  884. name: 'TradeAfterSaleDetail',
  885. meta: { title: '退款详情', icon: 'ep:view', activeMenu: '/mall/trade/after-sale' }
  886. }
  887. ]
  888. },
  889. {
  890. path: '/member',
  891. component: Layout,
  892. name: 'MemberCenter',
  893. meta: { hidden: true },
  894. children: [
  895. {
  896. path: 'user/detail/:id',
  897. name: 'MemberUserDetail',
  898. meta: {
  899. title: '会员详情',
  900. noCache: true,
  901. hidden: true
  902. },
  903. component: () => import('@/views/member/user/detail/index.vue')
  904. }
  905. ]
  906. },
  907. {
  908. path: '/pay',
  909. component: Layout,
  910. name: 'pay',
  911. meta: { hidden: true },
  912. children: [
  913. {
  914. path: 'cashier',
  915. name: 'PayCashier',
  916. meta: {
  917. title: '收银台',
  918. noCache: true,
  919. hidden: true
  920. },
  921. component: () => import('@/views/pay/cashier/index.vue')
  922. }
  923. ]
  924. },
  925. {
  926. path: '/diy',
  927. name: 'DiyCenter',
  928. meta: { hidden: true },
  929. component: Layout,
  930. children: [
  931. {
  932. path: 'template/decorate/:id',
  933. name: 'DiyTemplateDecorate',
  934. meta: {
  935. title: '模板装修',
  936. noCache: true,
  937. hidden: true,
  938. activeMenu: '/mall/promotion/diy/template'
  939. },
  940. component: () => import('@/views/mall/promotion/diy/template/decorate.vue')
  941. },
  942. {
  943. path: 'page/decorate/:id',
  944. name: 'DiyPageDecorate',
  945. meta: {
  946. title: '页面装修',
  947. noCache: true,
  948. hidden: true,
  949. activeMenu: '/mall/promotion/diy/page'
  950. },
  951. component: () => import('@/views/mall/promotion/diy/page/decorate.vue')
  952. }
  953. ]
  954. },
  955. {
  956. path: '/crm',
  957. component: Layout,
  958. name: 'CrmCenter',
  959. meta: { hidden: true },
  960. children: [
  961. {
  962. path: 'clue/detail/:id',
  963. name: 'CrmClueDetail',
  964. meta: {
  965. title: '线索详情',
  966. noCache: true,
  967. hidden: true,
  968. activeMenu: '/crm/clue'
  969. },
  970. component: () => import('@/views/crm/clue/detail/index.vue')
  971. },
  972. {
  973. path: 'customer/detail/:id',
  974. name: 'CrmCustomerDetail',
  975. meta: {
  976. title: '客户详情',
  977. noCache: true,
  978. hidden: true,
  979. activeMenu: '/crm/customer'
  980. },
  981. component: () => import('@/views/crm/customer/detail/index.vue')
  982. },
  983. {
  984. path: 'business/detail/:id',
  985. name: 'CrmBusinessDetail',
  986. meta: {
  987. title: '商机详情',
  988. noCache: true,
  989. hidden: true,
  990. activeMenu: '/crm/business'
  991. },
  992. component: () => import('@/views/crm/business/detail/index.vue')
  993. },
  994. {
  995. path: 'contract/detail/:id',
  996. name: 'CrmContractDetail',
  997. meta: {
  998. title: '合同详情',
  999. noCache: true,
  1000. hidden: true,
  1001. activeMenu: '/crm/contract'
  1002. },
  1003. component: () => import('@/views/crm/contract/detail/index.vue')
  1004. },
  1005. {
  1006. path: 'receivable-plan/detail/:id',
  1007. name: 'CrmReceivablePlanDetail',
  1008. meta: {
  1009. title: '回款计划详情',
  1010. noCache: true,
  1011. hidden: true,
  1012. activeMenu: '/crm/receivable-plan'
  1013. },
  1014. component: () => import('@/views/crm/receivable/plan/detail/index.vue')
  1015. },
  1016. {
  1017. path: 'receivable/detail/:id',
  1018. name: 'CrmReceivableDetail',
  1019. meta: {
  1020. title: '回款详情',
  1021. noCache: true,
  1022. hidden: true,
  1023. activeMenu: '/crm/receivable'
  1024. },
  1025. component: () => import('@/views/crm/receivable/detail/index.vue')
  1026. },
  1027. {
  1028. path: 'contact/detail/:id',
  1029. name: 'CrmContactDetail',
  1030. meta: {
  1031. title: '联系人详情',
  1032. noCache: true,
  1033. hidden: true,
  1034. activeMenu: '/crm/contact'
  1035. },
  1036. component: () => import('@/views/crm/contact/detail/index.vue')
  1037. },
  1038. {
  1039. path: 'product/detail/:id',
  1040. name: 'CrmProductDetail',
  1041. meta: {
  1042. title: '产品详情',
  1043. noCache: true,
  1044. hidden: true,
  1045. activeMenu: '/crm/product'
  1046. },
  1047. component: () => import('@/views/crm/product/detail/index.vue')
  1048. }
  1049. ]
  1050. },
  1051. {
  1052. path: '/ai',
  1053. component: Layout,
  1054. name: 'Ai',
  1055. meta: {
  1056. hidden: true
  1057. },
  1058. children: [
  1059. {
  1060. path: 'image/square',
  1061. component: () => import('@/views/ai/image/square/index.vue'),
  1062. name: 'AiImageSquare',
  1063. meta: {
  1064. title: '绘图作品',
  1065. icon: 'ep:home-filled',
  1066. noCache: false
  1067. }
  1068. },
  1069. {
  1070. path: 'knowledge/document',
  1071. component: () => import('@/views/ai/knowledge/document/index.vue'),
  1072. name: 'AiKnowledgeDocument',
  1073. meta: {
  1074. title: '知识库文档',
  1075. icon: 'ep:document',
  1076. noCache: false,
  1077. activeMenu: '/ai/knowledge'
  1078. }
  1079. },
  1080. {
  1081. path: 'knowledge/document/create',
  1082. component: () => import('@/views/ai/knowledge/document/form/index.vue'),
  1083. name: 'AiKnowledgeDocumentCreate',
  1084. meta: {
  1085. title: '创建文档',
  1086. icon: 'ep:plus',
  1087. noCache: true,
  1088. hidden: true,
  1089. activeMenu: '/ai/knowledge'
  1090. }
  1091. },
  1092. {
  1093. path: 'knowledge/document/update',
  1094. component: () => import('@/views/ai/knowledge/document/form/index.vue'),
  1095. name: 'AiKnowledgeDocumentUpdate',
  1096. meta: {
  1097. title: '修改文档',
  1098. icon: 'ep:edit',
  1099. noCache: true,
  1100. hidden: true,
  1101. activeMenu: '/ai/knowledge'
  1102. }
  1103. },
  1104. {
  1105. path: 'knowledge/retrieval',
  1106. component: () => import('@/views/ai/knowledge/knowledge/retrieval/index.vue'),
  1107. name: 'AiKnowledgeRetrieval',
  1108. meta: {
  1109. title: '文档召回测试',
  1110. icon: 'ep:search',
  1111. noCache: true,
  1112. hidden: true,
  1113. activeMenu: '/ai/knowledge'
  1114. }
  1115. },
  1116. {
  1117. path: 'knowledge/segment',
  1118. component: () => import('@/views/ai/knowledge/segment/index.vue'),
  1119. name: 'AiKnowledgeSegment',
  1120. meta: {
  1121. title: '知识库分段',
  1122. icon: 'ep:tickets',
  1123. noCache: true,
  1124. hidden: true,
  1125. activeMenu: '/ai/knowledge'
  1126. }
  1127. },
  1128. {
  1129. path: 'console/workflow/create',
  1130. component: () => import('@/views/ai/workflow/form/index.vue'),
  1131. name: 'AiWorkflowCreate',
  1132. meta: {
  1133. noCache: true,
  1134. hidden: true,
  1135. canTo: true,
  1136. title: '设计 AI 工作流',
  1137. activeMenu: '/ai/console/workflow'
  1138. }
  1139. },
  1140. {
  1141. path: 'console/workflow/:type/:id',
  1142. component: () => import('@/views/ai/workflow/form/index.vue'),
  1143. name: 'AiWorkflowUpdate',
  1144. meta: {
  1145. noCache: true,
  1146. hidden: true,
  1147. canTo: true,
  1148. title: '设计 AI 工作流',
  1149. activeMenu: '/ai/console/workflow'
  1150. }
  1151. }
  1152. ]
  1153. },
  1154. {
  1155. path: '/:pathMatch(.*)*',
  1156. component: () => import('@/views/Error/404.vue'),
  1157. name: '',
  1158. meta: {
  1159. title: '404',
  1160. hidden: true,
  1161. breadcrumb: false
  1162. }
  1163. },
  1164. {
  1165. path: '/iot',
  1166. component: Layout,
  1167. name: 'IOT',
  1168. meta: {
  1169. hidden: true
  1170. },
  1171. children: [
  1172. {
  1173. path: 'product/product/detail/:id',
  1174. name: 'IoTProductDetail',
  1175. meta: {
  1176. title: '产品详情',
  1177. noCache: true,
  1178. hidden: true,
  1179. activeMenu: '/iot/device/product'
  1180. },
  1181. component: () => import('@/views/iot/product/product/detail/index.vue')
  1182. },
  1183. {
  1184. path: 'device/detail/:id',
  1185. name: 'IoTDeviceDetail',
  1186. meta: {
  1187. title: '设备详情',
  1188. noCache: true,
  1189. hidden: true,
  1190. activeMenu: '/iot/device/device'
  1191. },
  1192. component: () => import('@/views/iot/device/device/detail/index.vue')
  1193. },
  1194. {
  1195. path: 'plugin/detail/:id',
  1196. name: 'IoTPluginDetail',
  1197. meta: {
  1198. title: '插件详情',
  1199. noCache: true,
  1200. hidden: true,
  1201. activeMenu: '/iot/plugin'
  1202. },
  1203. component: () => import('@/views/iot/plugin/detail/index.vue')
  1204. }
  1205. ]
  1206. },
  1207. ]
  1208. export default remainingRouter