|
|
|
@ -8,20 +8,31 @@ import { Router } from '@angular/router';
|
|
|
|
|
}) |
|
|
|
|
export class TaskComponent implements OnInit { |
|
|
|
|
level="" |
|
|
|
|
user=false |
|
|
|
|
constructor(private router: Router) { } |
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
console.log(JSON.parse(sessionStorage.getItem('userData'))); |
|
|
|
|
|
|
|
|
|
this.level=JSON.parse(sessionStorage.getItem('userData')).organizationLevel |
|
|
|
|
let user=JSON.parse(sessionStorage.getItem('userData')).name |
|
|
|
|
if(user.indexOf('检查') != -1){ |
|
|
|
|
this.user=true |
|
|
|
|
console.log(1); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if(this.router.url=="/task"){ |
|
|
|
|
if(this.level=="brigade"){ |
|
|
|
|
this.router.navigate(['/task/indicators']) |
|
|
|
|
}else if(this.level=="battalion"){ |
|
|
|
|
}else if(this.level=="battalion" && !this.user){ |
|
|
|
|
this.router.navigate(['/task/monthlytaskoverview']) |
|
|
|
|
}else if(this.level=="squadron"){ |
|
|
|
|
}else if(this.level=="squadron" || this.user){ |
|
|
|
|
this.router.navigate(['/task/taskexecution']) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|