竞赛url 调整

dev_auth
杨树明 6 years ago
parent 5eff0cf1be
commit 60059a65b3

@ -960,7 +960,7 @@ class Registration extends React.Component {
<Breadcrumb separator=">"> <Breadcrumb separator=">">
<Breadcrumb.Item><Link to={"/competitions"}>在线竞赛</Link></Breadcrumb.Item> <Breadcrumb.Item><Link to={"/competitions"}>在线竞赛</Link></Breadcrumb.Item>
<Breadcrumb.Item><Link <Breadcrumb.Item><Link
to={`/competitions/${this.props.match.params.identifier}/common_header`}>{competition_name === undefined || competition_name === null || competition_name === "" ? "全国高校计算机大赛" : competition_name}</Link></Breadcrumb.Item> to={`/competitions/${this.props.match.params.identifier}`}>{competition_name === undefined || competition_name === null || competition_name === "" ? "全国高校计算机大赛" : competition_name}</Link></Breadcrumb.Item>
{/*<Breadcrumb.Item*/} {/*<Breadcrumb.Item*/}
{/* href={`/competitions/${this.props.match.params.identifier}/common_header`}></Breadcrumb.Item>*/} {/* href={`/competitions/${this.props.match.params.identifier}/common_header`}></Breadcrumb.Item>*/}
<Breadcrumb.Item>报名</Breadcrumb.Item> <Breadcrumb.Item>报名</Breadcrumb.Item>

@ -117,7 +117,7 @@ class CompetitionsIndex extends Component{
size="large" size="large"
dataSource={datas&&datas} dataSource={datas&&datas}
renderItem={(item,key) => ( renderItem={(item,key) => (
<a target="_blank" href={item.competition_status==="ended"?`/competitions/${item.identifier}/common_header`:item.competition_status==="nearly_published"?item.permission.editable==true?`/competitions/${item.identifier}/common_header`:null:item.competition_status==="progressing"?`/competitions/${item.identifier}/common_header`:null} <a target="_blank" href={item.competition_status==="ended"?`/competitions/${item.identifier}`:item.competition_status==="nearly_published"?item.permission.editable==true?`/competitions/${item.identifier}`:null:item.competition_status==="progressing"?`/competitions/${item.identifier}`:null}
className={item.competition_status==="ended"?"competitionstitlesshou":item.competition_status==="nearly_published"? className={item.competition_status==="ended"?"competitionstitlesshou":item.competition_status==="nearly_published"?
item.permission.editable==true?"competitionstitlesshou":"endedfont":"competitionstitlesshou"} item.permission.editable==true?"competitionstitlesshou":"endedfont":"competitionstitlesshou"}
> >
@ -175,7 +175,7 @@ class CompetitionsIndex extends Component{
title={<a className={item.competition_status==="ended"?"competitionstitlesshou":item.competition_status==="nearly_published"? title={<a className={item.competition_status==="ended"?"competitionstitlesshou":item.competition_status==="nearly_published"?
item.permission.editable==true?"competitionstitlesshou":"endedfont":"competitionstitlesshou"}> item.permission.editable==true?"competitionstitlesshou":"endedfont":"competitionstitlesshou"}>
<a target="_blank" className={"competitionstitles"} <a target="_blank" className={"competitionstitles"}
href={item.competition_status==="ended"?`/competitions/${item.identifier}/common_header`:item.competition_status==="nearly_published"? item.permission.editable==true?`/competitions/${item.identifier}/common_header`:null:item.competition_status==="progressing"?`/competitions/${item.identifier}/common_header`:null} href={item.competition_status==="ended"?`/competitions/${item.identifier}`:item.competition_status==="nearly_published"? item.permission.editable==true?`/competitions/${item.identifier}`:null:item.competition_status==="progressing"?`/competitions/${item.identifier}`:null}
>{item.name}{item.sub_title===null?"":`——${item.sub_title}`}</a> >{item.name}{item.sub_title===null?"":`——${item.sub_title}`}</a>
{/*<span>{item.sub_title===null?"":*/} {/*<span>{item.sub_title===null?"":*/}
{/*<Tag className="competitionsrelative" color="#87d068">{item.sub_title}</Tag>}*/} {/*<Tag className="competitionsrelative" color="#87d068">{item.sub_title}</Tag>}*/}

@ -3,7 +3,6 @@ import { Breadcrumb,Layout,Table, Divider, Tag,Badge,Tooltip} from 'antd';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import axios from 'axios'; import axios from 'axios';
import NoneData from "../../courses/shixunHomework/shixunHomework";
import './Competitionteams.css'; import './Competitionteams.css';
const { Content } = Layout; const { Content } = Layout;

@ -6,7 +6,6 @@ import {markdownToHTML,getImageUrl} from 'educoder';
import CompetitionContents from './CompetitionContents'; import CompetitionContents from './CompetitionContents';
import CompetitionContentsChart from './CompetitionContentsChart'; import CompetitionContentsChart from './CompetitionContentsChart';
import CompetitionContentsMd from './CompetitionContentsMd'; import CompetitionContentsMd from './CompetitionContentsMd';
import NoneData from "../../courses/shixunHomework/shixunHomework";
import './CompetitionCommon.css'; import './CompetitionCommon.css';

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import {Button,Layout} from 'antd'; import {Button,Layout} from 'antd';
import axios from 'axios'; import axios from 'axios';
import {markdownToHTML,getImageUrl,AttachmentList} from 'educoder'; import {markdownToHTML,getImageUrl,AttachmentList} from 'educoder';
import NoneData from "../../courses/shixunHomework/shixunHomework";
const { Header, Footer, Sider, Content } = Layout; const { Header, Footer, Sider, Content } = Layout;
class CompetitionContents extends Component{ class CompetitionContents extends Component{

@ -2,7 +2,6 @@ import React, { Component } from 'react';
import {Button,Layout,Tabs,Icon, Card, Avatar, Row, Col ,Table} from 'antd'; import {Button,Layout,Tabs,Icon, Card, Avatar, Row, Col ,Table} from 'antd';
import {markdownToHTML,getImageUrl} from 'educoder'; import {markdownToHTML,getImageUrl} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import NoneData from "../../courses/shixunHomework/shixunHomework";
const { Content } = Layout; const { Content } = Layout;
const { TabPane } = Tabs; const { TabPane } = Tabs;

@ -69,7 +69,7 @@ class Competitions extends Component {
/> />
{/*新版竞赛详情页面*/} {/*新版竞赛详情页面*/}
<Route path="/competitions/:identifier/common_header" <Route path="/competitions/:identifier"
render={ render={
(props) => (<CompetitionCommon {...this.props} {...props} {...this.state} />) (props) => (<CompetitionCommon {...this.props} {...props} {...this.state} />)
} }

@ -414,7 +414,7 @@ class ShixunhomeWorkItem extends Component{
{ {
discussMessage && discussMessage.upper_category_name && discussMessage && discussMessage.upper_category_name &&
<ConditionToolTip title={discussMessage.upper_category_name} condition={ discussMessage.upper_category_name.length > 22 }> <ConditionToolTip title={discussMessage.upper_category_name} condition={ discussMessage.upper_category_name.length > 22 }>
{ <div className=" color-grey9 task-hide fr" style={discussMessage.time_status===1||discussMessage.time_status===2||discussMessage.time_status===3||discussMessage.time_status===4||discussMessage.time_status===5||discussMessage.time_status===6?{"maxWidth":"268px"}:{"maxWidth":"550px"}} title={discussMessage.upper_category_name}>所属目录{discussMessage.upper_category_name}</div>} { <div className=" color-grey9 task-hide fr" style={discussMessage.time_status===1||discussMessage.time_status===2||discussMessage.time_status===3||discussMessage.time_status===4||discussMessage.time_status===5||discussMessage.time_status===6?{"maxWidth":"216px"}:{"maxWidth":"550px"}} title={discussMessage.upper_category_name}>所属目录{discussMessage.upper_category_name}</div>}
</ConditionToolTip> </ConditionToolTip>
} }

@ -67,8 +67,8 @@ class Dynamiclist extends Component{
<Col span={12} className={"top10s"}>Top 10</Col> <Col span={12} className={"top10s"}>Top 10</Col>
<Col span={12} className={"Statisticsliboxjsgz"}> <Col span={12} className={"Statisticsliboxjsgz"}>
<span className={"mr10"}>计算规则</span> <span className={"mr10"}>计算规则</span>
<Popover placement="bottom" content={content} trigger="hover"> <Popover placement="bottom" title={"活动规则计算说明"} content={content} trigger="hover">
<Icon type="exclamation-circle" /> <Icon type="info-circle" />
</Popover> </Popover>
</Col> </Col>
</Row> </Row>

@ -123,5 +123,9 @@
height: 30px; height: 30px;
font-size: 12px; font-size: 12px;
color: rgba(153,153,153,1); color: rgba(153,153,153,1);
line-height: 30px; line-height: 20px;
}
.Statisticsmxxy{
font-size: 16px;
margin-left:15px;
} }

@ -4,7 +4,9 @@ import { WordsBtn,on, off, trigger ,getImageUrl,sortDirections} from 'educoder';
import axios from'axios'; import axios from'axios';
import Dropdownbox from './Dropdownbox'; import Dropdownbox from './Dropdownbox';
import Dynamiclist from './Dynamiclist'; import Dynamiclist from './Dynamiclist';
import NoneData from "../../courses/coursesPublic/NoneData";
import './Statistics.css'; import './Statistics.css';
const { TabPane } = Tabs; const { TabPane } = Tabs;
class Statistics extends Component{ class Statistics extends Component{
constructor(props){ constructor(props){
@ -56,12 +58,13 @@ class Statistics extends Component{
course_groups:result.data.course_groups course_groups:result.data.course_groups
}) })
let list=result.data.course_groups; let list=result.data.course_groups;
if(list.length>0){ // if(list.length>0){
this.setState({ // this.setState({
group_ids:[list[0].id], // group_ids:[list[0].id],
}) // })
this.getwork_scoredata(page,[list[0].id],sort); // }
} this.getwork_scoredata(page,undefined,sort);
} }
}).catch((error) => { }).catch((error) => {
console.log(error); console.log(error);
@ -207,7 +210,7 @@ class Statistics extends Component{
} }
render(){ render(){
let {nd1,nd2,nd3,data,bomdata}=this.state; let {nd1,nd2,nd3,data,bomdata,course_members}=this.state;
const columns = [ const columns = [
{ {
@ -322,7 +325,7 @@ class Statistics extends Component{
<Spin size="large" spinning={this.state.topisSpin}> <Spin size="large" spinning={this.state.topisSpin}>
<p className="clearfix padding30"> <p className="clearfix padding30">
<Row gutter={24}> <Row gutter={24}>
<Col> <Col className={"Statisticsmxxy"}>
明星学员 明星学员
</Col> </Col>
</Row> </Row>
@ -434,7 +437,7 @@ class Statistics extends Component{
return( return(
<Col span={5} className={"Statisticscenter"}> <Col span={5} className={"Statisticscenter"}>
<Col>{item.user_name}</Col> <Col>{item.user_name}</Col>
<Col>2th</Col> <Col>2nd</Col>
</Col> </Col>
) )
} }
@ -444,7 +447,7 @@ class Statistics extends Component{
return( return(
<Col span={5} className={"Statisticscenter"}> <Col span={5} className={"Statisticscenter"}>
<Col>{item.user_name}</Col> <Col>{item.user_name}</Col>
<Col>1th</Col> <Col>1st</Col>
</Col> </Col>
) )
} }
@ -454,7 +457,7 @@ class Statistics extends Component{
return( return(
<Col span={5} className={"Statisticscenter"}> <Col span={5} className={"Statisticscenter"}>
<Col>{item.user_name}</Col> <Col>{item.user_name}</Col>
<Col>3th</Col> <Col>3rd</Col>
</Col> </Col>
) )
} }
@ -487,23 +490,24 @@ class Statistics extends Component{
} }
.ant-table-thead > tr > th, .ant-table-tbody > tr > td { .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 16px 0px; padding: 16px 0px;
text-align: center;
} }
` `
}</style> }</style>
<Tabs className="statisticsTabs" activeKey={this.state.activeKey} onChange={this.activeKey} tabBarExtraContent={this.props.isAdmin()===true?operations:""}> <Tabs className="statisticsTabs" activeKey={this.state.activeKey} onChange={this.activeKey} tabBarExtraContent={this.props.isAdmin()===true?operations:""}>
<TabPane tab="学习成绩" key="1" className={"statisticsTabs1"} > <TabPane tab="学习成绩" key="1" className={"statisticsTabs1"} >
<Table {bomdata===undefined||bomdata===null?"":bomdata.length===0?<NoneData/>:<Table
columns={columns} columns={columns}
dataSource={bomdata} dataSource={bomdata}
pagination={false} pagination={false}
onChange={this.handleTableChange} onChange={this.handleTableChange}
/> />}
</TabPane> </TabPane>
<TabPane tab="课堂活跃度" key="2"> <TabPane tab="课堂活跃度" key="2">
<Dynamiclist {course_members===undefined||course_members===null?"":course_members.length===0?<NoneData/>:<Dynamiclist
{...this.state} {...this.state}
{...this.props} {...this.props}
/> />}
</TabPane> </TabPane>
</Tabs> </Tabs>
</Spin> </Spin>

@ -427,14 +427,14 @@ export default class TPMchallengesnew extends Component {
<Link to={go_back_url === undefined ? "" : go_back_url} <Link to={go_back_url === undefined ? "" : go_back_url}
className="color-grey-6 fr font-15 mt3">返回</Link> className="color-grey-6 fr font-15 mt3">返回</Link>
{ next_challenge===undefined?"":
<a href={next_challenge}className="fr color-blue mr15 mt4">下一关</a>
}
{ prev_challenge===undefined?"": { prev_challenge===undefined?"":
<a href={prev_challenge} className="fr color-blue mr15 mt4">上一关</a> <a href={prev_challenge} className="fr color-blue mr15 mt4">上一关</a>
} }
{ next_challenge===undefined?"":
<a href={next_challenge}className="fr color-blue mr15 mt4">下一关</a>
}
<a href={practice_url === undefined ? "" : practice_url} <a href={practice_url === undefined ? "" : practice_url}

Loading…
Cancel
Save