diff --git a/public/react/src/modules/courses/coursesPublic/AccessoryModal.js b/public/react/src/modules/courses/coursesPublic/AccessoryModal.js index 26d4499aa..72512be43 100644 --- a/public/react/src/modules/courses/coursesPublic/AccessoryModal.js +++ b/public/react/src/modules/courses/coursesPublic/AccessoryModal.js @@ -17,7 +17,8 @@ class AccessoryModal extends Component{ ModalSave:"", loadtype:false, updatas:false, - shixunsreplace:false + shixunsreplace:false, + Errormessage:false, } } @@ -41,7 +42,10 @@ class AccessoryModal extends Component{ // for(var list of fileList ){ // console.log(fileList) // } - this.setState({ fileList }); + this.setState({ + fileList:fileList, + Errormessage:false, + }); } onAttachmentRemove = (file) => { @@ -121,10 +125,23 @@ class AccessoryModal extends Component{ if (newfileList.length == 0) { // this.props.showNotification('请先上传附件') - this.setState({ - shixunsreplace:true, - }) + if(this.props.modalname === "补交附件"){ + this.setState({ + Errormessage:true, + shixunsreplace:false, + }) + }else{ + this.setState({ + shixunsreplace:true, + Errormessage:false, + }) + } return; + }else{ + this.setState({ + shixunsreplace:false, + Errormessage:false, + }) } let url= this.props.reviseAttachmentUrl || "/graduation_works/"+id+"/revise_attachment.json" @@ -326,6 +343,14 @@ class AccessoryModal extends Component{ border:'1px solid rgba(234,234,234,1)', padding: '10px' }}> + { + this.state.Errormessage && this.state.Errormessage === true ? +
+ 还未上传附件 +
+ : + + } {this.state.updatas===true?请上传附件:""}