Commit 15e05341 authored by wangqinghua's avatar wangqinghua

update

parent 9f998d12
......@@ -155,7 +155,7 @@
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12">
<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">
<textarea nz-input id="description" name="description" formControlName="description" placeholder="计划描述" [nzAutosize]="{ minRows: 2, maxRows: 6 }"></textarea>
</nz-form-control>
......@@ -166,7 +166,7 @@
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12">
<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-upload
[nzBeforeUpload]="beforeUpload"
......
......@@ -18,7 +18,8 @@ export class PlanModalComponent implements OnInit {
title;
isVisiable = false;
validateForm: FormGroup;
fileList: UploadFile[] = [];
fileList = [];
modalTitle;
participantsList = []; //参与人
......@@ -69,7 +70,7 @@ export class PlanModalComponent implements OnInit {
if (!isLt5M) {
this.message.error(' 文件必须小于5M!');
} else {
this.fileList.push(file);
this.fileList[0] = file;
}
return false;
};
......@@ -85,6 +86,14 @@ export class PlanModalComponent implements OnInit {
this.isVisiable = true;
this.workSer.findPlan(id).subscribe(
(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);
}
)
......@@ -145,8 +154,8 @@ export class PlanModalComponent implements OnInit {
this.fileList.forEach((file: any) => {
formData.append('file', file);
});
this.validateForm.value.id = this.planId;
formData.append('json', JSON.stringify(this.validateForm.value));
formData.append('id', this.planId);
this.workSer.updatePlan(formData).subscribe(
(res) => {
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