router.config.js 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. import {
  2. UserLayout,
  3. BasicLayout,
  4. RouteView,
  5. PageView
  6. } from '@/layouts'
  7. export const asyncRouterMap = [{
  8. path: '/',
  9. name: 'index',
  10. component: BasicLayout,
  11. meta: {
  12. title: '首页'
  13. },
  14. redirect: '/home',
  15. children: [{
  16. path: '/home',
  17. name: 'home',
  18. redirect: '/home',
  19. component: PageView,
  20. meta: {
  21. title: '首页',
  22. icon: 'home'
  23. },
  24. hideChildrenInMenu: true,
  25. children: [{
  26. path: '/home',
  27. name: 'home',
  28. component: () => import(/* webpackChunkName: "home" */ '@/views/Home'),
  29. meta: {
  30. title: '首页',
  31. icon: 'home',
  32. hidden: true
  33. }
  34. },
  35. {
  36. path: '/changePwd',
  37. name: 'changePwd',
  38. component: () => import(/* webpackChunkName: "home" */ '@/views/user/ChangePwd'),
  39. meta: {
  40. title: '修改密码',
  41. icon: 'home',
  42. hidden: true
  43. }
  44. }
  45. ]
  46. },
  47. {
  48. path: '/SetmealSales',
  49. redirect: '/SetmealSales/VerificationRecords',
  50. name: 'SetmealSales',
  51. component: PageView,
  52. meta: {
  53. title: '套餐销售',
  54. icon: 'snippets',
  55. permission: 'M_bundel_saller'
  56. },
  57. children: [
  58. {
  59. path: '/SetmealSales/BuySetmeal',
  60. name: 'BuySetmeal',
  61. component: () => import('@/views/SetmealSales/BuySetmeal.vue'),
  62. meta: {
  63. title: '购买套餐',
  64. icon: 'file-text',
  65. permission: 'M_buy_bundel'
  66. }
  67. },
  68. {
  69. path: '/SetmealSales/PurchasedSetmeal',
  70. name: 'PurchasedSetmeal',
  71. component: () => import('@/views/SetmealSales/PurchasedSetmeal.vue'),
  72. meta: {
  73. title: '已购套餐',
  74. icon: 'file-text',
  75. permission: 'M_bundel_buyRecord'
  76. }
  77. },
  78. {
  79. path: '/SetmealSales/SetmealAttr',
  80. name: 'SetmealAttr',
  81. component: () => import('@/views/SetmealSales/SetmealAttr.vue'),
  82. meta: {
  83. title: '套餐属性',
  84. icon: 'file-text'
  85. // permission: 'M_bundel_buyRecord'
  86. }
  87. }
  88. ]
  89. },
  90. // 服务
  91. {
  92. path: '/Service',
  93. redirect: '/Service/PurchasedService',
  94. component: PageView,
  95. meta: {
  96. title: '服务',
  97. icon: 'profile',
  98. permission: 'M_Service'
  99. },
  100. children: [
  101. {
  102. path: '/Service/PurchasedService',
  103. redirect: '/Service/PurchasedService/list',
  104. name: 'PurchasedService',
  105. component: RouteView,
  106. meta: {
  107. title: '已购服务',
  108. icon: 'profile',
  109. permission: 'M_Service_list'
  110. },
  111. hideChildrenInMenu: true,
  112. children: [
  113. {
  114. path: '/Service/PurchasedService/list',
  115. name: 'PurchasedServiceList',
  116. component: () => import(/* webpackChunkName: "order" */ '@/views/Service/PurchasedServiceList.vue'),
  117. meta: {
  118. title: '服务列表',
  119. icon: 'shopping',
  120. hidden: true
  121. }
  122. },
  123. {
  124. path: '/Service/PurchasedService/detail/:id',
  125. name: 'PurchasedServiceDetail',
  126. component: () => import(/* webpackChunkName: "order" */ '@/views/Service/PurchasedServiceDetail.vue'),
  127. meta: {
  128. title: '服务详情',
  129. icon: 'profile',
  130. hidden: true
  131. }
  132. }
  133. ]
  134. }
  135. ]
  136. },
  137. {
  138. path: '/FinancialManagement',
  139. name: 'FinancialManagement',
  140. component: PageView,
  141. meta: { title: '财务管理', icon: 'account-book', permission: 'M_cwgn' },
  142. children: [
  143. {
  144. path: '/SetmealSales/VerificationRecords',
  145. name: 'VerificationRecords',
  146. component: () => import('@/views/SetmealSales/VerificationRecords.vue'),
  147. meta: {
  148. title: '核销记录',
  149. icon: 'file-text',
  150. permission: 'M_hxjl_list'
  151. }
  152. },
  153. {
  154. path: 'PaySettlementRecords/list',
  155. name: 'PaySettlementRecords',
  156. component: () => import(/* webpackChunkName: "writeOff" */ '@/views/FinancialManagement/PaySettlementRecords.vue'),
  157. meta: { title: '应付结算记录-套餐', icon: 'form', permission: 'M_yfjs_js_list' }
  158. }
  159. ]
  160. },
  161. {
  162. path: '/auth',
  163. redirect: '/auth/userList',
  164. component: PageView,
  165. meta: {
  166. title: '运营平台权限管理',
  167. icon: 'apartment',
  168. permission: 'M_power_auth'
  169. },
  170. children: [
  171. {
  172. path: '/auth/userList',
  173. name: 'powerUserList',
  174. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/user/userList.vue'),
  175. meta: {
  176. title: '用户管理',
  177. icon: 'user',
  178. permission: 'M_power_user_list'
  179. }
  180. },
  181. {
  182. path: '/auth/roleList',
  183. name: 'powerRoleList',
  184. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/role/roleList.vue'),
  185. meta: {
  186. title: '角色管理',
  187. icon: 'solution',
  188. permission: 'M_power_role_list'
  189. }
  190. }
  191. ]
  192. }
  193. ]
  194. },
  195. {
  196. path: '*',
  197. redirect: '/404',
  198. hidden: true
  199. }
  200. ]
  201. /**
  202. * 基础路由
  203. * @type { *[] }
  204. */
  205. export const constantRouterMap = [{
  206. path: '/user',
  207. component: UserLayout,
  208. redirect: '/user/login',
  209. hidden: true,
  210. children: [{
  211. path: 'login',
  212. name: 'login',
  213. component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
  214. },
  215. {
  216. path: 'register',
  217. name: 'register',
  218. component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
  219. },
  220. {
  221. path: 'register-result',
  222. name: 'registerResult',
  223. component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
  224. },
  225. {
  226. path: 'recover',
  227. name: 'recover',
  228. component: undefined
  229. }
  230. ]
  231. },
  232. {
  233. path: '/404',
  234. component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  235. }
  236. ]