From 321e902baf12ed84acd2f0a23951cea5297f64a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 25 Jun 2019 16:22:36 +0800 Subject: [PATCH] =?UTF-8?q?=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/coursesPublic/SelectSetting.js | 2 +- .../tasks/GraduationTasksSubmitedit.js | 4 +- .../tasks/GraduationTasksSubmitnew.js | 40 ++++++- .../tasks/GraduationTasksappraise.js | 2 +- .../tasks/GraduationTaskssetting.js | 113 ++++++++---------- .../react/src/modules/forums/RightSection.css | 2 +- 6 files changed, 90 insertions(+), 73 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/SelectSetting.js b/public/react/src/modules/courses/coursesPublic/SelectSetting.js index 0bb06fccb..2b4b935ba 100644 --- a/public/react/src/modules/courses/coursesPublic/SelectSetting.js +++ b/public/react/src/modules/courses/coursesPublic/SelectSetting.js @@ -613,7 +613,7 @@ class Selectsetting extends Component{ {item.name} - {item.response===undefined?"":isNaN(this.props.bytesToSize(item.response.filesize))?"":this.props.bytesToSize(item.response.filesize)} + {item.response===undefined?"":isNaN(this.props.bytesToSize(item.response.filesize))?"123":this.props.bytesToSize(item.response.filesize)} - {item.response===undefined?"":isNaN(this.props.bytesToSize(item.response.filesize))?"":this.props.bytesToSize(item.response.filesize)} + {item.response===undefined?"":bytesToSize(item.size)} { - const url = `/attachments/${file.response ? file.response.id : file.uid}.json` + const url = `/attachments/${file}.json` axios.delete(url, { }) .then((response) => { @@ -446,7 +446,7 @@ render(){ multiple: true, // https://github.com/ant-design/ant-design/issues/15505 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 - // showUploadList: false, + showUploadList: false, action: `${getUrl()}/api/attachments.json`, onChange: this.handleChange, onRemove: this.onAttachmentRemove, @@ -545,7 +545,39 @@ render(){ (单个文件150M以内) - + + {this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{ + return( +
+ + + + + {item.name} + + + {item.response===undefined?"":bytesToSize(item.size)} + + this.onAttachmentRemove(item.response===undefined?"":item.response.id&&item.response.id)}> +
+ ) + })} + + diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js index f7f843feb..28955e268 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js @@ -258,7 +258,7 @@ class GraduationTasksappraise extends Component{ -