Browse Source

[完善]六熟悉页面

tianjin
邵佳豪 2 years ago
parent
commit
9845869c3c
  1. 7
      src/app/plan-management/entry-plan-look/entry-plan-look.component.ts
  2. 2
      src/app/plan-management/entry-plan-look/six-familiarize/six-familiarize.component.html
  3. 15
      src/app/plan-management/entry-plan-look/six-familiarize/six-familiarize.component.ts
  4. 4
      src/app/plan-management/six-familiarity/six-familiarity.component.html
  5. 7
      src/app/plan-management/six-familiarity/six-familiarity.component.ts

7
src/app/plan-management/entry-plan-look/entry-plan-look.component.ts

@ -155,7 +155,12 @@ export class EntryPlanLookComponent implements OnInit {
console.log(element); console.log(element);
const dialogRef = this.dialog.open(SixFamiliarizeComponent, { const dialogRef = this.dialog.open(SixFamiliarizeComponent, {
width: "700px", 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) => { dialogRef.afterClosed().subscribe((result) => {

2
src/app/plan-management/entry-plan-look/six-familiarize/six-familiarize.component.html

@ -8,7 +8,7 @@
</div> </div>
<div> <div>
<span class="name">人员数量:</span> <span class="name">人员数量:</span>
<input [disabled]="!isEditMode" name="memberCount" [(ngModel)]="memberCount" nz-input <input type="number" [disabled]="!isEditMode" name="memberCount" [(ngModel)]="memberCount" nz-input
placeholder="人员数量" /> placeholder="人员数量" />
</div> </div>
<div> <div>

15
src/app/plan-management/entry-plan-look/six-familiarize/six-familiarize.component.ts

@ -35,7 +35,7 @@ export class SixFamiliarizeComponent implements OnInit {
this.http this.http
.get("/api/SixFamiliars", { .get("/api/SixFamiliars", {
params: { params: {
PlanComponentId: this.data.planData.id, PlanComponentId: this.data.id,
}, },
}) })
.subscribe((data: any) => { .subscribe((data: any) => {
@ -74,7 +74,7 @@ export class SixFamiliarizeComponent implements OnInit {
this.isLoadingSave = true; this.isLoadingSave = true;
let body: any = { let body: any = {
planComponentId: this.data.planData.id, planComponentId: this.data.planData.id,
memberCount: this.memberCount, memberCount: Number(this.memberCount),
startTime: this.datePipe.transform(this.time[0], "yyyy-MM-ddTHH:mm:ss"), startTime: this.datePipe.transform(this.time[0], "yyyy-MM-ddTHH:mm:ss"),
endTime: this.datePipe.transform(this.time[1], "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 { } else {
body.id = this.familiarizeId; body.id = this.familiarizeId;
this.http this.http.put(`/api/SixFamiliars/${this.familiarizeId}`, body).subscribe(
.put(`/api/SixFamiliars/${this.familiarizeId}`, body) (data: any) => {
.subscribe((data: any) => {
this.isLoadingSave = false; this.isLoadingSave = false;
this.snackBar.open("保存成功", "确定", { this.snackBar.open("保存成功", "确定", {
verticalPosition: "top", verticalPosition: "top",
duration: 3000, duration: 3000,
}); });
this.dialogRef.close(); this.dialogRef.close();
}); },
(err) => {
this.isLoadingSave = false;
}
);
} }
} }
} }

4
src/app/plan-management/six-familiarity/six-familiarity.component.html

@ -1,4 +1,4 @@
<!-- <p>熟悉记录</p> --> <!-- <p>熟悉记录</p> -->
<div class="box"> <div class="box">
<div class="header"> <div class="header">
<form class="queryBox" (ngSubmit)="onSubmit()"> <form class="queryBox" (ngSubmit)="onSubmit()">
@ -8,7 +8,7 @@
</div> </div>
<div class="queryField"> <div class="queryField">
<span style="width: 108px;">单位名称:</span> <span style="width: 108px;">单位名称:</span>
<input name="name" nz-input placeholder="请输入单位名称" [(ngModel)]="companyname" /> <input name="companyname" nz-input placeholder="请输入单位名称" [(ngModel)]="companyname" />
</div> </div>
<div class="queryField" style="margin-right: 35px;"> <div class="queryField" style="margin-right: 35px;">
<span>组织机构:</span> <span>组织机构:</span>

7
src/app/plan-management/six-familiarity/six-familiarity.component.ts

@ -137,7 +137,12 @@ export class SixFamiliarityComponent implements OnInit {
let unitdata = {}; let unitdata = {};
this.dialog.open(SixFamiliarizeComponent, { this.dialog.open(SixFamiliarizeComponent, {
width: "700px", width: "700px",
data: { planData: element, unitdata: unitdata, isEditMode: false }, data: {
planData: element,
unitdata: unitdata,
isEditMode: false,
id: element.planComponentId,
},
}); });
} }

Loading…
Cancel
Save