import Vue from 'vue' import VueRouter from 'vue-router' import box from '../components/box' // import Home from '../views/Home.vue' Vue.use(VueRouter) const routes = [ { path: '/', name: 'box', component: box, redirect: '/login', children: [ { path: 'home', name: 'home', component: () => import('@/views/head'), children: [ { path: 'enterpriseArchives', name: 'enterpriseArchives', component: () => import('@/views/enterpriseArchives'), }, { path: 'archives', name: 'archives', component: () => import('@/views/archives'), }, // 系统管理 { path: 'systemManagement', name: 'systemManagement', component: () => import('@/views/systemManagement'), children: [ // 关联设备 { path: 'correlationEquipment', name: 'correlationEquipment', component: () => import('@/views/systemManagement/correlationEquipment'), }, // 企业名单 { path: 'companyList', name: 'companyList', component: () => import('@/views/systemManagement/companyList'), } ] } ] }, { path: 'login', name: 'login', component: () => import('@/components/login'), }, ] }] const router = new VueRouter({ mode: 'history', base: process.env.BASE_URL, routes }) export default router