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
|
import Vue from 'vue'
import Router from 'vue-router'
import Layout from './layout/index.vue'
Vue.use(Router)
const originalPush = Router.prototype.push
// 修改原型对象中的push方法(解决报错NavigationDuplicated: Avoided redundant navigation to current location)
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
export default new Router({
// mode: 'history',
base: process.env.BASE_URL,
routes: [
{
path: '/',
name: 'login',
title: '登录',
component: () => import('@/views/login/index')
},
{
path: '/range',
name: 'layout',
component: Layout,
redirect: '/range/home',
children: [
{
path: 'home',
name: 'home',
title: '仪表盘',
component: () => import('@/views/home/index'),
meta: { requiresAuth: true } // 需要登录才能访问
},
{
path: 'menuSurrogateInformation',
name: 'menuSurrogateInformation',
title: '代理信息',
component: () => import('@/views/menuSurrogateInformation/index'),
meta: { requiresAuth: true } // 需要登录才能访问
},
{
path: 'menuMBGZ',
name: 'menuMBGZ',
title: '目标感知',
component: () => import('@/views/menuMBGZ/index'),
meta: { requiresAuth: true } // 需要登录才能访问
},
{
path: 'menuSysManagement',
name: 'menuSysManagement',
title: '系统管理',
component: () => import('@/views/menuSysManagement/index'),
meta: { requiresAuth: true } // 需要登录才能访问
},
{
path: 'menuTaskManagement',
name: 'menuTaskManagement',
title: '任务管理',
component: () => import('@/views/menuTaskManagement/index'),
meta: { requiresAuth: true } // 需要登录才能访问
},
{
path: 'menuSysIntroduce',
name: 'menuSysIntroduce',
title: '系统介绍',
component: () => import('@/views/menuSysIntroduce/index'),
meta: { requiresAuth: true } // 需要登录才能访问
},
{
path: 'menuTaskInfo',
name: 'menuTaskInfo',
title: '任务详情',
component: () => import('@/views/menuTaskInfo/index'),
meta: { requiresAuth: true } // 需要登录才能访问
},
{
path: 'menuMBZTGZ',
name: 'menuMBZTGZ',
title: '目标状态详情',
component: () => import('@/views/menuMBZTGZ/index'),
meta: { requiresAuth: true } // 需要登录才能访问
}
]
}
]
})
|