智慧农业大数据平台
xiebin
2022-11-16 3dc278f10a4c3e3db7ce3a445bed710bdc88916e
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/*
 * @Author: Morpheus
 * @Date: 2021-04-30 14:12:09
 * @Last Modified by: Morpheus
 * @Last Modified time: 2022-07-29 09:15:23
 */
 
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: '/v',
        name: 'v',
        component: resolve => require(['../../views/v/index.vue'], resolve),
        meta: {
            title: 'v',
            isAuth: false
        }
    },
    {
        path: '/',
        redirect: '/lyout'
    },
    {
        path: '/login',
        name: 'login',
        component: resolve => require(['../../views/login/index.vue'], resolve),
        meta: {
            title: '登录页',
            isAuth: false
        }
    },
    {
        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页面',
            isAuth: false
        }
    },
    {
        path: '/404',
        component: () =>
            import(/* webpackChunkName: "page" */ '@/components/error-page/404'),
        name: '404',
        meta: {
            title: '404页面',
            isAuth: false
        }
 
    },
    {
        path: '/500',
        component: () =>
            import(/* webpackChunkName: "page" */ '@/components/error-page/500'),
        name: '500',
        meta: {
            title: '500页面',
            isAuth: false
        }
    },
    {
        path: '*',
        redirect: '/404',
        isAuth: false
    }
 
]
 
const router = new VueRouter({
    base: process.env.BASE_URL,
    routes
})
 
export default router