diff --git a/app/views/shixuns/add_file.json.jbuilder b/app/views/shixuns/add_file.json.jbuilder index 6f22dabc8..ca9583ab3 100644 --- a/app/views/shixuns/add_file.json.jbuilder +++ b/app/views/shixuns/add_file.json.jbuilder @@ -1,2 +1 @@ -json.content @content -json.path @path \ No newline at end of file +json.url "/shixuns/#{@shixun.identifier}/repository/master/shixun_show/#{@path}" \ No newline at end of file diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js index 5e3e64841..e6139bad6 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js @@ -103,14 +103,16 @@ class GraduationTasksedit extends Component{ } // 附件相关 START handleChange = (info) => { - let fileList = info.fileList; - // console.log(fileList) - // for(var list of fileList ){ - // console.log(fileList) - // } - this.setState({ - fileList: appendFileSizeToUploadFileAll(fileList), - }); + if(info.file.status == "done" || info.file.status == "uploading"){ + let fileList = info.fileList; + // console.log(fileList) + // for(var list of fileList ){ + // console.log(fileList) + // } + this.setState({ + fileList: appendFileSizeToUploadFileAll(fileList), + }); + } } // onAttachmentRemove = (file) => {