竞赛调整

dev_sync_trustie
杨树明 5 years ago
parent aaf61985a5
commit d9fc557cef

@ -143,6 +143,7 @@
height: 30px;
line-height: 30px;
background:none;
color:#666;
}
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
@ -173,4 +174,39 @@
.teamsLayoutleft{
background: transparent !important;
}
.Competitioncharts{
font-size: 24px;
color: rgba(5,16,26,1);
}
.Competitionfirst{
width:233px;
height:298px;
background:rgba(250,250,250,1);
box-shadow:0px 2px 8px 2px rgba(255,134,34,0.5);
border-radius:5px;
}
.Competitionsecondary{
width:234px;
height:277px;
background:rgba(250,250,250,1);
box-shadow:0px 3px 5px 0px rgba(254,190,154,1);
border-radius:5px;
}
.Competitionthird{
width: 234px;
height: 270px;
background: rgba(250,250,250,1);
box-shadow: 0px 4px 5px 0px rgba(200,200,202,1);
border-radius: 5px;
}
.Competition399{
height:399px;
}
.Competitiontransparent table{
background: transparent;
}

@ -3,6 +3,8 @@ import { Breadcrumb,Layout,Table, Divider, Tag,Badge,Row, Col,Button, Menu, Icon
import { Link } from 'react-router-dom';
import axios from 'axios';
import {markdownToHTML,getImageUrl} from 'educoder';
import CompetitionContents from './CompetitionContents';
import CompetitionContentsChart from './CompetitionContentsChart';
import NoneData from "../../courses/shixunHomework/shixunHomework";
import './CompetitionCommon.css';
@ -57,7 +59,7 @@ class CompetitionCommon extends Component{
<Breadcrumb separator=">">
<Breadcrumb.Item href="">在线竞赛</Breadcrumb.Item>
<Breadcrumb.Item href="">全国高校计算机大赛</Breadcrumb.Item>
<Breadcrumb.Item href="">{data&&data.name}</Breadcrumb.Item>
</Breadcrumb>
<div className={"mt10"}>
@ -126,10 +128,8 @@ class CompetitionCommon extends Component{
</Sider>
<Layout className={"teamsLayoutleft"}>
<Content className={"markdown-body"} dangerouslySetInnerHTML={{__html: markdownToHTML("").replace(/▁/g, "▁▁▁")}}>
</Content>
<CompetitionContents/>
<CompetitionContentsChart/>
</Layout>
</Layout>

@ -0,0 +1,38 @@
import React, { Component } from 'react';
import {Button,Layout} from 'antd';
import axios from 'axios';
import {markdownToHTML,getImageUrl} from 'educoder';
import NoneData from "../../courses/shixunHomework/shixunHomework";
const { Header, Footer, Sider, Content } = Layout;
class CompetitionContents extends Component{
constructor(props) {
super(props)
this.state={
}
}
componentDidMount(){
window.document.title = '竞赛';
}
render() {
return (
<div className={"fr"}>
<Button className={"fr"} type="primary" ghost>
编辑
</Button>
<Content className={"markdown-body"} dangerouslySetInnerHTML={{__html: markdownToHTML("").replace(/▁/g, "▁▁▁")}}>
</Content>
</div>
)
}
}
export default CompetitionContents;

@ -0,0 +1,189 @@
import React, { Component } from 'react';
import {Button,Layout,Tabs,Icon, Card, Avatar, Row, Col ,Table} from 'antd';
import axios from 'axios';
import {markdownToHTML,getImageUrl} from 'educoder';
import NoneData from "../../courses/shixunHomework/shixunHomework";
const { Header, Footer, Sider, Content } = Layout;
const { TabPane } = Tabs;
const { Meta } = Card;
class CompetitionContents extends Component{
constructor(props) {
super(props)
this.state={
}
}
componentDidMount(){
window.document.title = '竞赛';
}
render() {
const operations = <Icon type="form" />;
const columns = [
{
title: 'Name',
dataIndex: 'name',
key: 'name',
render: text => <a>{text}</a>,
},
{
title: 'Age',
dataIndex: 'age',
key: 'age',
},
{
title: 'Address',
dataIndex: 'address',
key: 'address',
},
{
title: 'Tags',
key: 'tags',
dataIndex: 'tags',
render: tags => (
<span>
123123
</span>
),
},
{
title: 'Action',
key: 'action',
render: (text, record) => (
<span>
<a>Invite {record.name}</a>
<a>Delete</a>
</span>
),
},
{
title: 'Values',
key: 'values',
dataIndex: 'values',
render: tags => (
<span>
123123
</span>
),
},
];
const data = [
{
key: '1',
name: 'John Brown',
age: 32,
address: 'New York No. 1 Lake Park',
tags: ['nice', 'developer'],
values:123
},
{
key: '2',
name: 'Jim Green',
age: 42,
address: 'London No. 1 Lake Park',
tags: ['loser'],
values:123
},
{
key: '3',
name: 'Joe Black',
age: 32,
address: 'Sidney No. 1 Lake Park',
tags: ['cool', 'teacher'],
values:123
},
];
return (
<div>
<Tabs tabBarExtraContent={operations}>
<TabPane tab="总排行榜" key="1">
<Content className={"markdown-body"} dangerouslySetInnerHTML={{__html: markdownToHTML("Content of tab 1").replace(/▁/g, "▁▁▁")}}>
</Content>
</TabPane>
<TabPane tab="决赛排行榜" key="2">
<Content className={"markdown-body"} dangerouslySetInnerHTML={{__html: markdownToHTML("Content of tab 2").replace(/▁/g, "▁▁▁")}}>
</Content>
</TabPane>
<TabPane tab="预赛排行榜" key="3">
<Content className={"markdown-body"} dangerouslySetInnerHTML={{__html: markdownToHTML("Content of tab 3").replace(/▁/g, "▁▁▁")}}>
</Content>
</TabPane>
</Tabs>
<Col className="gutter-row Competitioncharts mt30 mb30">
总排名
</Col>
<Row calssName={"Competition399"}>
<Col className="mt40" xs={{ span: 5, offset: 1 }} lg={{ span: 6, offset: 2 }}>
<Card
className={"Competitionthird"}
cover={
<img
alt="example"
src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png"
/>
}
>
<Meta
title="Card title"
description="This is the description"
/>
</Card>
</Col>
<Col xs={{ span: 11, offset: 1 }} lg={{ span: 6, offset: 1 }}>
<Card
className={"Competitionfirst"}
cover={
<img
alt="example"
src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png"
/>
}
>
<Meta
title="Card title"
description="This is the description"
/>
</Card>
</Col>
<Col className="mt30" xs={{ span: 5, offset: 1 }} lg={{ span: 6, offset: 1 }}>
<Card
className={"Competitionsecondary"}
cover={
<img
alt="example"
src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png"
/>
}
>
<Meta
title="Card title"
description="This is the description"
/>
</Card>
</Col>
</Row>
<Row className={"mt80 mb80"}>
<Table className="Competitiontransparent" columns={columns} dataSource={data} showHeader={false} pagination={false}/>
</Row>
</div>
)
}
}
export default CompetitionContents;

@ -58,12 +58,15 @@ class Competitions extends Component {
}
></Route>
{/*新版竞赛报名*/}
<Route
path="/newcompetitions/:identifier/enroll"
render={
(props) => (<Registration {...this.props} {...props} {...this.state}/>)
}
/>
{/*新版竞赛详情页面*/}
<Route path="/newcompetitions/:identifier/common_header"
render={

Loading…
Cancel
Save