index.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660
  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. Vue.use(Router)
  4. /* Layout */
  5. import Layout from '@/layout'
  6. /**
  7. * Note: sub-menu only appear when route children.length >= 1
  8. * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
  9. *
  10. * hidden: true if set true, item will not show in the sidebar(default is false)
  11. * alwaysShow: true if set true, will always show the root menu
  12. * if not set alwaysShow, when item has more than one children route,
  13. * it will becomes nested mode, otherwise not show the root menu
  14. * redirect: noRedirect if set noRedirect will no redirect in the breadcrumb
  15. * name:'router-name' the name is used by <keep-alive> (must set!!!)
  16. * meta : {
  17. roles: ['admin','editor'] control the page roles (you can set multiple roles)
  18. title: 'title' the name show in sidebar and breadcrumb (recommend set)
  19. icon: 'svg-name' the icon show in the sidebar
  20. breadcrumb: false if set false, the item will hidden in breadcrumb(default is true)
  21. activeMenu: '/example/list' if set path, the sidebar will highlight the path you set
  22. }
  23. */
  24. /**
  25. * constantRoutes
  26. * a base page that does not have permission requirements
  27. * all roles can be accessed
  28. */
  29. export const constantRoutes = [
  30. {
  31. path: '/login',
  32. component: () => import('@/views/login/index'),
  33. hidden: true
  34. },
  35. {
  36. path: '/system/insideSetting',
  37. component: Layout,
  38. meta: { title: '内部分部设置' },
  39. hidden: true,
  40. children: [
  41. {
  42. path: 'adminoperation',
  43. component: () => import('@/views/categroyManager/insideSetting/adminOperation'),
  44. meta: { title: '侧系统角色权限管理边栏' }
  45. }
  46. ]
  47. },
  48. {
  49. path: '/404',
  50. component: () => import('@/views/404'),
  51. hidden: true
  52. },
  53. {
  54. path: '/',
  55. redirect: '/main/main', // 首页
  56. },
  57. {
  58. path: '/business',
  59. redirect: '/business/teamDetail',
  60. },
  61. {
  62. path: '/reportForm',
  63. redirect: '/reportForm/index'
  64. },
  65. // 开发中临时侧边栏-----------------------------------
  66. {
  67. path: '/silder',
  68. component: Layout,
  69. meta: { title: '侧边栏管理' },
  70. children: [
  71. {
  72. path: 'silderDemo',
  73. component: () => import('@/views/setSilder/addSilder'),
  74. meta: { title: '侧边栏' }
  75. }
  76. ]
  77. },
  78. {
  79. path: '/journal',
  80. component: Layout,
  81. meta: { title: '系统日志' },
  82. children: [
  83. {
  84. path: 'journal',
  85. component: () => import('@/views/journal/index'),
  86. meta: { title: '日志' }
  87. }
  88. ]
  89. },
  90. {
  91. path: '/teamBuild', // 创建乐团
  92. component: Layout,
  93. meta: { title: '乐团管理' },
  94. children: [
  95. {
  96. path: 'teamBuild',
  97. name: 'teamBuild',
  98. component: () => import('@/views/teamBuild/index'),
  99. meta: { title: '创建乐团' }
  100. },
  101. {
  102. path: 'sigupList',
  103. name: 'sigupList',
  104. component: () => import('@/views/teamBuild/signupList'),
  105. meta: { title: '乐团报名' },
  106. alwaysShow: false,
  107. hidden: true
  108. },
  109. {
  110. path: 'teamSeting',
  111. name: 'teamSeting',
  112. component: () => import('@/views/teamBuild/teamSeting/index'),
  113. meta: { title: '报名设置' }
  114. },
  115. {
  116. path: 'teamDetail',
  117. name: 'teamDetail',
  118. component: () => import('@/views/teamDetail/index'),
  119. meta: { title: '乐团详情' },
  120. },
  121. ]
  122. },
  123. // {
  124. // path: '/vipBuild',
  125. // component: Layout,
  126. // meta: { title: 'vip申请' },
  127. // children: [{
  128. // path: 'baseVip',
  129. // component: () => import('@/views/buildVip/index'),
  130. // meta: { title: 'vip详情' }
  131. // }]
  132. // },
  133. // {
  134. // path: '/vipClass', // 小课
  135. // component: Layout,
  136. // meta: { title: 'vip管理' },
  137. // children: [
  138. // {
  139. // path: 'vipClass',
  140. // name: 'vipClass',
  141. // component: () => import('@/views/vipClass/vipList'),
  142. // meta: { title: 'vip课列表' }
  143. // },
  144. // {
  145. // path: 'vipDetail',
  146. // name: 'vipDetail',
  147. // component: () => import('@/views/vipClass/vipDetail/index'),
  148. // meta: { title: 'vip课详情' }
  149. // },
  150. // {
  151. // path: 'resetClass',
  152. // name: 'resetClass',
  153. // component: () => import('@/views/vipClass/resetClasss'),
  154. // meta: { title: '调整记录' }
  155. // }
  156. // ]
  157. // },
  158. {
  159. path: '/teacher',
  160. component: Layout,
  161. meta: { title: '老师管理', icon: '' },
  162. children: [
  163. {
  164. path: 'teacherList',
  165. name: 'teacherList',
  166. meta: { title: '老师列表' },
  167. component: () => import('@/views/teacherManager/teacherList')
  168. },
  169. {
  170. path: 'teacherDetail',
  171. name: 'teacherDetail',
  172. meta: { title: '老师详情' },
  173. component: () => import('@/views/teacherManager/teacherDetail/index')
  174. }
  175. ]
  176. },
  177. {
  178. path: '/student',
  179. component: Layout,
  180. redirect: '/student/studentList',
  181. meta: { title: '学生管理' },
  182. children: [
  183. {
  184. path: 'studentList',
  185. meta: { title: '学生列表' },
  186. component: () => import('@/views/studentManager/studentList'),
  187. },
  188. {
  189. path: 'studentdetaile',
  190. meta: { title: '学员详情' },
  191. component: () => import('@/views/studentManager/index'),
  192. }
  193. ]
  194. },
  195. {
  196. path: '/formManager',
  197. component: Layout,
  198. meta: { title: '报表中心' },
  199. children: [{
  200. path: 'reportForm',
  201. meta: { title: '报表中心' },
  202. component: () => import('@/views/formManager/index')
  203. }]
  204. },
  205. {
  206. path: '/teamDetail', // 乐团详情
  207. component: Layout,
  208. meta: { title: '乐团详情' },
  209. children: [
  210. {
  211. path: 'teamList',
  212. name: 'teamList',
  213. component: () => import('@/views/teamDetail/teamList'),
  214. meta: { title: '乐团列表' },
  215. },
  216. {
  217. path: 'studentSignin',
  218. name: 'studentSignin',
  219. component: () => import('@/views/teamDetail/components/studentSignin'),
  220. meta: { title: '学生点名' }
  221. },
  222. {
  223. path: 'teacherSignin',
  224. name: 'teacherSignin',
  225. component: () => import('@/views/teamDetail/components/teacherSignin'),
  226. meta: { title: '老师上课记录' }
  227. }
  228. ]
  229. },
  230. // {
  231. // path: '/vipParameterManager',
  232. // name: 'vipParameterManager',
  233. // component: Layout,
  234. // meta: { title: 'vip参数设置' },
  235. // children: [{
  236. // path: 'vipParameterManager',
  237. // meta: { title: 'vip参数设置' },
  238. // component: () => import('@/views/categroyManager/generalSettings/vipParameterManager'),
  239. // }, {
  240. // path: 'vipChargeSeting',
  241. // meta: { title: 'vip收费类型设置' },
  242. // component: () => import('@/views/categroyManager/vipChargeSeting')
  243. // }, {
  244. // path: 'vipActiveList',
  245. // meta: { title: 'vip活动方案' },
  246. // component: () => import('@/views/categroyManager/vipActiveList')
  247. // },
  248. // {
  249. // path: 'vipNewActive',
  250. // hidden: true,
  251. // meta: { title: 'vip新增活动方案' },
  252. // component: () => import('@/views/categroyManager/vipNewActive')
  253. // },
  254. // ]
  255. // },
  256. // {
  257. // path: '/business',
  258. // component: Layout,
  259. // redirect: '/business/orderManager/income',
  260. // meta: { title: '交易管理' },
  261. // children: [
  262. // {
  263. // path: 'order',
  264. // meta: { title: '订单管理' },
  265. // component: () => import('@/views/businessManager/orderManager/index'),// Parent router-view
  266. // children: [{
  267. // path: 'income',
  268. // meta: { title: '收入' },
  269. // component: () => import('@/views/businessManager/orderManager/income')
  270. // }, {
  271. // path: 'backMoney',
  272. // meta: { title: '退费管理' },
  273. // component: () => import('@/views/businessManager/orderManager/backMoney')
  274. // }, {
  275. // path: 'expend',
  276. // meta: { title: '支出' },
  277. // component: () => import('@/views/businessManager/orderManager/expend')
  278. // }]
  279. // },
  280. // {
  281. // path: 'shopManager',
  282. // meta: { title: '商品管理' },
  283. // component: () => import('@/views/businessManager/shopManager/index'),
  284. // children: [
  285. // {
  286. // path: 'shopList',
  287. // meta: { title: '商品列表' },
  288. // component: () => import('@/views/businessManager/shopManager/shopList')
  289. // },
  290. // {
  291. // path: 'shopCategroy',
  292. // meta: { title: '商品分类' },
  293. // component: () => import('@/views/businessManager/shopManager/shopCategory')
  294. // }
  295. // ]
  296. // }
  297. // ]
  298. // },
  299. // 临时侧边栏结束-----------------------------------
  300. // {
  301. // path: '/teamDetail', // 乐团详情
  302. // component: Layout,
  303. // meta: { title: '乐团详情' },
  304. // children: [
  305. // {
  306. // path: 'teamDetail',
  307. // name: 'teamDetail',
  308. // component: () => import('@/views/teamDetail/index'),
  309. // meta: { title: '乐团详情' },
  310. // },
  311. // {
  312. // path: 'studentSignin',
  313. // name: 'studentSignin',
  314. // component: () => import('@/views/teamDetail/components/studentSignin'),
  315. // meta: { title: '学生点名' }
  316. // },
  317. // {
  318. // path: 'teacherSignin',
  319. // name: 'teacherSignin',
  320. // component: () => import('@/views/teamDetail/components/teacherSignin'),
  321. // meta: { title: '老师上课记录' }
  322. // }
  323. // ]
  324. // },
  325. // {
  326. // path: '/teamBuild', // 创建乐团
  327. // component: Layout,
  328. // children: [
  329. // {
  330. // path: 'teamBuild',
  331. // name: 'teamBuild',
  332. // component: () => import('@/views/teamBuild/index'),
  333. // meta: { title: '创建乐团' }
  334. // }
  335. // ]
  336. // },
  337. // {
  338. // path: '/vipClass', // 小课
  339. // component: Layout,
  340. // meta: { title: 'vip管理' },
  341. // children: [
  342. // {
  343. // path: 'vipClass',
  344. // name: 'vipClass',
  345. // component: () => import('@/views/vipClass/vipList'),
  346. // meta: { title: 'vip课列表' }
  347. // },
  348. // {
  349. // path: 'vipDetail',
  350. // name: 'vipDetail',
  351. // component: () => import('@/views/vipClass/vipDetail/index'),
  352. // meta: { title: '调整记录' }
  353. // },
  354. // {
  355. // path: 'resetClass',
  356. // name: 'resetClass',
  357. // component: () => import('@/views/vipClass/resetClasss'),
  358. // meta: { title: 'vip课详情' }
  359. // }
  360. // ]
  361. // },
  362. // {
  363. // path: '/teacher',
  364. // component: Layout,
  365. // meta: { title: '老师管理', icon: '' },
  366. // children: [
  367. // {
  368. // path: 'teacherList',
  369. // name: 'teacherList',
  370. // meta: { title: '老师列表' },
  371. // component: () => import('@/views/teacherManager/teacherList')
  372. // },
  373. // {
  374. // path: 'teacherDetail',
  375. // name: 'teacherDetail',
  376. // meta: { title: '老师详情' },
  377. // component: () => import('@/views/teacherManager/teacherDetail/index')
  378. // }
  379. // ]
  380. // },
  381. // {
  382. // path: '/student',
  383. // component: Layout,
  384. // redirect: '/student/studentList',
  385. // meta: { title: '学生管理' },
  386. // children: [
  387. // {
  388. // path: 'studentList',
  389. // meta: { title: '学生列表' },
  390. // component: () => import('@/views/studentManager/studentList'),
  391. // },
  392. // {
  393. // path: 'studentdetaile',
  394. // meta: { title: '学员详情' },
  395. // component: () => import('@/views/studentManager/index'),
  396. // }
  397. // ]
  398. // },
  399. // {
  400. // path: '/business',
  401. // component: Layout,
  402. // redirect: '/business/orderManager/income',
  403. // meta: { title: '交易管理' },
  404. // children: [
  405. // {
  406. // path: 'order',
  407. // meta: { title: '订单管理' },
  408. // component: () => import('@/views/businessManager/orderManager/index'),// Parent router-view
  409. // children: [{
  410. // path: 'income',
  411. // meta: { title: '收入' },
  412. // component: () => import('@/views/businessManager/orderManager/income')
  413. // }, {
  414. // path: 'backMoney',
  415. // meta: { title: '退费管理' },
  416. // component: () => import('@/views/businessManager/orderManager/backMoney')
  417. // }, {
  418. // path: 'expend',
  419. // meta: { title: '支出' },
  420. // component: () => import('@/views/businessManager/orderManager/expend')
  421. // }]
  422. // },
  423. // {
  424. // path: 'shopManager',
  425. // meta: { title: '商品管理' },
  426. // component: () => import('@/views/businessManager/shopManager/index'),
  427. // children: [
  428. // {
  429. // path: 'shopList',
  430. // meta: { title: '商品列表' },
  431. // component: () => import('@/views/businessManager/shopManager/shopList')
  432. // },
  433. // {
  434. // path: 'shopCategroy',
  435. // meta: { title: '商品分类' },
  436. // component: () => import('@/views/businessManager/shopManager/shopCategory')
  437. // }
  438. // ]
  439. // }
  440. // ]
  441. // },
  442. // {
  443. // path: '/categoryManager',
  444. // component: Layout,
  445. // meta: { title: '系统内部管理' },
  446. // children: [{
  447. // path: 'adminManager',
  448. // name: 'adminManager',
  449. // meta: { title: '权限管理' },
  450. // component: () => import('@/views/categroyManager/adminManager')
  451. // },
  452. // {
  453. // path: 'staffManager',
  454. // name: 'staffManager',
  455. // meta: { title: '员工管理' },
  456. // component: () => import('@/views/categroyManager/staffManager')
  457. // }, {
  458. // path: 'branchManager',
  459. // name: 'branchManager',
  460. // meta: { title: '合作单位' },
  461. // component: () => import('@/views/categroyManager/branchManager')
  462. // }, {
  463. // path: 'addressManager',
  464. // name: 'addressManager',
  465. // meta: { title: '教学点管理' },
  466. // component: () => import('@/views/categroyManager/addressManager')
  467. // }
  468. // ]
  469. // }, {
  470. // path: '/mapDemo',
  471. // component: Layout,
  472. // meta: { title: '地图案例' },
  473. // children: [
  474. // {
  475. // path: 'map',
  476. // component: () => import('@/views/mapDemo/index'),
  477. // meta: { title: '地图' }
  478. // }
  479. // ]
  480. // },
  481. // ,
  482. // {
  483. // path: '/example',
  484. // component: Layout,
  485. // redirect: '/example/table',
  486. // name: 'Example',
  487. // meta: { title: 'Example', icon: 'example' },
  488. // children: [
  489. // {
  490. // path: 'table',
  491. // name: 'Table',
  492. // component: () => import('@/views/table/index'),
  493. // meta: { title: 'Table' }
  494. // },
  495. // {
  496. // path: 'tree',
  497. // name: 'Tree',
  498. // component: () => import('@/views/tree/index'),
  499. // meta: { title: 'Tree' }
  500. // }
  501. // ]
  502. // },
  503. // {
  504. // path: '/form',
  505. // component: Layout,
  506. // children: [
  507. // {
  508. // path: 'index',
  509. // name: 'Form',
  510. // component: () => import('@/views/form/index'),
  511. // meta: { title: 'Form' }
  512. // }
  513. // ]
  514. // },
  515. // , {
  516. // path: '/nested',
  517. // component: Layout,
  518. // redirect: '/nested/menu1',
  519. // name: 'Nested',
  520. // meta: {
  521. // title: 'Nested',
  522. // icon: 'nested'
  523. // },
  524. // children: [
  525. // {
  526. // path: 'menu1',
  527. // component: () => import('@/views/nested/menu1/index'), // Parent router-view
  528. // name: 'Menu1',
  529. // meta: { title: 'Menu1' },
  530. // children: [
  531. // {
  532. // path: 'menu1-1',
  533. // component: () => import('@/views/nested/menu1/menu1-1'),
  534. // name: 'Menu1-1',
  535. // meta: { title: 'Menu1-1' }
  536. // },
  537. // {
  538. // path: 'menu1-2',
  539. // component: () => import('@/views/nested/menu1/menu1-2'),
  540. // name: 'Menu1-2',
  541. // meta: { title: 'Menu1-2' },
  542. // children: [
  543. // {
  544. // path: 'menu1-2-1',
  545. // component: () => import('@/views/nested/menu1/menu1-2/menu1-2-1'),
  546. // name: 'Menu1-2-1',
  547. // meta: { title: 'Menu1-2-1' }
  548. // },
  549. // {
  550. // path: 'menu1-2-2',
  551. // component: () => import('@/views/nested/menu1/menu1-2/menu1-2-2'),
  552. // name: 'Menu1-2-2',
  553. // meta: { title: 'Menu1-2-2' }
  554. // }
  555. // ]
  556. // },
  557. // {
  558. // path: 'menu1-3',
  559. // component: () => import('@/views/nested/menu1/menu1-3'),
  560. // name: 'Menu1-3',
  561. // meta: { title: 'Menu1-3' }
  562. // }
  563. // ]
  564. // },
  565. // {
  566. // path: 'menu2',
  567. // component: () => import('@/views/nested/menu2/index'),
  568. // meta: { title: 'menu2' }
  569. // }
  570. // ]
  571. // },
  572. // {
  573. // path: 'external-link',
  574. // component: Layout,
  575. // children: [
  576. // {
  577. // path: 'https://panjiachen.github.io/vue-element-admin-site/#/',
  578. // meta: { title: 'External Link' }
  579. // }
  580. // ]
  581. // },
  582. // 404 page must be placed at the end !!!
  583. // { path: '*', redirect: '/404', hidden: true }
  584. ]
  585. // export const constantRoutes = [{
  586. // path: '/',
  587. // redirect: '/upms',
  588. // }]
  589. const createRouter = () => new Router({
  590. // mode: 'history', // require service support
  591. scrollBehavior: () => ({ y: 0 }),
  592. routes: constantRoutes
  593. })
  594. const router = createRouter()
  595. // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
  596. export function resetRouter () {
  597. const newRouter = createRouter()
  598. router.matcher = newRouter.matcher // reset router
  599. }
  600. export const asyncRoutes = {
  601. Layout: Layout,
  602. main: () => import('@/views/main/index'),
  603. teamDetail: () => import('@/views/teamDetail/teamList'),
  604. vipList: () => import('@/views/vipClass/vipList'),
  605. teacherList: () => import('@/views/teacherManager/teacherList'),
  606. studentList: () => import('@/views/studentManager/studentList'),
  607. orderList: () => import('@/views/businessManager/orderManager/index'),
  608. income: () => import('@/views/businessManager/orderManager/income'),
  609. backOrder: () => import('@/views/businessManager/orderManager/backMoney'),
  610. expend: () => import('@/views/businessManager/orderManager/expend'),
  611. shopManager: () => import('@/views/businessManager/shopManager/shopList'),
  612. shopOperation: () => import('@/views/businessManager/shopManager/shopOperation'),
  613. shopCategory: () => import('@/views/businessManager/shopManager/shopCategory'),
  614. reportForm: () => import('@/views/reportForm/index'),
  615. musicalManager: () => import('@/views/categroyManager/specialSetup/musicalManager'),
  616. specialSetup: () => import('@/views/categroyManager/specialSetup/index'),
  617. typesManager: () => import('@/views/categroyManager/specialSetup/typesManager'),
  618. tryClass: () => import('@/views/categroyManager/specialSetup/tryClass'),
  619. activityManager: () => import('@/views/categroyManager/specialSetup/activityManager'),
  620. tempalteManager: () => import('@/views/categroyManager/specialSetup/tempalteManager'),
  621. bannerManager: () => import('@/views/categroyManager/specialSetup/bannerManager'),
  622. holidayManager: () => import('@/views/categroyManager/specialSetup/holidayManager'),
  623. branchSetting: () => import('@/views/categroyManager/specialSetup/branchSetting'),
  624. jobTemplateSetting: () => import('@/views/categroyManager/specialSetup/jobTemplateSetting'),
  625. generalSettings: () => import('@/views/categroyManager/generalSettings/index'),
  626. siginManager: () => import('@/views/categroyManager/generalSettings/siginManager'),
  627. leaveManager: () => import('@/views/categroyManager/generalSettings/leaveManager'),
  628. cycleManager: () => import('@/views/categroyManager/generalSettings/cycleManager'),
  629. overallManager: () => import('@/views/categroyManager/generalSettings/overallManager'),
  630. payManager: () => import('@/views/categroyManager/generalSettings/payManager'),
  631. insideSetting: () => import('@/views/categroyManager/insideSetting/index'),
  632. adminManager: () => import('@/views/categroyManager/insideSetting/adminManager'),
  633. staffManager: () => import('@/views/categroyManager/insideSetting/staffManager'),
  634. branchManager: () => import('@/views/categroyManager/insideSetting/branchManager'),
  635. addressManager: () => import('@/views/categroyManager/insideSetting/addressManager'),
  636. branchActive: () => import('@/views/categroyManager/insideSetting/branchActive'),
  637. vipChargeSeting: () => import('@/views/categroyManager/vipChargeSeting'),
  638. vipActiveList: () => import('@/views/categroyManager/vipActiveList'),
  639. vipNewActive: () => import('@/views/categroyManager/vipNewActive'),
  640. vipParameterManager: () => import('@/views/categroyManager/generalSettings/vipParameterManager'),
  641. globalConfig: () => import('@/views/categroyManager/globalConfig'),
  642. }
  643. export default router