router.config.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. // eslint-disable-next-line
  2. import {
  3. UserLayout,
  4. BasicLayout,
  5. BlankLayout,
  6. BigScreen,
  7. PageView
  8. } from '@/layouts'
  9. // 菜单模块
  10. import home from './home' // 首页
  11. import salesManageService from './salesManageService' // 销售管理
  12. import salesReturnManage from './salesReturnManage' // 销售退货
  13. import purchasingManagement from './purchasingManagement' // 采购管理
  14. import financialManagement from './financialManagement' // 财务管理
  15. import expenseManagement from './expenseManagement' // 费用报销
  16. import inventoryManagement from './inventoryManagement' // 库存管理
  17. import allocationManagement from './allocationManagement' // 调拨管理
  18. import salesReport from './report/salesReport' // 销售报表
  19. import purchasingReport from './report/purchasingReport' // 采购报表
  20. import transferReport from './report/transferReport' // 调拨报表
  21. import spreadReport from './report/spreadReport' // 差价报表
  22. import otherReport from './report/otherReport' // 其他报表
  23. import dealerManagement from './dealerManagement' // 经销商管理
  24. import productManagement from './productManagement' // 产品管理
  25. import supplierManagement from './supplierManagement' // 供应商管理
  26. // import promotionRulesManagement from './promotionRulesManagement' // 促销管理
  27. import easyPassManagement from './easyPassManagement' // 易码通管理
  28. import bigStatistics from './bigStatistics' // 大屏统计
  29. import sysSetting from './sysSetting' // 系统设置
  30. export const asyncRouterMap = [
  31. {
  32. path: '/',
  33. name: 'index',
  34. component: BasicLayout,
  35. meta: {
  36. title: '首页'
  37. },
  38. redirect: '/home',
  39. children: [
  40. // 首页
  41. home,
  42. // 销售管理
  43. salesManageService,
  44. // 销售退货
  45. salesReturnManage,
  46. // 采购管理
  47. purchasingManagement,
  48. // 财务管理
  49. financialManagement,
  50. // 费用报销
  51. expenseManagement,
  52. // 库存管理
  53. inventoryManagement,
  54. // 调拨管理
  55. allocationManagement,
  56. // 报表
  57. salesReport,
  58. purchasingReport,
  59. spreadReport,
  60. transferReport,
  61. otherReport,
  62. // 产品管理
  63. productManagement,
  64. // 经销商管理
  65. dealerManagement,
  66. // 供应商管理
  67. supplierManagement,
  68. // 易码通
  69. easyPassManagement,
  70. // 大屏数据
  71. bigStatistics,
  72. // 系统设置
  73. sysSetting
  74. ]
  75. },
  76. {
  77. path: '*',
  78. redirect: '/404',
  79. hidden: true
  80. }
  81. ]
  82. /**
  83. * 基础路由
  84. * @type { *[] }
  85. */
  86. export const constantRouterMap = [
  87. {
  88. path: '/user',
  89. component: UserLayout,
  90. redirect: '/user/login',
  91. hidden: true,
  92. children: [
  93. {
  94. path: 'login',
  95. name: 'login',
  96. component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
  97. },
  98. {
  99. path: 'register',
  100. name: 'register',
  101. component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
  102. },
  103. {
  104. path: 'register-result',
  105. name: 'registerResult',
  106. component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
  107. },
  108. {
  109. path: 'recover',
  110. name: 'recover',
  111. component: undefined
  112. }
  113. ]
  114. },
  115. {
  116. path: '/bigScreen',
  117. component: BigScreen,
  118. redirect: '/bigScreen/realTimeSalesReport',
  119. hidden: true,
  120. children: [
  121. {
  122. path: 'realTimeSalesReport',
  123. name: 'realTimeSalesReport',
  124. component: () => import(/* webpackChunkName: "bigScreen" */ '@/views/bigScreen/realTimeSalesReport/index'),
  125. meta: {
  126. title: '实时销售看板'
  127. }
  128. },
  129. {
  130. path: 'fPanalysisReport',
  131. name: 'fPanalysisReport',
  132. component: () => import(/* webpackChunkName: "bigScreen" */ '@/views/bigScreen/fPanalysisReport/index'),
  133. meta: {
  134. title: '加盟商/产品分析'
  135. }
  136. }
  137. ]
  138. },
  139. {
  140. path: '/404',
  141. component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  142. }
  143. ]