Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

issues25489
杨树林 5 years ago
commit 237345475f

@ -237,7 +237,7 @@ class OneSelfOrderModal extends Component{
})
return
}
arr.push(items.end_time)
arr.push(handleDateString(items.end_time))
}
}
})
@ -273,7 +273,7 @@ class OneSelfOrderModal extends Component{
render(){
let {group_ids,endtime,course_groups}=this.state;
console.log(this.props.modaltype)
// console.log(this.props.modaltype)
let course_groupstype=course_groups===undefined||course_groups.length===0;
// TODO course_groups为空时的处理
return(

@ -72,11 +72,16 @@ class Osshackathon extends Component {
}
PaginationTask=(pageNumber)=>{
this.setState({
page:pageNumber
})
let {page,limit,search}=this.state;
this.getosshackathon(pageNumber,limit,search)
let {hackathonedit}=this.state;
if(hackathonedit===true){
this.props.showNotification(`请先保存或者关闭编辑状态`);
}else {
this.setState({
page: pageNumber
})
let {page, limit, search} = this.state;
this.getosshackathon(pageNumber, limit, search)
}
}
hackathonedit=(id)=>{
@ -126,23 +131,29 @@ class Osshackathon extends Component {
}
editSignupentry=(id,name,description)=>{
// 管理员编辑项目
this.setState({
Osshackathonmodeltype:true
})
if(id===undefined){
this.setState({
modelid:undefined,
modelname:undefined,
modeldescription:undefined
})
let {hackathonedit}=this.state;
if(hackathonedit===true){
this.props.showNotification(`请先保存或者关闭编辑状态`);
}else{
this.setState({
modelid:id,
modelname:name,
modeldescription:description
})
// 管理员编辑项目
this.setState({
Osshackathonmodeltype:true
})
if(id===undefined){
this.setState({
modelid:undefined,
modelname:undefined,
modeldescription:undefined
})
}else{
this.setState({
modelid:id,
modelname:name,
modeldescription:description
})
}
}
}
hideeditSignupentry=(id)=>{
@ -155,12 +166,17 @@ class Osshackathon extends Component {
delSignupentry=(id)=>{
// 管理员删除项目
this.props.confirm({
content: `是否确认删除该项目?`,
onOk: () => {
this.delSignupentrys(id)
}
})
let {hackathonedit}=this.state;
if(hackathonedit===true){
this.props.showNotification(`请先保存或者关闭编辑状态`);
}else {
this.props.confirm({
content: `是否确认删除该项目?`,
onOk: () => {
this.delSignupentrys(id)
}
})
}
}
delSignupentrys=(id)=>{
let url=`/osshackathon/${id}.json`;
@ -180,14 +196,20 @@ class Osshackathon extends Component {
onsearchvalue=(value)=>{
this.setState({
search:value
})
if(value.length>300){
this.props.showNotification(`搜索字数大于300个字`);
let {hackathonedit}=this.state;
if(hackathonedit===true){
this.props.showNotification(`请先保存或者关闭编辑状态`);
}else {
this.setState({
search:value
})
if(value.length>300){
this.props.showNotification(`搜索字数大于300个字`);
}
let {page,limit,search}=this.state;
this.getosshackathon(page,limit,value)
}
let {page,limit,search}=this.state;
this.getosshackathon(page,limit,value)
}
onsetsearchvalue=(e)=>{
@ -240,7 +262,7 @@ class Osshackathon extends Component {
<Col span={3} className={"fr textright"}>
<div>
报名整<span className={"color-red"}>{data&&data.hackathon.hackathon_users_count}</span>
报名总<span className={"color-red"}>{data&&data.hackathon.hackathon_users_count}</span>
</div>
</Col>

Loading…
Cancel
Save