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