Browse Source

检查员路由

非煤矿山灾害智能感知和预警系统
jingbowen 2 years ago
parent
commit
cd6d50ad7c
  1. 13
      src/app/home/basic-info/unit-details/unit-details.component.ts
  2. 6
      src/app/home/task/task.component.html
  3. 15
      src/app/home/task/task.component.ts

13
src/app/home/basic-info/unit-details/unit-details.component.ts

@ -326,20 +326,7 @@ export class UnitDetailsComponent implements OnInit {
}
handleChange(info: NzUploadChangeParam): void { // 点击事件 - 附件上传回调
console.log('[点击事件] - 附件上传');
console.log(info);
if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList);
}
if (info.file.status === 'done') {
this.message.success(`${info.file.name} file uploaded successfully`);
} else if (info.file.status === 'error') {
this.message.error(`${info.file.name} file upload failed.`);
}
}
listOfData: any[] = [];
listOfData2: any[] = [];

6
src/app/home/task/task.component.html

@ -10,7 +10,7 @@
工作审批
</li>
</ul>
<ul *ngIf="level == 'battalion'">
<ul *ngIf="level == 'battalion' && !user">
<li [routerLink]="['/task/monthlytaskoverview']" routerLinkActive="router-link-active">
<i nz-icon nzType="appstore" nzTheme="outline"></i>
月度任务总览
@ -24,7 +24,7 @@
本级计划
</li>
</ul>
<ul *ngIf="level == 'squadron'">
<ul *ngIf="level == 'squadron' || user">
<li [routerLink]="['/task/taskexecution']" routerLinkActive="router-link-active">
<i nz-icon nzType="file-protect" nzTheme="outline"></i>
任务执行
@ -33,7 +33,7 @@
<i nz-icon nzType="file-text" nzTheme="outline"></i>
任务申请
</li>
<li [routerLink]="['/task/weeklyplan']" routerLinkActive="router-link-active">
<li *ngIf="level=='squadron'" [routerLink]="['/task/weeklyplan']" routerLinkActive="router-link-active">
<i nz-icon nzType="container" nzTheme="outline"></i>
生成周计划
</li>

15
src/app/home/task/task.component.ts

@ -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'])
}
}
}
}

Loading…
Cancel
Save