|
|
|
@ -25,9 +25,11 @@ export class ExternalLinksPlanComponent implements OnInit {
|
|
|
|
|
showType; //预案类型 1:全景图
|
|
|
|
|
planData; //预案信息
|
|
|
|
|
|
|
|
|
|
unitId; |
|
|
|
|
async ngOnInit(): Promise<void> { |
|
|
|
|
await this.login(); //登录存储token
|
|
|
|
|
this.route.queryParams.subscribe((paramsData) => { |
|
|
|
|
if (paramsData.planId) { |
|
|
|
|
this.planId = paramsData.planId; |
|
|
|
|
this.http |
|
|
|
|
.get(`/api/PlanComponents/${this.planId}`) |
|
|
|
@ -103,6 +105,28 @@ export class ExternalLinksPlanComponent implements OnInit {
|
|
|
|
|
this.handleData(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} else if (paramsData.unitId) { |
|
|
|
|
this.http |
|
|
|
|
.get(`/api/Companies/${paramsData.unitId}`) |
|
|
|
|
.subscribe((data: any) => { |
|
|
|
|
console.log("单位信息", data); |
|
|
|
|
sessionStorage.setItem("editable", "0"); |
|
|
|
|
sessionStorage.setItem("companyName", data.name); |
|
|
|
|
sessionStorage.setItem("companyId", data.id); |
|
|
|
|
sessionStorage.setItem( |
|
|
|
|
data.id, |
|
|
|
|
JSON.stringify(data.companyIntegrityScore) |
|
|
|
|
); |
|
|
|
|
let queryParams = { |
|
|
|
|
id: data.id, |
|
|
|
|
usci: data.usci, |
|
|
|
|
}; |
|
|
|
|
this.unitId = paramsData.unitId; |
|
|
|
|
this.router.navigate([`/linksPlan`], { |
|
|
|
|
queryParams: queryParams, |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|