index.js 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. import { createRouter, createWebHashHistory } from 'vue-router'
  2. import Home from '../views/Home/Home.vue'
  3. const routes = [
  4. {
  5. path: '/',
  6. name: 'Home',
  7. component: Home,
  8. },
  9. {
  10. path: '/about',
  11. name: 'About',
  12. component: () => import(/* webpackChunkName: "about" */ '../views/About.vue'),
  13. },
  14. {
  15. path: '/status', // 状态监视
  16. name: 'Status',
  17. component: () => import(/* webpackChunkName: "status" */ '../views/Status/Status.vue'),
  18. },
  19. {
  20. path: '/agc', // AGC 监视
  21. name: 'Agc',
  22. component: () => import(/* webpackChunkName: "agc" */ '../views/Agc/Agc.vue'),
  23. },
  24. {
  25. path: '/windsite',
  26. name: 'WindSite',
  27. component: () => import(/* webpackChunkName: "windsite" */ '../views/WindSite/WindSite.vue'),
  28. children: [{
  29. path: 'home', // 场站监视
  30. component: () => import(/* webpackChunkName: "windsitehome" */ '../views/WindSite/pages/Home/Home.vue'),
  31. }, {
  32. path: 'draughtfanlist',
  33. component: () => import(/* webpackChunkName: "windsitedraughtfanlist" */ '../views/WindSite/pages/DraughtFanList.vue'),
  34. }, {
  35. path: 'matrix', // 风场矩阵
  36. component: () => import(/* webpackChunkName: "windsitematrix" */ '../views/WindSite/pages/Matrix.vue'),
  37. }, {
  38. path: 'lightmatrix',
  39. component: () => import(/* webpackChunkName: "windsitelightmatrix" */ '../views/WindSite/pages/LightMatrix.vue'),
  40. }, {
  41. path: 'box',
  42. component: () => import(/* webpackChunkName: "windsitebox" */ '../views/WindSite/pages/Box.vue'),
  43. }, {
  44. path: 'info',
  45. component: () => import(/* webpackChunkName: "windsitebox" */ '../views/WindSite/pages/Info/Info.vue'),
  46. }, {
  47. path: 'tower',
  48. component: () => import(/* webpackChunkName: "windsitetower" */ '../views/WindSite/pages/Tower.vue'),
  49. }, {
  50. path: 'inverter-info',
  51. component: () => import(/* webpackChunkName: "windsitetower" */ '../views/WindSite/pages/Inverter-Info.vue'),
  52. }, {
  53. path: 'map',
  54. component: () => import(/* webpackChunkName: "windsitemap" */ '../views/WindSite/pages/Map.vue'),
  55. }]
  56. },
  57. {
  58. path: '/lightmatrix', // 光伏明细矩阵
  59. name: 'LightMatrix',
  60. component: () => import(/* webpackChunkName: "lightmatrix" */ '../views/LightMatrix/LightMatrix.vue'),
  61. },
  62. {
  63. path: '/lightmatrix1', // 基础矩阵
  64. name: 'LightMatrix1',
  65. component: () => import(/* webpackChunkName: "lightmatrix1" */ '../views/LightMatrix1/LightMatrix1.vue'),
  66. },
  67. {
  68. path: '/lightmatrix2', // 欠发矩阵
  69. name: 'LightMatrix2',
  70. component: () => import(/* webpackChunkName: "lightmatrix2" */ '../views/LightMatrix2/LightMatrix2.vue'),
  71. }, {
  72. path: '/lightmatrix3', // 明细矩阵
  73. name: 'LightMatrix3',
  74. component: () => import(/* webpackChunkName: "lightmatrix3" */ '../views/LightMatrix3/LightMatrix3.vue'),
  75. },
  76. ]
  77. const router = createRouter({
  78. history: createWebHashHistory(),
  79. base: '/zhfx/',
  80. routes
  81. })
  82. router.beforeEach((to, from, next) => {
  83. next()
  84. })
  85. export default router