diff --git a/src/components/Main.vue b/src/components/Main.vue
index fd75131..80606b6 100644
--- a/src/components/Main.vue
+++ b/src/components/Main.vue
@@ -1,27 +1,29 @@
-
-
-
+
+
+
水质监测平台
-
+
更改密码
-
- 登出
-
+ 登出
-
-
+
-
+
主页
@@ -29,7 +31,9 @@
- 详细数据
+
+ 详细数据
+
图形分析
@@ -37,84 +41,90 @@
后台管理
-
-
-
+
+
-
-
-
+
@@ -126,11 +136,10 @@ export default {
.ant-layout-content {
height: calc(100vh - 110px);
}
-.w-title{
- color: white;
- line-height: 50px;
- font-size: 24px;
- font-weight: 600;
-
+.w-title {
+ color: white;
+ line-height: 50px;
+ font-size: 24px;
+ font-weight: 600;
}
\ No newline at end of file
diff --git a/src/utils/router.js b/src/utils/router.js
index 59d388f..ccd9b29 100644
--- a/src/utils/router.js
+++ b/src/utils/router.js
@@ -4,8 +4,16 @@ import Index from '@/components/Main'
import Login from '@/components/Login'
import store from './store'
import { setAuth } from './http'
+
Vue.use(Router)
+const funcRoutes = [
+ { path:'map-layout', name:'map-layout', component: ()=>import(/* webpackChunkName: "map-layout" */ '@/components/map/Index' ) },
+ { path:'detail-search', name:'detail-search', component: ()=>import(/* webpackChunkName: "detail-search" */ '@/components/search/Index' ) },
+ { path:'admin', name:'admin', component: ()=>import(/* webpackChunkName: "admin" */ '@/components/admin/Index' ) },
+ { path:'analysis', name:'analysis', component: ()=>import(/* webpackChunkName: "analysis" */ '@/components/analysis/Index' ) },
+]
+
const routes = [
{
path: '/',
@@ -14,7 +22,8 @@ const routes = [
{
path: '/index',
name: 'index',
- component: Index,
+ component: () => import(/* webpackChunkName: "index" */ '@/components/Main'),
+ children: funcRoutes,
meta: {
requireAuth: true
}