index.ts 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. path: 'sthouse/:stcd',
  32. name: 'sthouse',
  33. component: () => import('@/views/StationHouse.vue'),
  34. },
  35. {
  36. path: 'detail/:id',
  37. name: 'detail',
  38. component: () => import('@/views/Detail.vue'),
  39. },
  40. {
  41. path: 'device/:stcd/:deviceid',
  42. name: 'device',
  43. component: () => import('@/views/Device.vue'),
  44. }, {
  45. path: 'sw/:stcd',
  46. name: 'sw',
  47. component: () => import('@/views/Sw.vue'),
  48. },
  49. ],
  50. },
  51. ],
  52. })
  53. export default router