index.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import {createRouter, createWebHistory} from 'vue-router'
  2. import layout from '@/layout/index.vue'
  3. const router = createRouter({
  4. history: createWebHistory(import.meta.env.BASE_URL),
  5. routes: [
  6. {
  7. path: '/',
  8. redirect: '/index',
  9. component: layout,
  10. children: [
  11. {
  12. path: 'index',
  13. name: 'home',
  14. component: () => import('@/views/Home.vue'),
  15. },
  16. {
  17. path: 'station/:stcd',
  18. name: 'station',
  19. component: () => import('@/views/Station.vue'),
  20. },
  21. {
  22. path: 'situational/:stcd',
  23. name: 'situational',
  24. component: () => import('@/views/Situational.vue'),
  25. },
  26. {
  27. path: 'intelloper/:stcd',
  28. name: 'intelloper',
  29. component: () => import('@/views/IntellOper.vue'),
  30. },
  31. {
  32. path: 'detail/:stcd',
  33. name: 'detail',
  34. component: () => import('@/views/Detail.vue'),
  35. },
  36. {
  37. path: 'device/:stcd/:deviceid',
  38. name: 'device',
  39. component: () => import('@/views/Device.vue'),
  40. },
  41. ],
  42. },
  43. ],
  44. })
  45. export default router