dynamicRoutes.ts 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. import layout from "@/views/layout/index.vue";
  2. export const dynamicRoutes = [{
  3. path: '/layout',
  4. name: 'layout',
  5. component: layout,
  6. redirect: '/home',
  7. children: [{
  8. path: '/home',
  9. name: 'home',
  10. icon: "icon-shouye_zhuyehui",
  11. component: () => import('@/views/home/index.vue'),
  12. meta: {
  13. roles: false,
  14. title: '工作台',
  15. },
  16. }, {
  17. path: '/essentialinfo',
  18. name: 'essentialinfo',
  19. icon: "icon-zhuye1",
  20. component: () => import('@/views/essentialinfo/index.vue'),
  21. meta: {
  22. roles: false,
  23. title: '基本信息',
  24. },
  25. }, {
  26. path: '/usermanagement',
  27. name: 'usermanagement',
  28. icon: "icon-icon-",
  29. component: () => import('@/views/usermanagement/index.vue'),
  30. redirect: '/usermanagement/user',
  31. meta: {
  32. roles: false,
  33. title: '用户管理',
  34. },
  35. children: [{
  36. path: '/usermanagement/user',
  37. name: 'user',
  38. icon: "icon-icon-",
  39. component: () => import('@/views/usermanagement/user/index.vue'),
  40. meta: {
  41. roles: false,
  42. title: '用户管理',
  43. },
  44. }, {
  45. path: '/usermanagement/company',
  46. name: 'company',
  47. icon: "icon-zhuye1",
  48. component: () => import('@/views/usermanagement/company/index.vue'),
  49. meta: {
  50. roles: false,
  51. title: '公司管理',
  52. },
  53. }]
  54. }, {
  55. path: '/stockcontrol',
  56. name: 'stockcontrol',
  57. icon: "icon-_kucun",
  58. component: () => import('@/views/stockcontrol/index.vue'),
  59. redirect: '/stockcontrol/storagePut',
  60. meta: {
  61. roles: false,
  62. title: '库存管理',
  63. },
  64. children: [{
  65. path: '/stockcontrol/storagePut',
  66. name: 'storagePut',
  67. icon: "icon-_kucun",
  68. component: () => import('@/views/stockcontrol/storagePut/index.vue'),
  69. meta: {
  70. roles: false,
  71. title: '入库管理',
  72. },
  73. },{
  74. path: '/stockcontrol/storageFrom',
  75. name: 'storageFrom',
  76. icon: "icon-ruku",
  77. component: () => import('@/views/stockcontrol/storageFrom/index.vue'),
  78. meta: {
  79. roles: false,
  80. title: '出库管理',
  81. },
  82. }, {
  83. path: '/stockcontrol/storageInquire',
  84. name: 'storageInquire',
  85. icon: "icon-fenxixiangmuku",
  86. component: () => import('@/views/stockcontrol/storageInquire/index.vue'),
  87. meta: {
  88. roles: false,
  89. title: '库存查询',
  90. },
  91. }, {
  92. path: '/stockcontrol/transmitReceive',
  93. name: 'transmitReceive',
  94. icon: "icon-ruku",
  95. component: () => import('@/views/stockcontrol/transmitReceive/index.vue'),
  96. meta: {
  97. roles: false,
  98. title: '收发记录',
  99. },
  100. },
  101. ]
  102. }, {
  103. path: '/salesmanagement',
  104. name: 'salesmanagement',
  105. icon: "icon-chukuliucheng",
  106. component: () => import('@/views/salesmanagement/index.vue'),
  107. redirect: '/salesmanagement/sellManage',
  108. meta: {
  109. roles: false,
  110. title: '销售管理',
  111. },
  112. children: [{
  113. path: '/salesmanagement/sellManage',
  114. name: 'sellManage',
  115. icon: "icon-chukuliucheng",
  116. component: () => import('@/views/salesmanagement/sellManage/index.vue'),
  117. meta: {
  118. roles: false,
  119. title: '销售管理',
  120. },
  121. }, {
  122. path: '/salesmanagement/storageOrderGoods',
  123. name: 'storageOrderGoods',
  124. icon: "icon-dingdan",
  125. component: () => import('@/views/salesmanagement/storageOrderGoods/index.vue'),
  126. meta: {
  127. roles: false,
  128. title: '销售订单',
  129. },
  130. }]
  131. }]
  132. }]
  133. export const errorRouter = [
  134. {
  135. path: '*',
  136. name: '404',
  137. component: () => import('@/components/404.vue'),
  138. meta: {
  139. title: '404页面'
  140. }
  141. }
  142. ]
  143. /**
  144. * notFoundRouter(找不到路由)
  145. */
  146. export const notFoundRouter = {
  147. path: '/:pathMatch(.*)*',
  148. name: 'notFound',
  149. redirect: { name: '404' }
  150. }