diff --git a/src/router/index.ts b/src/router/index.ts index a23c33b..4f60abc 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -32,14 +32,6 @@ const routes: Array = [ component: () => import(/* webpackChunkName: "about" */ "../views/demo/demo.vue"), }, - { - path: "/index", - name: "index", - // route level code-splitting - // this generates a separate chunk (about.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import("../views/index.vue"), - }, { path: "/environment", name: "environment", @@ -61,15 +53,13 @@ const routes: Array = [ { path: "/energyConsume", name: "energyConsume", - component: () => import("../views/energyConsume/index.vue"), - children: [ - { - path: "/energyConsume/historyData", - name: 'historyData', - component: () => - import("../views/energyConsume/content/child/historyData.vue"), - }, - ], + component: () => import("../views/energyConsume/index.vue") + }, + { + path: "/energyConsume/historyData", + name: 'historyData', + component: () => + import("../views/energyConsume/content/child/historyData.vue"), }, { path: "/InPlantProducts", @@ -332,9 +322,9 @@ router.beforeEach(async (to: any, from, next) => { let hash = to.query.hash let arr = [ 'legionProducts', 'devItem', 'tufting', 'Winding', 'Large_Format', - 'GetonAgain', 'OffsiteDevList', 'Mechanicschild', 'Mechanicsson', 'jixieHistoryData' + 'GetonAgain', 'OffsiteDevList', 'Mechanicschild', 'Mechanicsson','historyData', 'jixieHistoryData' ] - + // 返回 false 以取消导航 if (to.path == "/") { sessionStorage.setItem("screen_hash", to.query.hash);