|
|
|
@ -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>
|
|
|
|
|
|
|
|
|
|