index.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. import routerBefore from '@/config/routerBefore.js'
  4. // 主要
  5. import main from '@/components/main.vue'
  6. const oYeWarehouse = () => import('@/views/OYE/components/oYeWarehouse.vue')
  7. const oYeWaitInbound = () => import('@/views/OYE/components/oYeWaitInbound.vue')
  8. const oYeInbound = () => import('@/views/OYE/components/oYeInbound.vue')
  9. const oYeOutbound = () => import('@/views/OYE/components/oYeOutbound.vue')
  10. const oYeRealTimeInventory = () =>
  11. import('@/views/OYE/components/oYeRealTimeInventory.vue')
  12. const oYeTransPlan = () => import('@/views/OYE/components/oYeTransPlan.vue')
  13. const oYeTransResult = () => import('@/views/OYE/components/oYeTransResult.vue')
  14. const queueStart = () => import('@/views/OYE/components/queueStart.vue')
  15. const steelTransportReport = () =>
  16. import('@/views/OYE/components/steelTransportReport.vue')
  17. const yawnReport = () => import('@/views/OYE/components/yawnReport.vue')
  18. Vue.use(Router)
  19. const constantRouterMap = [
  20. {
  21. path: '/',
  22. name: 'main',
  23. meta: { title: '首页', code: 'xtpzgl' },
  24. component: main,
  25. redirect: { name: 'oYeWarehouse' },
  26. children: [
  27. {
  28. path: 'oYeWarehouse',
  29. name: 'oYeWarehouse',
  30. meta: { code: 'xtpzgl-jggl' },
  31. component: oYeWarehouse
  32. },
  33. {
  34. path: 'oYeWaitInbound',
  35. name: 'oYeWaitInbound',
  36. meta: { code: 'xtpzgl-jggl' },
  37. component: oYeWaitInbound
  38. },
  39. {
  40. path: 'oYeInbound',
  41. name: 'oYeInbound',
  42. meta: { code: 'xtpzgl-jggl' },
  43. component: oYeInbound
  44. },
  45. {
  46. path: 'oYeOutbound',
  47. name: 'oYeOutbound',
  48. meta: { code: 'xtpzgl-jggl' },
  49. component: oYeOutbound
  50. },
  51. {
  52. path: 'oYeRealTimeInventory',
  53. name: 'oYeRealTimeInventory',
  54. meta: { code: 'xtpzgl-jggl' },
  55. component: oYeRealTimeInventory
  56. },
  57. {
  58. path: 'oYeTransPlan',
  59. name: 'oYeTransPlan',
  60. meta: { code: 'xtpzgl-jggl' },
  61. component: oYeTransPlan
  62. },
  63. {
  64. path: 'oYeTransResult',
  65. name: 'oYeTransResult',
  66. meta: { code: 'xtpzgl-jggl' },
  67. component: oYeTransResult
  68. },
  69. {
  70. path: 'queueStart',
  71. name: 'queueStart',
  72. meta: { code: 'xtpzgl-jggl' },
  73. component: queueStart
  74. },
  75. {
  76. path: 'yawnReport',
  77. name: 'yawnReport',
  78. meta: { code: 'xtpzgl-jggl' },
  79. component: yawnReport
  80. },
  81. {
  82. path: 'steelTransportReport',
  83. name: 'steelTransportReport',
  84. meta: { code: 'xtpzgl-jggl' },
  85. component: steelTransportReport
  86. }
  87. ]
  88. }
  89. ]
  90. const router = new Router({
  91. routes: constantRouterMap
  92. })
  93. // before
  94. routerBefore(router, constantRouterMap)
  95. export default router
  96. // constantRouterMap
  97. export const routes = constantRouterMap