index.js 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. import Vue from 'vue';
  2. import Router from 'vue-router';
  3. Vue.use(Router);
  4. export default new Router({
  5. mode: 'history',
  6. base: process.env.NODE_ENV === 'development' ? '' : 'study',
  7. routes: [
  8. {
  9. path: '/',
  10. redirect: '/homeIndex',
  11. },
  12. {
  13. path: '/',
  14. component: () => import('../components/common/Home.vue'),
  15. meta: { title: '自述文件' },
  16. children: [
  17. {
  18. path: '/homeIndex',
  19. component: () => import('../views/homeIndex.vue'),
  20. meta: { title: '系统首页' },
  21. },
  22. // 菜单管理
  23. {
  24. path: '/menu',
  25. component: () => import('../views/menu/index.vue'),
  26. meta: { title: '菜单管理' },
  27. },
  28. // 管理员
  29. {
  30. path: '/gly',
  31. component: () => import('../views/gly/index.vue'),
  32. meta: { title: '管理员管理' },
  33. },
  34. {
  35. path: '/gly/detail',
  36. component: () => import('../views/gly/detail.vue'),
  37. meta: { title: '管理员信息管理' },
  38. },
  39. // 机构管理员
  40. {
  41. path: '/jg',
  42. component: () => import('../views/jg/index.vue'),
  43. meta: { title: '机构管理员' },
  44. },
  45. {
  46. path: '/jg/detail',
  47. component: () => import('../views/jg/detail.vue'),
  48. meta: { title: '机构管理员信息管理' },
  49. },
  50. // 业务管理员
  51. {
  52. path: '/yw',
  53. component: () => import('../views/yw/index.vue'),
  54. meta: { title: '业务管理员' },
  55. },
  56. {
  57. path: '/yw/detail',
  58. component: () => import('../views/yw/detail.vue'),
  59. meta: { title: '业务管理员信息管理' },
  60. },
  61. // 权限管理
  62. {
  63. path: '/qx',
  64. component: () => import('../views/qx/index.vue'),
  65. meta: { title: '权限管理' },
  66. },
  67. // 用户管理
  68. {
  69. path: '/user',
  70. component: () => import('../views/user/index.vue'),
  71. meta: { title: '用户管理' },
  72. },
  73. ],
  74. },
  75. {
  76. path: '/login',
  77. component: () => import('../views/Login.vue'),
  78. meta: { title: '登录' },
  79. },
  80. {
  81. path: '*',
  82. redirect: '/404',
  83. },
  84. ],
  85. });