diff --git a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js index 10db61e1b..a0486095e 100644 --- a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js +++ b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js @@ -80,6 +80,8 @@ class TraineetraininginformationModal extends Component { } render() { var columns; + console.log(83); + console.log(this.props.boolgalist); if(this.props.boolgalist&&this.props.boolgalist === true) { columns = [ { diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 294339b54..f43991599 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -625,7 +625,7 @@ submittojoinclass=(value)=>{ {/* />*/} {/* :""*/} {/*}*/} - + this.cancelModulationModels()} >
{/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/} diff --git a/public/react/src/modules/tpm/newshixuns/Newshixuns.js b/public/react/src/modules/tpm/newshixuns/Newshixuns.js index aa5b62a0a..3dca1ad2b 100644 --- a/public/react/src/modules/tpm/newshixuns/Newshixuns.js +++ b/public/react/src/modules/tpm/newshixuns/Newshixuns.js @@ -181,6 +181,7 @@ class Newshixuns extends Component { systemenvironment:undefined, testcoderunmode:undefined, file:undefined, + deleteisnot:true, } } @@ -547,7 +548,7 @@ class Newshixuns extends Component { // if (id) { if(this.state.file !== undefined){ console.log("549"); - this.deleteAttachment(this.state.file); + // this.deleteAttachment(this.state.file); this.setState({ file:undefined, languagewrite:"", @@ -579,7 +580,7 @@ class Newshixuns extends Component { }) if(this.state.file !== undefined){ console.log("580"); - this.deleteAttachment(this.state.file); + // this.deleteAttachment(this.state.file); this.setState({ file:undefined, languagewrite:"", @@ -655,7 +656,8 @@ class Newshixuns extends Component { handleChange = (info) => { console.log("handleChange1"); let fileList = info.fileList; - this.setState({ fileList }); + this.setState({ fileList:fileList, + deleteisnot:false}); } onAttachmentRemove = (file) => { confirm({ @@ -686,11 +688,13 @@ class Newshixuns extends Component { // console.log('--- success') this.setState((state) => { + const index = state.fileList.indexOf(file); const newFileList = state.fileList.slice(); newFileList.splice(index, 1); return { fileList: newFileList, + deleteisnot:true }; }); } @@ -736,7 +740,7 @@ class Newshixuns extends Component { render() { const { getFieldDecorator } = this.props.form; const thiss=this; - let {testcoderunmode ,systemenvironment,languagewrite, fileList,TimePickervalue, scope_partmenttype, opensmail, newshixunlist, name, scope_partment, departmentslist, postapplyvisible, sendsure_applyvalue, postapplytitle, shixun_nametype, main_types, trainee_types, SelectTheCommandtype, opers, operss, onSearchvalue} = this.state; + let {testcoderunmode ,systemenvironment,languagewrite,deleteisnot, fileList,TimePickervalue, scope_partmenttype, opensmail, newshixunlist, name, scope_partment, departmentslist, postapplyvisible, sendsure_applyvalue, postapplytitle, shixun_nametype, main_types, trainee_types, SelectTheCommandtype, opers, operss, onSearchvalue} = this.state; let options if (departmentslist != undefined) { options = this.state.departmentslist.map((d, k) => { @@ -764,7 +768,7 @@ class Newshixuns extends Component { } if(thiss.state.file !== undefined){ console.log("763") - thiss.deleteAttachment(thiss.state.file); + // thiss.deleteAttachment(thiss.state.file); thiss.setState({ file:file }) @@ -797,6 +801,7 @@ class Newshixuns extends Component { // return isLt50M; // }, // }; + return (
@@ -934,12 +939,23 @@ class Newshixuns extends Component { {/* rules:[{*/} {/* }]*/} {/* })(*/} - - - 上传附件 - (单个文件50M以内) + { + deleteisnot=== true? + + + 上传附件 + (单个文件50M以内) + + + : + + + 上传附件 + (单个文件50M以内) + + + } - {/* )*/} {/* }*/} {/**/}