import { createRouter, createWebHashHistory } from 'vue-router' import Home from '../views/Home/Home.vue' const routes = [ { path: '/', // 驾驶舱 name: 'Home', component: Home, }, { path: '/about', name: 'About', component: () => import(/* webpackChunkName: "about" */ '../views/About.vue'), }, { path: '/status', // 状态监视 name: 'Status', component: () => import(/* webpackChunkName: "status" */ '../views/Status/Status.vue'), }, { path: '/agc', // AGC 监视 name: 'Agc', component: () => import(/* webpackChunkName: "agc" */ '../views/Agc/Agc.vue'), }, { path: '/windsite', name: 'WindSite', component: () => import(/* webpackChunkName: "windsite" */ '../views/WindSite/WindSite.vue'), children: [{ path: 'home', // 场站监视 component: () => import(/* webpackChunkName: "windsitehome" */ '../views/WindSite/pages/Home/Home.vue'), }, { path: 'draughtfanlist', // 风机列表 component: () => import(/* webpackChunkName: "windsitedraughtfanlist" */ '../views/WindSite/pages/DraughtFanList.vue'), }, { path: 'matrix', // 风场矩阵 component: () => import(/* webpackChunkName: "windsitematrix" */ '../views/WindSite/pages/Matrix.vue'), }, { path: 'lightmatrix', component: () => import(/* webpackChunkName: "windsitelightmatrix" */ '../views/WindSite/pages/LightMatrix.vue'), }, { path: 'box', component: () => import(/* webpackChunkName: "windsitebox" */ '../views/WindSite/pages/Box.vue'), }, { path: 'info', // 单机状态监视 component: () => import(/* webpackChunkName: "windsitebox" */ '../views/WindSite/pages/Info/Info.vue'), }, { path: 'tower', component: () => import(/* webpackChunkName: "windsitetower" */ '../views/WindSite/pages/Tower.vue'), }, { path: 'inverter-info', component: () => import(/* webpackChunkName: "windsitetower" */ '../views/WindSite/pages/Inverter-Info.vue'), }, { path: 'map', component: () => import(/* webpackChunkName: "windsitemap" */ '../views/WindSite/pages/Map.vue'), }, { path: 'map1', component: () => import(/* webpackChunkName: "windsitemap1" */ '../views/WindSite/pages/Map1.vue'), }] }, { path: '/lightmatrix', // 光伏明细矩阵 name: 'LightMatrix', component: () => import(/* webpackChunkName: "lightmatrix" */ '../views/LightMatrix/LightMatrix.vue'), }, { path: '/lightmatrix1', // 基础矩阵 name: 'LightMatrix1', component: () => import(/* webpackChunkName: "lightmatrix1" */ '../views/LightMatrix1/LightMatrix1.vue'), }, { path: '/lightmatrix2', // 欠发矩阵 name: 'LightMatrix2', component: () => import(/* webpackChunkName: "lightmatrix2" */ '../views/LightMatrix2/LightMatrix2.vue'), }, { path: '/lightmatrix3', // 明细矩阵 name: 'LightMatrix3', component: () => import(/* webpackChunkName: "lightmatrix3" */ '../views/LightMatrix3/LightMatrix3.vue'), }, { path: '/decision1', name: 'decision1', component: () => import(/* webpackChunkName: "lightmatrix3" */ '../views/Decision/Decision1.vue'), }, { path: '/decision2', name: 'decision2', component: () => import(/* webpackChunkName: "lightmatrix3" */ '../views/Decision/Decision2.vue'), }, { path: '/decision3', name: 'decision3', component: () => import(/* webpackChunkName: "lightmatrix3" */ '../views/Decision/Decision3.vue'), }, { path: '/decision4', name: 'decision4', component: () => import(/* webpackChunkName: "lightmatrix3" */ '../views/Decision/Decision4.vue'), }, { path: '/health', name: 'health', component: () => import('../views/HealthControl/Health.vue'), }, { path: '/health1', name: 'health1', component: () => import('../views/HealthControl/Health1.vue'), }, { path: '/health2', name: 'health2', component: () => import('../views/HealthControl/Health2.vue'), }, { path: '/health3', name: 'health3', component: () => import('../views/HealthControl/Health3.vue'), }, { path: '/health4', name: 'health4', component: () => import('../views/HealthControl/Health4.vue'), }, { path: '/health5', name: 'health5', component: () => import('../views/HealthControl/Health5.vue'), }, { path: '/health6', name: 'health6', component: () => import('../views/HealthControl/Health6.vue'), }, { path: '/health7', name: 'health7', component: () => import('../views/HealthControl/Health7.vue'), }, ] const router = createRouter({ history: createWebHashHistory(), base: '/zhfx/', routes }) router.beforeEach((to, from, next) => { next() }) export default router