diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js index 8abcc17b4..044d0a3ae 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js @@ -122,6 +122,11 @@ class GraduationTasksSubmitedit extends Component{ let fileList = info.fileList; this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) }); } + + if (info.file.status === 'done') { + let fileList = info.fileList; + this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) }); + } } //onAttachmentRemove = (file) => { diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js index 3a77600dc..ee0e98f16 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js @@ -117,10 +117,17 @@ class GraduationTasksSubmitnew extends Component{ } // 附件相关 START handleChange = (info) => { + debugger if (info.file.status === 'uploading') { let fileList = info.fileList; this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) }); } + + if (info.file.status === 'done') { + let fileList = info.fileList; + this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) }); + } + } onAttachmentRemove = (file) => { diff --git a/public/react/src/modules/tpm/newshixuns/Newshixuns.js b/public/react/src/modules/tpm/newshixuns/Newshixuns.js index 2533856db..b5054472c 100644 --- a/public/react/src/modules/tpm/newshixuns/Newshixuns.js +++ b/public/react/src/modules/tpm/newshixuns/Newshixuns.js @@ -160,6 +160,8 @@ function disabledDateTime() { // disabledSeconds: () => [0, 60], }; } + + class Newshixuns extends Component { constructor(props) { super(props) @@ -195,6 +197,10 @@ class Newshixuns extends Component { testcoderunmode:undefined, file:undefined, deleteisnot:true, + languagewritetype:false, + systemenvironmenttype:false, + testcoderunmodetype:false, + attachmentidstype:false } } @@ -502,8 +508,6 @@ class Newshixuns extends Component { } sendsure_apply = () => { let {languagewrite,systemenvironment,testcoderunmode} = this.state; - - // debugger // console.log("点击确定") // console.log("languagewrite"+languagewrite); // console.log("systemenvironment"+systemenvironment); @@ -516,21 +520,26 @@ class Newshixuns extends Component { // }) // } if(languagewrite === undefined || languagewrite === "" ){ - this.props.showNotification(`请填写该镜像是基于什么语言`); - + // this.props.showNotification(`请填写该镜像是基于什么语言`); + this.setState({ + languagewritetype:true + }) return } if(systemenvironment === undefined || systemenvironment === ""){ - this.props.showNotification(`请填写该镜像是基于什么语言系统环境`); - + // this.props.showNotification(`请填写该镜像是基于什么语言系统环境`); + this.setState({ + systemenvironmenttype:true + }) return; } if(testcoderunmode === undefined || testcoderunmode === "") { - this.props.showNotification(`请填写该镜像中测试代码运行方式`); - + // this.props.showNotification(`请填写该镜像中测试代码运行方式`); + this.setState({ + testcoderunmodetype:true + }) return; - } var attachment_ids=undefined; if (this.state.fileList) { @@ -538,17 +547,20 @@ class Newshixuns extends Component { return item.response ? item.response.id : item.id }) } - // debugger - if( attachment_ids === undefined || attachment_ids.length===0){ - notification.open( - { - message: '提示', - description: - '请上传附件!', + if( attachment_ids === undefined || attachment_ids.length===0){ - } - ) + // notification.open( + // { + // message: '提示', + // description: + // '请上传附件!', + // + // } + // ) + this.setState({ + attachmentidstype:true + }) return; } // console.log("attachment_ids"+attachment_ids); @@ -941,7 +953,7 @@ class Newshixuns extends Component { > {/*