136 lines
3.5 KiB
TypeScript
136 lines
3.5 KiB
TypeScript
|
/*
|
||
|
* @FilePath: \wwwd:\code\screenFront\src\router\index.ts
|
||
|
* @Author: 王路平
|
||
|
* @文件版本: V1.0.0
|
||
|
* @Date: 2023-01-29 15:16:36
|
||
|
* @Description:
|
||
|
*
|
||
|
* 版权信息 : 2023 by ${再登软件}, All Rights Reserved.
|
||
|
*/
|
||
|
|
||
|
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
|
||
|
|
||
|
const routes: Array<RouteRecordRaw> = [
|
||
|
{
|
||
|
path: '/Mechanics',
|
||
|
name: 'Mechanics',
|
||
|
component: () => import('../views/Mechanics/index.vue'),
|
||
|
|
||
|
},
|
||
|
{
|
||
|
path: '/demo',
|
||
|
name: 'demo',
|
||
|
// 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(/* 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',
|
||
|
// 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/environment/index.vue')
|
||
|
},{
|
||
|
path: '/generalEnvironment',
|
||
|
name: 'generalEnvironment',
|
||
|
component: () => import('../views/generalEnvironment/index.vue')
|
||
|
},{
|
||
|
path: '/realtimeSecurity',
|
||
|
name: 'realtimeSecurity',
|
||
|
component: () => import('../views/realtimeSecurity/index.vue')
|
||
|
},{
|
||
|
path: '/energyConsume',
|
||
|
name: 'energyConsume',
|
||
|
children:[{
|
||
|
path:'/energyConsume/',
|
||
|
component: () => import('../views/energyConsume/index.vue')
|
||
|
},{
|
||
|
path:'/energyConsume/historyData',
|
||
|
component: () => import('../views/energyConsume/content/child/historyData.vue')
|
||
|
}]
|
||
|
|
||
|
},{
|
||
|
path: '/child',
|
||
|
name: 'child',
|
||
|
component: () => import('../views/child/index.vue'),
|
||
|
children:[
|
||
|
//理论二级
|
||
|
{
|
||
|
path: '/InPlantProducts/:id',
|
||
|
name: 'devItem',
|
||
|
component: () => import('../views/InPlantProducts/child/index.vue')
|
||
|
},
|
||
|
//理论二级
|
||
|
{
|
||
|
path: '/Mechanics/:id',
|
||
|
name: 'Mechanicschild',
|
||
|
component: () => import('../views/Mechanics/child/index.vue')
|
||
|
},
|
||
|
//理论三级
|
||
|
{
|
||
|
path: '/Mechanics/:id/:dev',
|
||
|
name: 'Mechanicsson',
|
||
|
component: () => import('../views/Mechanics/child/son/index.vue')
|
||
|
},
|
||
|
]
|
||
|
},{
|
||
|
path: '/InPlantProducts',
|
||
|
name: 'InPlantProducts',
|
||
|
component: () => import('../views/InPlantProducts/index.vue'),
|
||
|
|
||
|
},
|
||
|
{
|
||
|
path: '/Offsite',
|
||
|
name: 'Offsite',
|
||
|
children:[{
|
||
|
path:'/Offsite/',
|
||
|
component: () => import('../views/Offsite/index.vue'),
|
||
|
},
|
||
|
{
|
||
|
path:'/Offsite/devList',
|
||
|
component: () => import('../views/Offsite/child/index.vue')
|
||
|
}
|
||
|
]
|
||
|
|
||
|
},
|
||
|
{
|
||
|
path: '/MicrofactoryDev',
|
||
|
name: 'MicrofactoryDev',
|
||
|
component: () => import('../views/MicrofactoryDev/index.vue'),
|
||
|
},
|
||
|
{
|
||
|
path: '/AerialView',
|
||
|
name: 'AerialView',
|
||
|
component: () => import('../views/AerialView/index.vue'),
|
||
|
|
||
|
},
|
||
|
{
|
||
|
path: '/FactoryView',
|
||
|
name: 'FactoryView',
|
||
|
component: () => import('../views/FactoryView/index.vue'),
|
||
|
|
||
|
},
|
||
|
{
|
||
|
path:'/',
|
||
|
name:'index',
|
||
|
component:()=>import('../views/index.vue')
|
||
|
}
|
||
|
]
|
||
|
|
||
|
const router = createRouter({
|
||
|
history: createWebHashHistory(),
|
||
|
routes
|
||
|
})
|
||
|
|
||
|
export default router
|