index.js 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. import Vue from 'vue';
  2. import VueRouter from 'vue-router';
  3. Vue.use(VueRouter);
  4. const routes = [
  5. {
  6. path: '/',
  7. name: 'frame',
  8. component: () => import('@/views/index.vue'),
  9. children: [
  10. {
  11. path: '/plan/index',
  12. name: 'plan_list',
  13. meta: { title: '计划', sub: '管理' },
  14. component: () => import('@/views/plan/index.vue'),
  15. },
  16. {
  17. path: '/plan/detail',
  18. name: 'plan_detail',
  19. meta: { title: '计划', sub: '详情' },
  20. component: () => import('@/views/plan/detail.vue'),
  21. },
  22. {
  23. path: '/teacher/index',
  24. name: 'teacher_list',
  25. meta: { title: '教师', sub: '管理' },
  26. component: () => import('@/views/teacher/index.vue'),
  27. },
  28. {
  29. path: '/scganli/index',
  30. name: 'teacher_list',
  31. meta: { title: '学生', sub: '管理' },
  32. component: () => import('@/views/scganli/index.vue'),
  33. },
  34. {
  35. path: '/scganli/detail',
  36. name: 'teacher_list',
  37. meta: { title: '上传学生', sub: '详情' },
  38. component: () => import('@/views/scganli/detail.vue'),
  39. },
  40. {
  41. path: '/teacher/detail',
  42. name: 'teacher_detail',
  43. meta: { title: '教师', sub: '信息' },
  44. component: () => import('@/views/teacher/detail.vue'),
  45. },
  46. {
  47. path: '/leave/index',
  48. name: 'leave_list',
  49. meta: { title: '请假', sub: '管理' },
  50. component: () => import('@/views/leave/index.vue'),
  51. },
  52. {
  53. path: '/stud/detail',
  54. name: 'stud_detail',
  55. meta: { title: '学生', sub: '信息' },
  56. component: () => import('@/views/leave/stud.vue'),
  57. },
  58. {
  59. path: '/student/index',
  60. name: 'student_index',
  61. meta: { title: '学生', sub: '管理' },
  62. component: () => import('@/views/student/index.vue'),
  63. },
  64. {
  65. path: '/student/detail',
  66. name: 'student_detail',
  67. meta: { title: '学生', sub: '详情' },
  68. component: () => import('@/views/student/detail.vue'),
  69. },
  70. ],
  71. },
  72. ];
  73. const router = new VueRouter({
  74. mode: 'history',
  75. base: process.env.NODE_ENV === 'development' ? '' : process.env.VUE_APP_ROOT_URL + 'school',
  76. routes,
  77. });
  78. export default router;