From 9845869c3ca85ced180ba80ba1f71a96ef0225c6 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Mon, 3 Jul 2023 15:21:23 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E5=85=AD=E7=86=9F=E6=82=89?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entry-plan-look/entry-plan-look.component.ts | 7 ++++++- .../six-familiarize.component.html | 2 +- .../six-familiarize/six-familiarize.component.ts | 15 +++++++++------ .../six-familiarity.component.html | 4 ++-- .../six-familiarity/six-familiarity.component.ts | 7 ++++++- 5 files changed, 24 insertions(+), 11 deletions(-) diff --git a/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts b/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts index ed394a0..206ade4 100644 --- a/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts +++ b/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts @@ -155,7 +155,12 @@ export class EntryPlanLookComponent implements OnInit { console.log(element); const dialogRef = this.dialog.open(SixFamiliarizeComponent, { width: "700px", - data: { planData: element, unitdata: this.unitdata, isEditMode: true }, + data: { + planData: element, + unitdata: this.unitdata, + isEditMode: true, + id: element.id, + }, }); dialogRef.afterClosed().subscribe((result) => { diff --git a/src/app/plan-management/entry-plan-look/six-familiarize/six-familiarize.component.html b/src/app/plan-management/entry-plan-look/six-familiarize/six-familiarize.component.html index 3d7a77a..0841fbe 100644 --- a/src/app/plan-management/entry-plan-look/six-familiarize/six-familiarize.component.html +++ b/src/app/plan-management/entry-plan-look/six-familiarize/six-familiarize.component.html @@ -8,7 +8,7 @@
人员数量: -
diff --git a/src/app/plan-management/entry-plan-look/six-familiarize/six-familiarize.component.ts b/src/app/plan-management/entry-plan-look/six-familiarize/six-familiarize.component.ts index bc2796b..497c1c3 100644 --- a/src/app/plan-management/entry-plan-look/six-familiarize/six-familiarize.component.ts +++ b/src/app/plan-management/entry-plan-look/six-familiarize/six-familiarize.component.ts @@ -35,7 +35,7 @@ export class SixFamiliarizeComponent implements OnInit { this.http .get("/api/SixFamiliars", { params: { - PlanComponentId: this.data.planData.id, + PlanComponentId: this.data.id, }, }) .subscribe((data: any) => { @@ -74,7 +74,7 @@ export class SixFamiliarizeComponent implements OnInit { this.isLoadingSave = true; let body: any = { planComponentId: this.data.planData.id, - memberCount: this.memberCount, + memberCount: Number(this.memberCount), startTime: this.datePipe.transform(this.time[0], "yyyy-MM-ddTHH:mm:ss"), endTime: this.datePipe.transform(this.time[1], "yyyy-MM-ddTHH:mm:ss"), }; @@ -91,16 +91,19 @@ export class SixFamiliarizeComponent implements OnInit { }); } else { body.id = this.familiarizeId; - this.http - .put(`/api/SixFamiliars/${this.familiarizeId}`, body) - .subscribe((data: any) => { + this.http.put(`/api/SixFamiliars/${this.familiarizeId}`, body).subscribe( + (data: any) => { this.isLoadingSave = false; this.snackBar.open("保存成功", "确定", { verticalPosition: "top", duration: 3000, }); this.dialogRef.close(); - }); + }, + (err) => { + this.isLoadingSave = false; + } + ); } } } diff --git a/src/app/plan-management/six-familiarity/six-familiarity.component.html b/src/app/plan-management/six-familiarity/six-familiarity.component.html index 0516ad4..3662516 100644 --- a/src/app/plan-management/six-familiarity/six-familiarity.component.html +++ b/src/app/plan-management/six-familiarity/six-familiarity.component.html @@ -1,4 +1,4 @@ - +
@@ -8,7 +8,7 @@
单位名称: - +
组织机构: diff --git a/src/app/plan-management/six-familiarity/six-familiarity.component.ts b/src/app/plan-management/six-familiarity/six-familiarity.component.ts index 25905ec..9589e89 100644 --- a/src/app/plan-management/six-familiarity/six-familiarity.component.ts +++ b/src/app/plan-management/six-familiarity/six-familiarity.component.ts @@ -137,7 +137,12 @@ export class SixFamiliarityComponent implements OnInit { let unitdata = {}; this.dialog.open(SixFamiliarizeComponent, { width: "700px", - data: { planData: element, unitdata: unitdata, isEditMode: false }, + data: { + planData: element, + unitdata: unitdata, + isEditMode: false, + id: element.planComponentId, + }, }); }