|
@@ -47,27 +47,26 @@ export default new Router({
|
47
|
47
|
component: Main,
|
48
|
48
|
name: '',
|
49
|
49
|
hidden: true,
|
50
|
|
- beforeEnter:(to, from, next)=>{
|
51
|
|
- console.log(from.fullPath);
|
52
|
|
- console.log(to.fullPath);
|
53
|
|
- if(to.fullPath == '/main' || to.fullPath == '/main/indes'){
|
54
|
|
- let loginUser = JSON.parse(localStorage.getItem('loginUser'));
|
55
|
|
- if(loginUser){
|
56
|
|
- if(loginUser.role.some(v => v.rolecode == 'first-line support' || v.rolecode == 'second-line support')){
|
57
|
|
- next('/main/incidentNewList/todo/1544');
|
|
50
|
+ children: [{
|
|
51
|
+ path: '/',
|
|
52
|
+ beforeEnter:(to, from, next)=>{
|
|
53
|
+ console.log(from.fullPath);
|
|
54
|
+ console.log(to.fullPath);
|
|
55
|
+ if(to.fullPath == '/main'){
|
|
56
|
+ let loginUser = JSON.parse(localStorage.getItem('loginUser'));
|
|
57
|
+ if(loginUser){
|
|
58
|
+ if(loginUser.role.some(v => v.rolecode == 'first-line support' || v.rolecode == 'second-line support')){
|
|
59
|
+ next('/main/incidentNewList/todo/1544');
|
|
60
|
+ }else{
|
|
61
|
+ next('/main/indes');
|
|
62
|
+ }
|
58
|
63
|
}else{
|
59
|
64
|
next('/main/indes');
|
60
|
65
|
}
|
61
|
66
|
}else{
|
62
|
|
- next();
|
|
67
|
+ next('/main/indes');
|
63
|
68
|
}
|
64
|
|
- }else{
|
65
|
|
- next();
|
66
|
|
- }
|
67
|
|
- },
|
68
|
|
- children: [{
|
69
|
|
- path: '/',
|
70
|
|
- redirect: '/main/indes'
|
|
69
|
+ },
|
71
|
70
|
},
|
72
|
71
|
{
|
73
|
72
|
path: '/main/indes',
|