index.js 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. import { createRouter, createWebHashHistory } from 'vue-router'
  2. import Home from '../views/Home/Home.vue'
  3. const routes = [
  4. {
  5. path: '/',
  6. redirect: '/monitor/home'
  7. },
  8. {
  9. path: '/monitor/home', // 驾驶舱
  10. name: 'Home',
  11. component: Home,
  12. },
  13. {
  14. path: '/monitor/about',
  15. name: 'About',
  16. component: () => import(/* webpackChunkName: "about" */ '../views/About.vue'),
  17. },
  18. {
  19. path: '/monitor/status', // 状态监视
  20. name: 'Status',
  21. component: () => import(/* webpackChunkName: "status" */ '../views/Status/Status.vue'),
  22. },
  23. {
  24. path: '/monitor/agc', // AGC 监视
  25. name: 'Agc',
  26. component: () => import(/* webpackChunkName: "agc" */ '../views/Agc/Agc.vue'),
  27. },
  28. {
  29. path: '/monitor/windsite',
  30. name: 'WindSite',
  31. component: () => import(/* webpackChunkName: "windsite" */ '../views/WindSite/WindSite.vue'),
  32. children: [{
  33. path: 'home/:wpId', // 场站监视
  34. component: () => import(/* webpackChunkName: "windsitehome" */ '../views/WindSite/pages/Home/Home.vue'),
  35. }, {
  36. path: 'draughtfanlist/:wpId', // 风机列表
  37. component: () => import(/* webpackChunkName: "windsitedraughtfanlist" */ '../views/WindSite/pages/DraughtFanList.vue'),
  38. }, {
  39. path: 'matrix/:wpId', // 风场矩阵
  40. component: () => import(/* webpackChunkName: "windsitematrix" */ '../views/WindSite/pages/Matrix.vue'),
  41. }, {
  42. path: 'lightmatrix/:wpId',
  43. component: () => import(/* webpackChunkName: "windsitelightmatrix" */ '../views/WindSite/pages/LightMatrix.vue'),
  44. }, {
  45. path: 'box/:wpId',
  46. component: () => import(/* webpackChunkName: "windsitebox" */ '../views/WindSite/pages/Box.vue'),
  47. }, {
  48. path: 'info/:wpId/:wtId', // 单机状态监视
  49. component: () => import(/* webpackChunkName: "info" */ '../views/WindSite/pages/Info/Info.vue'),
  50. }, {
  51. path: 'tower/:wpId', // 测风塔
  52. component: () => import(/* webpackChunkName: "windsitetower" */ '../views/WindSite/pages/Tower.vue'),
  53. }, {
  54. path: 'inverter-info/:wpId',
  55. component: () => import(/* webpackChunkName: "inverter-info" */ '../views/WindSite/pages/Inverter-Info.vue'),
  56. }, {
  57. path: 'map/:wpId',
  58. component: () => import(/* webpackChunkName: "windsitemap" */ '../views/WindSite/pages/Map.vue'),
  59. }, {
  60. path: 'map1/:wpId',
  61. component: () => import(/* webpackChunkName: "windsitemap1" */ '../views/WindSite/pages/Map1.vue'),
  62. },{
  63. path: 'boosterstation', // AGC 监视
  64. component: () => import(/* webpackChunkName: "boosterstation" */ '../views/WindSite/pages/BoosterStation.vue'),
  65. },]
  66. },
  67. {
  68. path: '/monitor/lightmatrix', // 光伏明细矩阵
  69. name: 'LightMatrix',
  70. component: () => import(/* webpackChunkName: "lightmatrix" */ '../views/LightMatrix/LightMatrix.vue'),
  71. },
  72. {
  73. path: '/monitor/lightmatrix1', // 基础矩阵
  74. name: 'LightMatrix1',
  75. component: () => import(/* webpackChunkName: "lightmatrix1" */ '../views/LightMatrix1/LightMatrix1.vue'),
  76. },
  77. {
  78. path: '/monitor/lightmatrix2', // 欠发矩阵
  79. name: 'LightMatrix2',
  80. component: () => import(/* webpackChunkName: "lightmatrix2" */ '../views/LightMatrix2/LightMatrix2.vue'),
  81. }, {
  82. path: '/monitor/lightmatrix3', // 明细矩阵
  83. name: 'LightMatrix3',
  84. component: () => import(/* webpackChunkName: "lightmatrix3" */ '../views/LightMatrix3/LightMatrix3.vue'),
  85. }, {
  86. path: '/decision/decision1',
  87. name: 'decision1',
  88. component: () => import(/* webpackChunkName: "decision1" */ '../views/Decision/Decision1.vue'),
  89. },
  90. {
  91. path: '/decision/decision2',
  92. name: 'decision2',
  93. component: () => import(/* webpackChunkName: "decision2" */ '../views/Decision/Decision2.vue'),
  94. },
  95. {
  96. path: '/decision/decision3',
  97. name: 'decision3',
  98. component: () => import(/* webpackChunkName: "decision3" */ '../views/Decision/Decision3.vue'),
  99. },
  100. {
  101. path: '/decision/decision4',
  102. name: 'decision4',
  103. component: () => import(/* webpackChunkName: "decision4" */ '../views/Decision/Decision4.vue'),
  104. },
  105. {
  106. path: '/health',
  107. name: 'health',
  108. component: () => import('../views/HealthControl/Health.vue'),
  109. },
  110. {
  111. path: '/health/health1',
  112. name: 'health1',
  113. component: () => import('../views/HealthControl/Health1.vue'),
  114. },
  115. {
  116. path: '/health/health2', // 健康管理首页
  117. name: 'health2',
  118. component: () => import('../views/HealthControl/Health2.vue'),
  119. },
  120. {
  121. path: '/health/health3/:wpId', // 场站健康管理
  122. name: 'health3',
  123. component: () => import('../views/HealthControl/Health3.vue'),
  124. },
  125. {
  126. path: '/health/health4',
  127. name: 'health4',
  128. component: () => import('../views/HealthControl/Health4.vue'),
  129. },
  130. {
  131. path: '/health/health5',
  132. name: 'health5',
  133. component: () => import('../views/HealthControl/Health5.vue'),
  134. },
  135. {
  136. path: '/health/health6', // 健康总览
  137. name: 'health6',
  138. component: () => import('../views/HealthControl/Health6.vue'),
  139. },
  140. {
  141. path: '/health/health7',
  142. name: 'health7',
  143. component: () => import('../views/HealthControl/Health7.vue'),
  144. },
  145. ]
  146. const router = createRouter({
  147. history: createWebHashHistory(),
  148. base: '/zhfx/',
  149. routes
  150. })
  151. router.beforeEach((to, from, next) => {
  152. next()
  153. })
  154. export default router