index.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. Vue.use(Router)
  4. const Home = () => import(/* webpackChunkName: 'home' */ '@/components/Home.vue')
  5. const Main = () => import(/* webpackChunkName: 'home' */ '@/views/main')
  6. const Equipment = () => import(/* webpackChunkName: 'equipment' */ '@/views/equipment')
  7. const Rooms = () => import(/* webpackChunkName: 'rooms' */ '@/views/rooms')
  8. const Verit = () => import(/* webpackChunkName: 'verit' */ '@/views/verit')
  9. const Detail = () => import(/* webpackChunkName: 'detail' */ '@/views/detail')
  10. const Monitoring = () => import(/* webpackChunkName: 'monitoring' */ '@/views/monitoring')
  11. const Spread = () => import(/* webpackChunkName: 'spread' */ '@/views/spread')
  12. const Check = () => import(/* webpackChunkName: 'spread' */ '@/views/check')
  13. const Asset = () => import(/* webpackChunkName: 'spread' */ '@/views/asset')
  14. const System = () => import(/* webpackChunkName: 'system' */ '@/views/system')
  15. export default new Router({
  16. mode: 'history',
  17. routes: [
  18. {
  19. path: '/',
  20. component: Home,
  21. redirect: '/main',
  22. children: [
  23. {
  24. path: 'main',
  25. component: Main
  26. },
  27. {
  28. path: 'equipment',
  29. component: Equipment
  30. },
  31. {
  32. path: 'rooms',
  33. component: Rooms
  34. },
  35. {
  36. path: 'vr',
  37. component: Verit
  38. },
  39. {
  40. path: 'detail',
  41. component: Detail
  42. },
  43. {
  44. path: 'monitoring',
  45. component: Monitoring
  46. },
  47. {
  48. path: 'spread',
  49. component: Spread
  50. },
  51. {
  52. path: 'check',
  53. component: Check
  54. },
  55. {
  56. path: 'asset',
  57. component: Asset
  58. },
  59. {
  60. path: 'system',
  61. component: System
  62. }
  63. ]
  64. }
  65. ]
  66. })