remaining.ts 35 KB

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