From 9c7c21e8eacda173feb418bdfe739f7f97358233 Mon Sep 17 00:00:00 2001 From: liuwh <hugeinfo123> Date: Sun, 29 Mar 2020 17:28:46 +0800 Subject: [PATCH] bug修复 --- SunshineIns/src/page/ApplyForEdit.jsx | 22 +++++++++------------- 1 files changed, 9 insertions(+), 13 deletions(-) diff --git a/SunshineIns/src/page/ApplyForEdit.jsx b/SunshineIns/src/page/ApplyForEdit.jsx index 7589c31..66dbb56 100644 --- a/SunshineIns/src/page/ApplyForEdit.jsx +++ b/SunshineIns/src/page/ApplyForEdit.jsx @@ -69,7 +69,7 @@ }, disabled: res.status ? true : false, loading: false, - fileList: res.list ? res.list.map((item, index) => ({ uid: index, id:item.id, name:item.name, status:'done', url: domain + `/api/v1/attachment/download/${item.id}?online=false` })):[] + fileList: res.list ? res.list.map((item, index) => ({ uid: item.uid, id: item.uid, name: item.name, status: 'done', url: domain + `/api/v1/attachment/download/${item.uid}?online=false` })) : [] }); }) @@ -241,8 +241,9 @@ this.setState({ fileList }); }, fileList: fileList, - onDownload:(file)=>{ - Fetch.attachmentDownload(file.id) + onDownload: (file) => { + console.log(file) + Fetch.attachmentDownload(file.uid) .then(res => { message.success("下载成功!"); }); @@ -294,20 +295,15 @@ </div> { - savedate.status == 2 || savedate.status == 99 ? + savedate.status ? <div style={{ display: 'flex', justifyContent: 'center' }}> <Button style={{ marginLeft: '15px', width: '150px' }} onClick={this.cancle}>返回</Button> </div> : - savedate.status == 1 ? - <div style={{ display: 'flex', justifyContent: 'center' }}> - <Button style={{ marginRight: '15px', width: '150px' }} type="primary" onClick={this.showModal}>结束任务</Button> - <Button style={{ marginLeft: '15px', width: '150px' }} onClick={this.cancle}>返回</Button> - </div> : - <div style={{ display: 'flex', justifyContent: 'center' }}> - <Button style={{ marginRight: '15px', width: '150px' }} type="primary" onClick={this.submit}>提交</Button> - <Button style={{ marginLeft: '15px', width: '150px' }} onClick={this.cancle}>返回</Button> - </div> + <div style={{ display: 'flex', justifyContent: 'center' }}> + <Button style={{ marginRight: '15px', width: '150px' }} type="primary" onClick={this.submit}>提交</Button> + <Button style={{ marginLeft: '15px', width: '150px' }} onClick={this.cancle}>返回</Button> + </div> } </BusDetailView> -- Gitblit v1.8.0