竞赛调整

dev_auth
杨树明 5 years ago
parent 7bb4240cae
commit ca86bb675a

@ -76,7 +76,7 @@ class CompetitionsIndex extends Component{
<div> <div>
<div className="clearfix"> <div className="clearfix">
<div> <div>
<div className="newMain clearfix"> <div className="clearfix">
<style> <style>
{ {
` `
@ -117,7 +117,7 @@ class CompetitionsIndex extends Component{
</div> </div>
</div> </div>
<div className={"educontent clearfix mtf10 CompetitionsIndex "}> <div className={"educontent clearfix mtf10 CompetitionsIndex mb20"}>
{datas===undefined?"":datas.length===0?"":<List {datas===undefined?"":datas.length===0?"":<List
itemLayout="vertical" itemLayout="vertical"
@ -199,13 +199,13 @@ class CompetitionsIndex extends Component{
} }
/>} />}
{datas===undefined?"":datas.task_count >20 ?<div className="mb40 edu-txt-center padding20-30" {count===undefined?"":count >15 ?<div className="mb40 edu-txt-center padding20-30"
> >
<Pagination <Pagination
showQuickJumper showQuickJumper
defaultCurrent={1} defaultCurrent={1}
pageSize={20} pageSize={15}
total={count===undefined?"":count} total={count===undefined?"":count}
current={page} current={page}
onChange={this.PaginationCourse} onChange={this.PaginationCourse}

@ -50,7 +50,7 @@ class CompetitionCommon extends Component{
if(response.status===200){ if(response.status===200){
this.setState({ this.setState({
data:response.data, data:response.data,
thiskeys:response.data.competition_modules[0].position thiskeys:response.data.competition_modules[0].id
}) })
this.getrightdata( this.getrightdata(
response.data.competition_modules[0].id, response.data.competition_modules[0].id,
@ -93,7 +93,7 @@ class CompetitionCommon extends Component{
}) })
data&&data.competition_modules.map((item,key)=>{ data&&data.competition_modules.map((item,key)=>{
if(item.module_type!="enroll") { if(item.module_type!="enroll") {
if (keys === item.position) { if (keys === item.id) {
this.getrightdata(item.id, item.module_type, item.module_url, item.has_url, listkey) this.getrightdata(item.id, item.module_type, item.module_url, item.has_url, listkey)
return return
} }
@ -327,11 +327,11 @@ class CompetitionCommon extends Component{
<Layout className={'teamsLayout mt40'}> <Layout className={'teamsLayout mt40'}>
<Sider> <Sider>
<Menu mode="inline" className="CompetitionMenu" defaultSelectedKeys={['1']} onClick={(e)=>this.getrightdatas(e)}> <Menu mode="inline" className="CompetitionMenu" defaultSelectedKeys={[`${this.state.thiskeys}`]} onClick={(e)=>this.getrightdatas(e)}>
{data&&data.competition_modules.map((item,key)=>{ {data&&data.competition_modules.map((item,key)=>{
if(item.module_type!="enroll"){ if(item.module_type!="enroll"){
return( return(
<Menu.Item key={item.position}> <Menu.Item key={item.id}>
{/*{item.has_url===false?<span*/} {/*{item.has_url===false?<span*/}
{/*// onClick={()=>this.getrightdata(item.id,item.module_type,item.module_url,item.has_url)}*/} {/*// onClick={()=>this.getrightdata(item.id,item.module_type,item.module_url,item.has_url)}*/}
{/*>{item.name}</span>:<a*/} {/*>{item.name}</span>:<a*/}

@ -297,10 +297,10 @@ class CompetitionContents extends Component{
<span className={"ranknames"}>您当前排名:{item.rank}</span> <span className={"ranknames"}>您当前排名:{item.rank}</span>
</Col> </Col>
<Col className="userranksclass" span={3} order={2}> <Col className="userranksclass" span={3} order={2}>
{item.user_name} {personal===undefined||personal===null?item.record_user_name:personal===true?item.user_name:item.team_name}
</Col> </Col>
<Col className="textleft" span={9} order={3}> <Col className="textleft" span={9} order={3}>
{item.team_name} {/*{item.team_name}*/}
</Col> </Col>
<Col span={3} order={4}> <Col span={3} order={4}>
{item.cost_time} {item.cost_time}

Loading…
Cancel
Save