issues25489
杨树明 6 years ago
parent c46cd373b0
commit 64b0e8a242

@ -273,7 +273,7 @@ class OneSelfOrderModal extends Component{
render(){ render(){
let {group_ids,endtime,course_groups}=this.state; 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; let course_groupstype=course_groups===undefined||course_groups.length===0;
// TODO course_groups为空时的处理 // TODO course_groups为空时的处理
return( return(

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

Loading…
Cancel
Save