|
@@ -5,6 +5,7 @@ import Main from './../views/Main.vue'
|
5
|
5
|
import Indes from './../views/indes.vue'//首页
|
6
|
6
|
import My from './../views/my.vue'//我的
|
7
|
7
|
import IncidentList from './../views/incidentList.vue'//事件列表
|
|
8
|
+import IncidentNewList from './../views/IncidentNewList.vue'//事件列表(new)
|
8
|
9
|
import WorkList from './../views/workList.vue'//上下班记录查看
|
9
|
10
|
import NewIncident from './../views/newIncident.vue'//新建事件
|
10
|
11
|
import Inspection from './../views/inspection.vue'//巡检列表
|
|
@@ -49,11 +50,11 @@ export default new Router({
|
49
|
50
|
beforeEnter:(to, from, next)=>{
|
50
|
51
|
console.log(from.fullPath);
|
51
|
52
|
console.log(to.fullPath);
|
52
|
|
- if(to.fullPath == '/main'){
|
|
53
|
+ if(to.fullPath == '/main' || to.fullPath == '/main/indes'){
|
53
|
54
|
let loginUser = JSON.parse(localStorage.getItem('loginUser'));
|
54
|
55
|
if(loginUser){
|
55
|
56
|
if(loginUser.role.some(v => v.rolecode == 'first-line support' || v.rolecode == 'second-line support')){
|
56
|
|
- next('/main/incidentList/todo/0');
|
|
57
|
+ next('/main/incidentNewList/todo/1544');
|
57
|
58
|
}else{
|
58
|
59
|
next('/main/indes');
|
59
|
60
|
}
|
|
@@ -66,7 +67,6 @@ export default new Router({
|
66
|
67
|
},
|
67
|
68
|
children: [{
|
68
|
69
|
path: '/',
|
69
|
|
- // redirect: '/main/incidentList/todo/0'
|
70
|
70
|
redirect: '/main/indes'
|
71
|
71
|
},
|
72
|
72
|
{
|
|
@@ -86,6 +86,15 @@ export default new Router({
|
86
|
86
|
children: []
|
87
|
87
|
},
|
88
|
88
|
{
|
|
89
|
+ path: '/main/incidentNewList/:type/:status/:isToday?',
|
|
90
|
+ name: 'IncidentNewList',
|
|
91
|
+ component: IncidentNewList,
|
|
92
|
+ meta: {
|
|
93
|
+ allowBack: false
|
|
94
|
+ },
|
|
95
|
+ children: []
|
|
96
|
+ },
|
|
97
|
+ {
|
89
|
98
|
path: '/main/workList/:type/:status',
|
90
|
99
|
name: 'WorkList',
|
91
|
100
|
component: WorkList,
|