diff --git a/src/app/plan-management/plan-deduction/plan-deduction.component.ts b/src/app/plan-management/plan-deduction/plan-deduction.component.ts index 2c26496..380fbba 100644 --- a/src/app/plan-management/plan-deduction/plan-deduction.component.ts +++ b/src/app/plan-management/plan-deduction/plan-deduction.component.ts @@ -134,26 +134,36 @@ export class PlanDeductionComponent implements OnInit { if (data) { console.log("创建成功", data); this.onSubmit(); - // this.route.snapshot.queryParams.id = data.planId - // this.planId = data.planId; - // this.getAllPlanComponents(); - // if (data.planMode == 2) { - // //如果添加方式为在线编辑 - // sessionStorage.setItem("planId", data.id); - // sessionStorage.setItem("companyId", this.companyId); - // sessionStorage.setItem("buildingTypeId", this.unittypeId); - // sessionStorage.setItem("editable", "1"); - // let companyId = sessionStorage.getItem("companyId"); - // window.open( - // `/keyUnit/editunitinfo?id=${companyId}&orName=${this.route.snapshot.queryParams.orName}&orId=${this.route.snapshot.queryParams.orId}` - // ); - // } + sessionStorage.setItem("planId", data.id); + sessionStorage.setItem("companyId", data.plan.companyId); + sessionStorage.setItem( + "buildingTypeId", + data.plan.company.buildingTypes[0].id + ); + sessionStorage.setItem("editable", "1"); + let orId = data.plan.company.organizationId; + let orName = data.plan.company.organizationName; + window.open( + `/keyUnit/editunitinfo?id=${data.plan.company.id}&orName=${orName}&orId=${orId}` + ); } }); } look(element) { console.log(element); + sessionStorage.setItem("planId", element.id); + sessionStorage.setItem("companyId", element.companyId); + sessionStorage.setItem( + "buildingTypeId", + element.company.buildingTypes[0].id + ); + sessionStorage.setItem("editable", "1"); + let orId = element.company.organizationId; + let orName = element.company.organizationName; + window.open( + `/keyUnit/editunitinfo?id=${element.companyId}&orName=${orName}&orId=${orId}` + ); } delete(element) {