import Login from './views/Login.vue' import NotFound from './views/404.vue' import Home from './views/Home.vue' import message from './views/message.vue' import invite from './views/invite.vue' import map from './views/map/map.vue' import detection from './views/detection/detection.vue' import maintenance from './views/detection/maintenance.vue' import project from './views/project/project.vue' import projectDetail from './views/project/projectDetail.vue' import staff from './views/project/staff.vue' import competence from './views/project/competence.vue' import moldList from './views/mold/moldList.vue' import moldDetail from './views/mold/moldDetail.vue' import moldDownload from './views/mold/moldDownload.vue' import comp from './views/base/comp.vue' import factory from './views/base/factory.vue' import allocation from './views/base/allocation.vue' let routes = [ { path: '/login', component: Login, name: '', hidden: true }, //地图概览 { path: '/', component: Home, name: '', iconCls: 'iconfont icon-ditu', leaf: true,//只有一个节点 children: [ { path: '/map', component: map, name: "navigation.map" }, { path: '/message', component: message, name: "navigation.msg", hidden: true } ] }, //运行监测 { path: '/', component: Home, name: '', iconCls: 'iconfont icon-jiance', leaf: true,//只有一个节点 children: [ { path: '/detection', component: detection, name: "navigation.test" }, { path: '/detection/:id', component: maintenance, name: '运行检测详情', hidden: true } ] }, //项目管理 { path: '/', component: Home, name: "navigation.pro", iconCls: 'iconfont icon-ic_dashboard', children: [ { path: '/project', component: project, name: "navigation.proList" }, { path: '/project/:id', component: projectDetail, name: '项目详情', hidden: true }, { path: '/staff', component: staff, name: "navigation.staff" }, { path: '/competence', component: competence, name: "navigation.power" } ] }, //模具管理 { path: '/', component: Home, name: "navigation.mold", iconCls: 'iconfont icon-moxing', children: [ { path: '/moldList', component: moldList, name: "navigation.moldList" }, { path: '/moldList/:id/:type', component: moldDetail, name: '模具详情', hidden: true }, { path: '/moldDownload', component: moldDownload, name: "navigation.moldDown" } ] }, //基础管理 { path: '/', component: Home, name: "navigation.base", iconCls: 'iconfont icon-setting-fill', children: [ { path: '/comp', component: comp, name: "navigation.asset" }, { path: '/factory', component: factory, name: "navigation.producer" }, { path: '/allocation', component: allocation, name: "navigation.device" } ] }, //邀请 { path: '/invite/:inviteeId/:projectId/:operatorId', component: invite, name: '邀请', hidden: true }, { path: '/404', component: NotFound, name: '', hidden: true }, { path: '*', hidden: true, redirect: { path: '/404' } } ]; export default routes;