index.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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. // 系统配置管理
  7. const addCapacity = () => import( '../components/addCapacity.vue')
  8. const addCarDriver = () => import( '../components/addCarDriver.vue')
  9. const addCarrier = () => import( '../components/addCarrier.vue')
  10. const addConsignee = () => import( '../components/addConsignee.vue')
  11. const addGatepost = () => import( '../components/addGatepost.vue')
  12. const addMaterial = () => import( '../components/addMaterial.vue')
  13. const addOilPrice = () => import( '../components/addOilPrice.vue')
  14. const addPersonnel = () => import( '../components/addPersonnel.vue')
  15. const addPier = () => import( '../components/addPier.vue')
  16. const addPort = () => import( '../components/addPort.vue')
  17. const addPortStorageYard = () => import( '../components/addPortStorageYard.vue')
  18. const addRawMaterialManufacturer = () => import( '../components/addRawMaterialManufacturer.vue')
  19. const addRawWarehouse = () => import( '../components/addRawWarehouse.vue')
  20. const addRmsShipper = () => import( '../components/addRmsShipper.vue')
  21. const addSupplier = () => import( '../components/addSupplier.vue')
  22. const addTruckCalculate = () => import( '../components/addTruckCalculate.vue')
  23. const capacity = () => import( '../components/capacity.vue')
  24. const carDriver = () => import( '../components/carDriver.vue')
  25. const carrier = () => import( '../components/carrier.vue')
  26. const addOtherCapacity = () => import( '../components/addOtherCapacity.vue')
  27. const editCapacity = () => import( '../components/editCapacity.vue')
  28. const editCarDriver = () => import( '../components/editCarDriver.vue')
  29. const editCarrier = () => import( '../components/editCarrier.vue')
  30. const editConsignee = () => import( '../components/editConsignee.vue')
  31. const editGatepost = () => import( '../components/editGatepost.vue')
  32. const editMaterial = () => import( '../components/editMaterial.vue')
  33. const editOilPrice = () => import( '../components/editOilPrice.vue')
  34. const editPersonnel = () => import( '../components/editPersonnel.vue')
  35. const editPier = () => import( '../components/editPier.vue')
  36. const editPortStorageYard = () => import( '../components/editPortStorageYard.vue')
  37. const editRawMaterialManufacturer = () => import( '../components/editRawMaterialManufacturer.vue')
  38. const editRawWarehouse = () => import( '../components/editRawWarehouse.vue')
  39. const editRmsShipper = () => import( '../components/editRmsShipper.vue')
  40. const editSupplier = () => import( '../components/editSupplier.vue')
  41. const editTruckCalculate = () => import( '../components/editTruckCalculate.vue')
  42. const gatepost = () => import( '../components/gatepost.vue')
  43. const material = () => import( '../components/material.vue')
  44. const oilPrice = () => import( '../components/oilPrice.vue')
  45. const personnel = () => import( '../components/personnel.vue')
  46. const pier = () => import( '../components/pier.vue')
  47. const port = () => import( '../components/port.vue')
  48. const portStorageYard = () => import( '../components/portStorageYard.vue')
  49. const rawMaterialManufacturer = () => import( '../components/rawMaterialManufacturer.vue')
  50. const rawWarehouse = () => import( '../components/rawWarehouse.vue')
  51. const rmsShipper = () => import( '../components/rmsShipper.vue')
  52. const supplier = () => import( '../components/supplier.vue')
  53. const transitRoute = () => import( '../components/transitRoute.vue')
  54. const showCarrier = () => import( '../components/showCarrier.vue')
  55. const showCapacity = () => import( '../components/showCapacity.vue')
  56. const transitRouteAdd = () => import( '../components/transitRouteAdd.vue')
  57. const truckCalculate = () => import( '../components/truckCalculate.vue')
  58. const consignee = () => import( '../components/consignee.vue')
  59. const inwardContractMaterial = () => import( '../components/inwardContractMaterial.vue')
  60. const addInwardContractMaterial = () => import( '../components/addInwardContractMaterial.vue')
  61. const editInwardContractMaterial = () => import( '../components/editInwardContractMaterial.vue')
  62. const editInwardMaterial = () => import( '../components/editInwardMaterial.vue')
  63. const cargoDep = () => import( '../components/cargoDep.vue')
  64. const addCargoDep = () => import( '../components/addCargoDep.vue')
  65. const updateCargoDep = () => import( '../components/updateCargoDep.vue')
  66. const contractPrice = () => import( '../components/contractPrice.vue')
  67. const addContractPrice = () => import( '../components/addContractPrice.vue')
  68. const editContractPrice = () => import( '../components/editContractPrice.vue')
  69. Vue.use(Router)
  70. const constantRouterMap = [
  71. {
  72. path: '/',
  73. name: 'main',
  74. meta: {title: '首页', code: 'xtpzgl'},
  75. component: main,
  76. redirect: {name: 'addCapacity'},
  77. children: [
  78. {path: 'addCapacity', name: 'addCapacity', meta: {code: 'xtpzgl-jggl'}, component: addCapacity},
  79. {path: 'addCarDriver', name: 'addCarDriver', meta: {code: 'xtpzgl-yhgl'}, component: addCarDriver},
  80. {path: 'addCarrier', name: 'addCarrier', meta: {code: 'xtpzgl-yhgl'}, component: addCarrier},
  81. {path: 'addConsignee',name: 'addConsignee',meta: {code:'xtpzgl-yhgl'},component: addConsignee},
  82. {path: 'addGatepost', name: 'addGatepost', meta: {code: 'xtpzgl-yhgl'}, component: addGatepost},
  83. {path: 'addMaterial', name: 'addMaterial', meta: {code: 'xtpzgl-yhgl'}, component: addMaterial},
  84. {path: 'addOilPrice', name: 'addOilPrice', meta: {code: 'xtpzgl-yhgl'}, component: addOilPrice},
  85. {path: 'addPersonnel', name: 'addPersonnel', meta: {code: 'xtpzgl-yhgl'}, component: addPersonnel},
  86. {path: 'addPier', name: 'addPier', meta: {code: 'xtpzgl-yhgl'}, component: addPier},
  87. {path: 'addPort', name: 'addPort', meta: {code: 'xtpzgl-yhgl'}, component: addPort},
  88. {path: 'addPortStorageYard', name: 'addPortStorageYard', meta: {code: 'xtpzgl-yhgl'}, component: addPortStorageYard},
  89. {path: 'addRawMaterialManufacturer', name: 'addRawMaterialManufacturer', meta: {code: 'xtpzgl-yhgl'}, component: addRawMaterialManufacturer},
  90. {path: 'addRawWarehouse', name: 'addRawWarehouse', meta: {code: 'xtpzgl-yhgl'}, component: addRawWarehouse},
  91. {path: 'addRmsShipper', name: 'addRmsShipper', meta: {code: 'xtpzgl-yhgl'}, component: addRmsShipper},
  92. {path: 'addSupplier', name: 'addSupplier', meta: {code: 'xtpzgl-yhgl'}, component: addSupplier},
  93. {path: 'addTruckCalculate', name: 'addTruckCalculate', meta: {code: 'xtpzgl-yhgl'}, component: addTruckCalculate},
  94. {path: 'addOtherCapacity', name: 'addOtherCapacity', meta: {code: 'xtpzgl-yhgl'}, component: addOtherCapacity},
  95. {path: 'capacity', name: 'capacity', meta: {code: 'xtpzgl-yhgl'}, component: capacity},
  96. {path: 'carDriver', name: 'carDriver', meta: {code: 'xtpzgl-yhgl'}, component: carDriver},
  97. {path: 'carrier', name: 'carrier', meta: {code: 'xtpzgl-yhgl'}, component: carrier},
  98. {path: 'editCapacity/:capacityCarrierId', name: 'editCapacity', meta: {code: 'xtpzgl-yhgl'}, component: editCapacity},
  99. {path: 'editCarDriver/:driverId', name: 'editCarDriver', meta: {code: 'xtpzgl-yhgl'}, component: editCarDriver},
  100. {path: 'editCarrier/:carrierId', name: 'editCarrier', meta: {code: 'xtpzgl-yhgl'}, component: editCarrier},
  101. {path: 'showCarrier/:carrierId', name: 'showCarrier', meta: {code: 'xtpzgl-yhgl'}, component: showCarrier},
  102. {path: 'showCapacity/:capacityId', name: 'showCapacity', meta: {code: 'xtpzgl-yhgl'}, component: showCapacity},
  103. {path: 'editConsignee/:consigneeId',name: 'editConsignee',meta:{code: 'xtpzgl-yhgl'},component: editConsignee},
  104. {path: 'editGatepost/:gatepostId', name: 'editGatepost', meta: {code: 'xtpzgl-yhgl'}, component: editGatepost},
  105. {path: 'editMaterial/:materialId', name: 'editMaterial', meta: {code: 'xtpzgl-yhgl'}, component: editMaterial},
  106. {path: 'editOilPrice/:priceId', name: 'editOilPrice', meta: {code: 'xtpzgl-yhgl'}, component: editOilPrice},
  107. {path: 'editPersonnel/:personnelId', name: 'editPersonnel', meta: {code: 'xtpzgl-yhgl'}, component: editPersonnel},
  108. {path: 'editPier', name: 'editPier', meta: {code: 'xtpzgl-yhgl'}, component: editPier},
  109. {path: 'editPortStorageYard', name: 'editPortStorageYard', meta: {code: 'xtpzgl-yhgl'}, component: editPortStorageYard},
  110. {path: 'editRawMaterialManufacturer', name: 'editRawMaterialManufacturer', meta: {code: 'xtpzgl-yhgl'}, component: editRawMaterialManufacturer},
  111. {path: 'editRawWarehouse/:warehouseId', name: 'editRawWarehouse', meta: {code: 'xtpzgl-yhgl'}, component: editRawWarehouse},
  112. {path: 'editRmsShipper/:shipperId', name: 'editRmsShipper', meta: {code: 'xtpzgl-yhgl'}, component: editRmsShipper},
  113. {path: 'editSupplier/:supplierId', name: 'editSupplier', meta: {code: 'xtpzgl-yhgl'}, component: editSupplier},
  114. {path: 'editTruckCalculate/:truckCalculateId', name: 'editTruckCalculate', meta: {code: 'xtpzgl-yhgl'}, component: editTruckCalculate},
  115. {path: 'gatepost', name: 'gatepost', meta: {code: 'xtpzgl-yhgl'}, component: gatepost},
  116. {path: 'material', name: 'material', meta: {code: 'xtpzgl-yhgl'}, component: material},
  117. {path: 'oilPrice', name: 'oilPrice', meta: {code: 'xtpzgl-yhgl'}, component: oilPrice},
  118. {path: 'personnel', name: 'personnel', meta: {code: 'xtpzgl-yhgl'}, component: personnel},
  119. {path: 'pier', name: 'pier', meta: {code: 'xtpzgl-yhgl'}, component: pier},
  120. {path: 'port', name: 'port', meta: {code: 'xtpzgl-yhgl'}, component: port},
  121. {path: 'portStorageYard', name: 'portStorageYard', meta: {code: 'xtpzgl-yhgl'}, component: portStorageYard},
  122. {path: 'rawMaterialManufacturer', name: 'rawMaterialManufacturer', meta: {code: 'xtpzgl-yhgl'}, component: rawMaterialManufacturer},
  123. {path: 'rawWarehouse', name: 'rawWarehouse', meta: {code: 'xtpzgl-yhgl'}, component: rawWarehouse},
  124. {path: 'rmsShipper', name: 'rmsShipper', meta: {code: 'xtpzgl-yhgl'}, component: rmsShipper},
  125. {path: 'supplier', name: 'supplier', meta: {code: 'xtpzgl-yhgl'}, component: supplier},
  126. {path: 'transitRoute', name: 'transitRoute', meta: {code: 'xtpzgl-yhgl'}, component: transitRoute},
  127. {path: 'transitRouteAdd/:addup', name: 'transitRouteAdd', meta: {code: 'xtpzgl-yhgl'}, component: transitRouteAdd},
  128. {path: 'truckCalculate', name: 'truckCalculate', meta: {code: 'xtpzgl-yhgl'}, component: truckCalculate},
  129. {path: 'consignee', name: 'consignee', meta: {code: 'xtpzgl-yhgl'}, component: consignee},
  130. {path: 'inwardContractMaterial', name: 'inwardContractMaterial', meta: {code: 'xtpzgl-yhgl'}, component: inwardContractMaterial},
  131. {path: 'addInwardContractMaterial', name: 'addInwardContractMaterial', meta: {code: 'xtpzgl-yhgl'}, component: addInwardContractMaterial},
  132. {path: 'editInwardContractMaterial', name: 'editInwardContractMaterial', meta: {code: 'xtpzgl-yhgl'}, component: editInwardContractMaterial},
  133. {path: 'editInwardMaterial/:materialTypeId', name: 'editInwardMaterial', meta: {code: 'xtpzgl-yhgl'}, component: editInwardMaterial},
  134. {path: 'cargoDep', name: 'cargoDep', meta: {code: 'xtpzgl-yhgl'}, component: cargoDep},
  135. {path: 'addCargoDep', name: 'addCargoDep', meta: {code: 'xtpzgl-yhgl'}, component: addCargoDep},
  136. {path: 'updateCargoDep/:cargoCarrierId', name: 'updateCargoDep', meta: {code: 'xtpzgl-yhgl'}, component: updateCargoDep},
  137. {path: 'contractPrice', name: 'contractPrice', meta: {code: 'xtpzgl-yhgl'}, component: contractPrice},
  138. {path: 'addContractPrice', name: 'addContractPrice', meta: {code: 'xtpzgl-yhgl'}, component: addContractPrice},
  139. {path: 'editContractPrice/:resultId', name: 'editContractPrice', meta: {code: 'xtpzgl-yhgl'}, component: editContractPrice},
  140. ]
  141. }
  142. ];
  143. const router = new Router({
  144. routes: constantRouterMap
  145. })
  146. // before
  147. routerBefore(router, constantRouterMap);
  148. export default router;
  149. // constantRouterMap
  150. export const routes = constantRouterMap;