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

@ -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,12 +72,17 @@ class Osshackathon extends Component {
}
PaginationTask=(pageNumber)=>{
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)=>{
//管理员编辑title
@ -126,6 +131,10 @@ class Osshackathon extends Component {
}
editSignupentry=(id,name,description)=>{
let {hackathonedit}=this.state;
if(hackathonedit===true){
this.props.showNotification(`请先保存或者关闭编辑状态`);
}else{
// 管理员编辑项目
this.setState({
Osshackathonmodeltype:true
@ -145,6 +154,8 @@ class Osshackathon extends Component {
}
}
}
hideeditSignupentry=(id)=>{
// 管理员取消项目
this.setState({
@ -155,6 +166,10 @@ class Osshackathon extends Component {
delSignupentry=(id)=>{
// 管理员删除项目
let {hackathonedit}=this.state;
if(hackathonedit===true){
this.props.showNotification(`请先保存或者关闭编辑状态`);
}else {
this.props.confirm({
content: `是否确认删除该项目?`,
onOk: () => {
@ -162,6 +177,7 @@ class Osshackathon extends Component {
}
})
}
}
delSignupentrys=(id)=>{
let url=`/osshackathon/${id}.json`;
axios.delete(url)
@ -180,6 +196,10 @@ class Osshackathon extends Component {
onsearchvalue=(value)=>{
let {hackathonedit}=this.state;
if(hackathonedit===true){
this.props.showNotification(`请先保存或者关闭编辑状态`);
}else {
this.setState({
search:value
})
@ -190,6 +210,8 @@ class Osshackathon extends Component {
this.getosshackathon(page,limit,value)
}
}
onsetsearchvalue=(e)=>{
this.setState({
@ -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