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{ -