staticRouter.ts 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. import { RouteRecordRaw } from 'vue-router'
  2. export const staticRouter: RouteRecordRaw[] = [
  3. {
  4. path: '/',
  5. redirect: '/index'
  6. },
  7. {
  8. path: '/index',
  9. name: 'Index',
  10. component: () => import('@/views/Index.vue'),
  11. // redirect: '/home',
  12. meta: {
  13. title: '起始页'
  14. },
  15. children: [
  16. {
  17. path: '/list',
  18. name: 'List',
  19. component: () => import('@/views/storehouse/List.vue'),
  20. meta: {
  21. title: '仓库列表'
  22. }
  23. },
  24. {
  25. path: '/classify',
  26. name: 'Classify',
  27. component: () => import('@/views/storehouse/Classify.vue'),
  28. meta: {
  29. title: '产品分类'
  30. }
  31. },
  32. {
  33. path: '/productionList',
  34. name: 'ProductionList',
  35. component: () => import('@/views/storehouse/ProductionList.vue'),
  36. meta: {
  37. title: '产品列表'
  38. }
  39. },
  40. {
  41. path: '/ioTNetworkCard',
  42. name: 'IoTNetworkCard',
  43. component: () => import('@/views/storehouse/IoTNetworkCard.vue'),
  44. meta: {
  45. title: '物联网卡'
  46. }
  47. },
  48. {
  49. path: '/saleMange',
  50. name: 'SaleMange',
  51. component: () => import('@/views/storehouse/sales/index.vue'),
  52. // redirect: '/contract',
  53. meta: {
  54. routerView: true,
  55. title: '销售管理'
  56. },
  57. children: [
  58. {
  59. path: '/contract',
  60. name: 'Contract',
  61. component: () => import('@/views/storehouse/sales/Contract.vue'),
  62. meta: {
  63. title: '合同管理'
  64. }
  65. },
  66. {
  67. path: '/contractDetail/:id/:type',
  68. name: 'ContractDetail',
  69. component: () => import('@/views/storehouse/sales/ContractDetail.vue'),
  70. meta: {
  71. title: '合同详情'
  72. }
  73. },
  74. {
  75. path: '/contractSale',
  76. name: 'ContractSale',
  77. component: () => import('@/views/storehouse/sales/ContractSale.vue'),
  78. meta: {
  79. title: '合同详情(销售)'
  80. }
  81. }
  82. ]
  83. },
  84. {
  85. path: '/inventoryMange',
  86. name: 'InventoryMange',
  87. component: () => import('@/views/storehouse/inventory/index.vue'),
  88. // redirect: '/contract',
  89. meta: {
  90. routerView: true,
  91. title: '库存管理'
  92. },
  93. children: [
  94. {
  95. path: '/device',
  96. name: 'Device',
  97. component: () => import('@/views/storehouse/inventory/Device.vue'),
  98. meta: {
  99. title: '设备列表'
  100. }
  101. },
  102. {
  103. path: '/inStorage',
  104. name: 'InStorage',
  105. component: () => import('@/views/storehouse/inventory/InStorage.vue'),
  106. meta: {
  107. title: '入库管理'
  108. }
  109. },
  110. {
  111. path: '/inStorageDetail/:id',
  112. name: 'InStorageDetail',
  113. component: () => import('@/views/storehouse/inventory/InStorageDetail.vue'),
  114. meta: {
  115. title: '入库详情'
  116. }
  117. },
  118. {
  119. path: '/outStock',
  120. name: 'OutStock',
  121. component: () => import('@/views/storehouse/outStock/OutStock.vue'),
  122. meta: {
  123. title: '出库管理'
  124. }
  125. },
  126. {
  127. path: '/receiveOutStock',
  128. name: 'ReceiveOutStock',
  129. component: () => import('@/views/storehouse/outStock/ReceiveOutStock.vue'),
  130. meta: {
  131. title: '领料出库'
  132. }
  133. },
  134. {
  135. path: '/saleOutStock',
  136. name: 'SaleOutStock',
  137. component: () => import('@/views/storehouse/outStock/SaleOutStock.vue'),
  138. meta: {
  139. title: '销售出库'
  140. }
  141. },
  142. {
  143. path: '/outStockDetail/:number',
  144. name: 'OutStockDetail',
  145. component: () => import('@/views/storehouse/outStock/OutStockDetail.vue'),
  146. meta: {
  147. title: '出库详情'
  148. }
  149. },
  150. {
  151. path: '/inventoryStatistics',
  152. name: 'InventoryStatistics',
  153. component: () => import('@/views/storehouse/InventoryStatistics.vue'),
  154. meta: {
  155. title: '库存统计'
  156. }
  157. }
  158. ]
  159. },
  160. // {
  161. // path: '/contract',
  162. // name: 'Contract',
  163. // component: () => import('@/views/storehouse/sales/Contract.vue'),
  164. // meta: {
  165. // title: '合同管理'
  166. // }
  167. // },
  168. // {
  169. // path: '/contract-detail/:id',
  170. // name: 'ContractDetail',
  171. // component: () => import('@/views/storehouse/sales/ContractDetail.vue'),
  172. // meta: {
  173. // title: '合同详情'
  174. // }
  175. // },
  176. {
  177. path: '/user',
  178. name: 'User',
  179. component: () => import('@/views/home/User.vue'),
  180. meta: {
  181. title: '个人中心'
  182. }
  183. }
  184. ]
  185. },
  186. {
  187. path: '/login',
  188. name: 'login',
  189. component: () => import('@/views/Login.vue'),
  190. meta: {
  191. title: '登录'
  192. }
  193. }
  194. ]
  195. export const errorRouter = [
  196. {
  197. path: '/404',
  198. name: '404',
  199. component: () => import('@/components/ErrorMessage/404.vue'),
  200. meta: {
  201. title: '404页面'
  202. }
  203. }
  204. ]
  205. /**
  206. * notFoundRouter(找不到路由)
  207. */
  208. export const notFoundRouter = {
  209. path: '/:pathMatch(.*)*',
  210. name: 'notFound',
  211. redirect: { name: '404' }
  212. }