1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
| /*
| * @Author: Morpheus
| * @Date: 2021-04-30 14:12:09
| * @Last Modified by: Morpheus
| * @Last Modified time: 2022-07-14 18:28:34
| */
|
| import Vue from 'vue'
| import VueRouter from 'vue-router'
| Vue.use(VueRouter)
|
| const lyout = () => import('../../views/lyout/index.vue')
| const home = () => import('../../views/home/index.vue')
| const manage = () => import('../../views/manage/index.vue')
| const monitor = () => import('../../views/monitor/index.vue')
| const weather = () => import('../../views/weather/index.vue')
|
| const routes = [
| {
| path: '/',
| redirect: '/lyout'
| },
| {
| path: '/lyout',
| redirect: '/lyout/home',
| meta: {
| title: '导航菜单'
| },
| component: lyout,
| children: [
| {
| path: 'home',
| meta: {
| title: '首页'
| },
| component: home
| },
| {
| path: 'monitor',
| meta: {
| title: '遥感监测'
| },
| component: monitor
| },
| {
| path: 'manage',
| meta: {
| title: '经营概况'
| },
| component: manage
| },
| {
| path: 'weather',
| meta: {
| title: '气象监测'
| },
| component: weather
| }]
| },
| {
| path: '/farmDetails',
| meta: {
| title: '农场详情'
| },
| component: () => import('../../views/farm/index.vue')
| },
| {
| path: '/equipmentDetails',
| meta: {
| title: '物联网设备总览'
| },
| component: () => import('../../views/equipment/index.vue')
| },
| {
| path: '/403',
| component: () =>
| import(/* webpackChunkName: "page" */ '@/components/error-page/403'),
| name: '403',
| meta: {
| title: '403页面'
| }
| },
| {
| path: '/404',
| component: () =>
| import(/* webpackChunkName: "page" */ '@/components/error-page/404'),
| name: '404',
| meta: {
| title: '404页面'
| }
|
| },
| {
| path: '/500',
| component: () =>
| import(/* webpackChunkName: "page" */ '@/components/error-page/500'),
| name: '500',
| meta: {
| title: '500页面'
| }
| },
| {
| path: '*',
| redirect: '/404'
| }
|
| ]
|
| const router = new VueRouter({
| base: process.env.BASE_URL,
| routes
| })
|
| export default router
|
|