router.config.js 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. // eslint-disable-next-line
  2. import { UserLayout, BasicLayout, BlankLayout } from '@/layouts'
  3. const RouteView = {
  4. name: 'RouteView',
  5. render: (h) => h('router-view')
  6. }
  7. // 带hidden true permission 数组一定要写他的相关连的url 否则无法和后端返回的url匹配上
  8. export const asyncRouterMap = [
  9. {
  10. path: '/',
  11. name: 'index',
  12. component: BasicLayout,
  13. meta: { title: 'menu.home' },
  14. redirect: '/markting/leads',
  15. children: [
  16. // marting
  17. {
  18. path: '/markting',
  19. component: RouteView,
  20. name: 'Markting',
  21. meta: { title: '销售管理', icon: 'user', keepAlive: true, permission: [ '/markting' ] },
  22. children: [
  23. {
  24. path: '/markting/active',
  25. name: 'Active',
  26. component: () => import('@/views/markting/active/list'),
  27. meta: { title: '市场活动', hideHeader: true, permission: [ '/markting/active' ] }
  28. },
  29. {
  30. path: '/markting/active/info',
  31. name: 'ActiveInfo',
  32. hidden: true,
  33. component: () => import('@/views/markting/active/info'),
  34. meta: { title: '活动详情', keepAlive: true, hideHeader: true, permission: [ '/markting/active' ] }
  35. },
  36. {
  37. path: '/markting/seas',
  38. name: 'Seas',
  39. component: () => import('@/views/markting/seas/list'),
  40. meta: { title: '公海池', hideHeader: true, permission: [ '/markting/seas' ] }
  41. },
  42. {
  43. path: '/markting/leads',
  44. name: 'Leads',
  45. component: () => import('@/views/markting/leads/list'),
  46. meta: { title: '线索管理', hideHeader: true, permission: [ '/markting/leads' ] }
  47. },
  48. {
  49. path: '/markting/leadsDetail',
  50. name: 'leadsDetail',
  51. hidden: true,
  52. component: () => import('@/views/markting/leads/leadsDetail'),
  53. meta: { title: '线索详情', hideHeader: true, permission: [ '/markting/leads' ] }
  54. },
  55. {
  56. path: '/markting/leadsRecord',
  57. name: 'leadsRecord',
  58. component: () => import('@/views/markting/leadsRecord/index'),
  59. meta: { title: '跟进记录', hideHeader: true, permission: [ '/markting/leadsRecord' ] }
  60. },
  61. {
  62. path: '/markting/BuyClass',
  63. name: 'BuyClass',
  64. hidden: true,
  65. component: () => import('@/views/markting/leads/buyClass'),
  66. meta: { title: '购课', hideHeader: false, permission: [ '/markting/BuyClass' ] }
  67. }
  68. ]
  69. },
  70. {
  71. path: '/student',
  72. component: RouteView,
  73. redirect: '/student/admin',
  74. name: 'student',
  75. meta: { title: '学员管理', icon: 'user', keepAlive: true, permission: [ '/student' ] },
  76. children: [
  77. {
  78. path: '/student/admin',
  79. name: 'studentAdmin',
  80. component: () => import('@/views/student/index'),
  81. meta: { title: '学员列表', hideHeader: true, permission: [ '/student/admin' ] }
  82. },
  83. {
  84. path: '/student/studentDetail',
  85. name: 'studentDetail',
  86. hidden: true,
  87. component: () => import('@/views/student/studentDetail'),
  88. meta: { title: '学员详情', hideHeader: true, permission: [ '/student/admin' ] }
  89. }
  90. ]
  91. },
  92. // 教务管理
  93. {
  94. path: '/eduAdmin',
  95. component: RouteView,
  96. redirect: '/eduAdmin/calss',
  97. name: 'eduAdmin',
  98. meta: { title: '教务管理', icon: 'user', keepAlive: true, permission: [ '/eduAdmin' ] },
  99. children: [
  100. {
  101. path: '/eduAdmin/calss',
  102. name: 'Calss',
  103. component: () => import('@/views/eduAdmin/class/index'),
  104. meta: { title: '课程管理', hideHeader: true, permission: [ '/eduAdmin/calss' ] }
  105. },
  106. {
  107. path: '/eduAdmin/grade',
  108. name: 'grade',
  109. component: () => import('@/views/eduAdmin/grade/index'),
  110. meta: { title: '班级管理', hideHeader: true, permission: [ '/eduAdmin/grade' ] }
  111. },
  112. {
  113. path: '/eduAdmin/gradeDetail',
  114. name: 'gradeDetail',
  115. hidden: true,
  116. component: () => import('@/views/eduAdmin/grade/gradeDetail'),
  117. meta: { title: '班级详情', hideHeader: true, permission: [ '/eduAdmin/grade' ] }
  118. },
  119. {
  120. path: '/eduAdmin/courseDetail',
  121. name: 'courseDetail',
  122. hidden: true,
  123. component: () => import('@/views/eduAdmin/grade/courseDetail'),
  124. meta: { title: '课程详情', hideHeader: true, permission: [ '/eduAdmin/grade' ] }
  125. }
  126. // {
  127. // path: '/eduAdmin/classSchedule',
  128. // name: 'classSchedule',
  129. // component: () => import('@/views/eduAdmin/classSchedule/index'),
  130. // meta: { title: '总课表', hideHeader: true, permission: [ 'datum' ] }
  131. // }
  132. ]
  133. },
  134. // 数据分析datum
  135. {
  136. path: '/datum',
  137. component: RouteView,
  138. redirect: '/datum/sell',
  139. name: 'basics',
  140. meta: { title: '数据统计', icon: 'user', keepAlive: true, permission: [ '/datum' ] },
  141. children: [
  142. {
  143. path: '/datum/sell',
  144. name: 'datumSell',
  145. component: () => import('@/views/datum/sell/index'),
  146. meta: { title: '销售统计', hideHeader: true, permission: [ '/datum/sell' ] }
  147. },
  148. // {
  149. // path: '/datum/removeCourse',
  150. // name: 'removeCourse',
  151. // component: () => import('@/views/datum/removeCourse/index'),
  152. // meta: { title: '消课统计', hideHeader: true, permission: [ 'datum' ] }
  153. // },
  154. {
  155. path: '/datum/student',
  156. name: 'datumStudent',
  157. component: () => import('@/views/datum/student/index'),
  158. meta: { title: '学员分析', hideHeader: true, permission: [ '/datum/student' ] }
  159. },
  160. {
  161. path: '/datum/finace',
  162. name: 'datumFinace',
  163. component: () => import('@/views/datum/fiance/index'),
  164. meta: { title: '财务分析', hideHeader: true, permission: [ '/datum/finace' ] }
  165. }
  166. ]
  167. },
  168. // 基础设置
  169. {
  170. path: '/basics',
  171. component: RouteView,
  172. redirect: '/basics/sell',
  173. name: 'basics',
  174. meta: { title: '基础配置', icon: 'user', keepAlive: true, permission: [ '/basics' ] },
  175. children: [
  176. {
  177. path: '/basics/sell',
  178. name: 'sell',
  179. component: () => import('@/views/basics/sell/index'),
  180. meta: { title: '销售配置', hideHeader: true, permission: [ '/basics/sell' ] }
  181. },
  182. {
  183. path: '/basics/tag',
  184. name: 'tag',
  185. component: () => import('@/views/basics/tag/index'),
  186. meta: { title: '标签配置', hideHeader: true, permission: [ '/basics/tag' ] }
  187. },
  188. {
  189. path: '/basics/class',
  190. name: 'class',
  191. component: () => import('@/views/basics/class/index'),
  192. meta: { title: '教室配置', hideHeader: true, permission: [ '/basics/class' ] }
  193. }
  194. ]
  195. },
  196. // 权限设置
  197. {
  198. path: '/roleIng',
  199. component: RouteView,
  200. name: 'roleIng',
  201. redirect: '/account/role',
  202. meta: { title: '权限管理', icon: 'user', hideHeader: true, permission: [ '/roleIng' ] },
  203. children: [
  204. {
  205. path: '/roleIng/staff',
  206. name: 'staff',
  207. component: () => import('@/views/roleIng/staff/index'),
  208. meta: { title: '员工管理', hideHeader: true, permission: [ '/roleIng/staff' ] }
  209. },
  210. {
  211. path: '/roleIng/role',
  212. name: 'role',
  213. component: () => import('@/views/roleIng/role/index'),
  214. meta: { title: '角色管理', hideHeader: true, permission: [ '/roleIng/role' ] }
  215. }
  216. ]
  217. }
  218. ]
  219. }
  220. // {
  221. // path: '*', redirect: '/404', hidden: true
  222. // }
  223. ]
  224. /**
  225. * 基础路由
  226. * @type { *[] }
  227. */
  228. export const constantRouterMap = [
  229. {
  230. path: '/user/login',
  231. component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login'),
  232. // redirect: '/user/login',
  233. hidden: true,
  234. children: [
  235. ]
  236. },
  237. {
  238. path: '/404',
  239. component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  240. }
  241. ]