Commit 15e05341 authored by wangqinghua's avatar wangqinghua

update

parent 9f998d12
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
<div nz-row [nzGutter]="24"> <div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12"> <div nz-col [nzSpan]="12">
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="description">计划描述</nz-form-label> <nz-form-label [nzOffset]="4" [nzSpan]="6" nzFor="description">计划描述</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<textarea nz-input id="description" name="description" formControlName="description" placeholder="计划描述" [nzAutosize]="{ minRows: 2, maxRows: 6 }"></textarea> <textarea nz-input id="description" name="description" formControlName="description" placeholder="计划描述" [nzAutosize]="{ minRows: 2, maxRows: 6 }"></textarea>
</nz-form-control> </nz-form-control>
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
<div nz-row [nzGutter]="24"> <div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12"> <div nz-col [nzSpan]="12">
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="file">附件</nz-form-label> <nz-form-label [nzOffset]="4" [nzSpan]="6" nzFor="file">附件</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<nz-upload <nz-upload
[nzBeforeUpload]="beforeUpload" [nzBeforeUpload]="beforeUpload"
......
...@@ -18,7 +18,8 @@ export class PlanModalComponent implements OnInit { ...@@ -18,7 +18,8 @@ export class PlanModalComponent implements OnInit {
title; title;
isVisiable = false; isVisiable = false;
validateForm: FormGroup; validateForm: FormGroup;
fileList: UploadFile[] = []; fileList = [];
modalTitle; modalTitle;
participantsList = []; //参与人 participantsList = []; //参与人
...@@ -69,7 +70,7 @@ export class PlanModalComponent implements OnInit { ...@@ -69,7 +70,7 @@ export class PlanModalComponent implements OnInit {
if (!isLt5M) { if (!isLt5M) {
this.message.error(' 文件必须小于5M!'); this.message.error(' 文件必须小于5M!');
} else { } else {
this.fileList.push(file); this.fileList[0] = file;
} }
return false; return false;
}; };
...@@ -85,6 +86,14 @@ export class PlanModalComponent implements OnInit { ...@@ -85,6 +86,14 @@ export class PlanModalComponent implements OnInit {
this.isVisiable = true; this.isVisiable = true;
this.workSer.findPlan(id).subscribe( this.workSer.findPlan(id).subscribe(
(res)=>{ (res)=>{
res.data.number += "";
this.participantsList = res.data.participants;
this.principalsList = res.data.principals;
this.fileList = [
{
name: res.data.file,
}
]
this.validateForm.patchValue(res.data); this.validateForm.patchValue(res.data);
} }
) )
...@@ -145,8 +154,8 @@ export class PlanModalComponent implements OnInit { ...@@ -145,8 +154,8 @@ export class PlanModalComponent implements OnInit {
this.fileList.forEach((file: any) => { this.fileList.forEach((file: any) => {
formData.append('file', file); formData.append('file', file);
}); });
this.validateForm.value.id = this.planId;
formData.append('json', JSON.stringify(this.validateForm.value)); formData.append('json', JSON.stringify(this.validateForm.value));
formData.append('id', this.planId);
this.workSer.updatePlan(formData).subscribe( this.workSer.updatePlan(formData).subscribe(
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment