From ddf28910ddca3aff54670a248ce9a41ba68c5e7a Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Wed, 12 Jul 2023 10:18:49 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E5=88=9B=E5=BB=BA=E6=8E=A8?= =?UTF-8?q?=E6=BC=94=E9=A2=84=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plan-deduction.component.ts | 38 ++++++++++++------- 1 file changed, 24 insertions(+), 14 deletions(-) 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) {