remaining.ts 34 KB

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