diff --git a/public/react/src/modules/competitions/Competitimain/CompetitionsIndex.js b/public/react/src/modules/competitions/Competitimain/CompetitionsIndex.js index c037da990..da44920cf 100644 --- a/public/react/src/modules/competitions/Competitimain/CompetitionsIndex.js +++ b/public/react/src/modules/competitions/Competitimain/CompetitionsIndex.js @@ -131,15 +131,15 @@ class CompetitionsIndex extends Component{ {item.competition_status==="nearly_published"? this.props.current_user&&this.props.current_user.admin===true?"":this.props.current_user&&this.props.current_user.business===true?"":
即将发布 敬请期待
:""} {/*
即将发布 敬请期待
*/} - {item.description===null||item.description===undefined||item.description===""?:""} + {/*{item.description===null||item.description===undefined||item.description===""?:""}*/} 已结束 - : + :data.enroll_end_time data.competition_status==="progressing"?:""} diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionContents.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionContents.js index c3991e425..a49384f71 100644 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionContents.js +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionContents.js @@ -30,7 +30,7 @@ class CompetitionContents extends Component{ 编辑 :"":""}
- +
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionContentsChart.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionContentsChart.js index 61b050fa2..daa6a815e 100644 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionContentsChart.js +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionContentsChart.js @@ -98,11 +98,11 @@ class CompetitionContents extends Component{ {chart_rules.rule_contents.map((items,keys)=>{ if(item.id===items.competition_stage_id){ return( - + ) }else if(item.id===null&&items.competition_stage_id===0){ return( - + ) } })} diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionContentsMd.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionContentsMd.js index 6cd1ccafb..c4bb5bfcd 100644 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionContentsMd.js +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionContentsMd.js @@ -78,8 +78,11 @@ class CompetitionContentsMd extends Component{ } handleContentUploadChange = (info) => { - let contentFileList = info.fileList; - this.setState({ contentFileList: appendFileSizeToUploadFileAll(contentFileList) }); + if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { + let contentFileList = info.fileList; + this.setState({ contentFileList: appendFileSizeToUploadFileAll(contentFileList) }); + } + } onAttachmentRemove = (file, stateName) => { @@ -127,6 +130,10 @@ class CompetitionContentsMd extends Component{ handleSubmit = () => { let {contentFileList}=this.state; const mdContnet = this.contentMdRef.current.getValue().trim(); + if(mdContnet.length>10000){ + this.props.showNotification("内容超过10000个字"); + return + } let attachment_ids=undefined if(contentFileList!=undefined){ attachment_ids= contentFileList.map(item => { @@ -184,7 +191,7 @@ class CompetitionContentsMd extends Component{ console.log('beforeUpload', file.name); const isLt150M = file.size / 1024 / 1024 < 150; if (!isLt150M) { - message.error('文件大小必须小于150MB!'); + this.props.showNotification("文件大小必须小于150MB"); } return isLt150M; }, @@ -203,7 +210,7 @@ class CompetitionContentsMd extends Component{ })} :""} - {this.props.module_type==="chart"?"":