竞赛调整

dev_sync_trustie
杨树林 5 years ago
parent b2b4dac11d
commit 78481e4cdf

@ -32,7 +32,7 @@ module.exports = {
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s
// devtool: "cheap-module-eval-source-map",
// 开启调试
//devtool: "source-map", // 开启调试
devtool: "source-map", // 开启调试
// These are the "entry points" to our application.
// This means they will be the "root" imports that are included in JS bundle.
// The first two entry points enable "hot" CSS and auto-refreshes for JS.

@ -279,12 +279,16 @@ const Ecs = Loadable({
loading: Loading,
});
//个人竞赛报名
//团队竞赛报名
const Registration = Loadable({
loader: () => import('./modules/competition/Registration'),
loading: Loading,
});
//个人竞赛报名
const PersonalCompetit = Loadable({
loader: () => import('./modules/competition/personal/PersonalCompetit.js'),
loading: Loading,
});
class App extends Component {
constructor(props) {
super(props)
@ -529,7 +533,12 @@ class App extends Component {
return (<BanksIndex {...this.props} {...props} {...this.state} />)
}
}></Route>
<Route
path="/personalcompetit"
render={
(props) => (<PersonalCompetit {...this.props} {...props} {...this.state}></PersonalCompetit>)
}
/>
<Route
path="/changepassword"
render={
@ -586,6 +595,13 @@ class App extends Component {
<Route path="/testCodeMirror" component={TestCodeMirrorComponent}/>
<Route path="/testRCComponent" component={TestComponent}/>
<Route path="/testUrlQuery" component={TestUrlQueryComponent}/>
<Route
path="/registration"
render={
(props) => (<Registration {...this.props} {...props} {...this.state}></Registration>)
}
/>
<Route path="/messages"
render={
(props)=>(<Messagerouting {...this.props} {...props} {...this.state}></Messagerouting>)
@ -599,12 +615,7 @@ class App extends Component {
render={
(props)=>(<Ecs {...this.props} {...props} {...this.state}></Ecs>)
}/>
<Route
path="/registration"
render={
(props) => (<Registration {...this.props} {...props} {...this.state}></Registration>)
}
/>
<Route exact path="/"
// component={ShixunsHome}
render={

@ -5,19 +5,15 @@ import competition from './comcss/competition.css';
class CompetitionMaxImg extends React.Component {
constructor(props) {
super(props)
this.state = {
type: 1,
}
}
render() {
let {type} = this.props
let {type, pint} = this.props
return (
<div>
{
type === 1 ?
type === 1 || type === 2 ?
<div className="registrationback">
<p className="registrationbackp1">Educoder竞赛平台</p>
<p className="registrationbackp2">Educoder是一个面向计算机类的互联网IT教育和实战平台</p>
@ -33,7 +29,7 @@ class CompetitionMaxImg extends React.Component {
</div>
</div>
:
type === 2 ?
type === 3 ?
<div className="registrationback">
<p className="registrationbackp1">Educoder竞赛平台</p>
<p className="registrationbackp4">高校智能课堂与综合实训平台</p>
@ -48,7 +44,7 @@ class CompetitionMaxImg extends React.Component {
</div>
</div>
:
type === 3 ?
type === 4 || type === 5 ?
<div className="registrationback1">
<p className="registrationbackp11">Educoder竞赛平台</p>
<p className="registrationbackp22">高校智能课堂与综合实训平台</p>
@ -62,6 +58,29 @@ class CompetitionMaxImg extends React.Component {
</div>
</div>
: type === 6 ?
<div className="registrationback">
<p className="registrationbackp1">Educoder竞赛平台</p>
<p className="registrationbackp2">Educoder是一个面向计算机类的互联网IT教育和实战平台</p>
<p className="registrationbackp3">提供企业级工程实训以实现工程化专业教学的自动化和智能化</p>
<div className="registrationbackp2button">
{
pint === 1 ?
<div className="registbut1">
<p>立即报名</p>
</div>
: pint === 2 ?
<div className="personreg1">
<p>已报名</p>
</div>
:
<div className="personreg1">
<p>报名已截止</p>
</div>
}
</div>
</div>
:
""
}

@ -16,16 +16,17 @@ import CompetitionMaxImg from './CompetitionMaxImg';
import RegistrationSearch from './RegistrationSearch';
import RegisListview from './RegisListview';
import RegisListviewdata from './RegisListviewdata';
// 团队竞赛报名无报名
class Registration extends React.Component {
constructor(props) {
super(props)
this.state = {
persons: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
test: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
loadingstate: false,
page: 1,
limit: 20,
type: 1,
type: 5,
}
}
@ -36,9 +37,10 @@ class Registration extends React.Component {
loadingstate: true,
})
}
render() {
const {persons, page, limit, type} = this.state;
const listItems = persons.map((item, index) =>
const {test, page, limit, type} = this.state;
const listItems = test.map((item, index) =>
<RegisListviewdata></RegisListviewdata>
);
return (
@ -66,7 +68,7 @@ class Registration extends React.Component {
}
{
type === 2 || type === 3 || type === 5 ?
<Registrationitem type={type}></Registrationitem>
<Registrationitem type={type}></Registrationitem>
: ""
}
@ -90,7 +92,7 @@ class Registration extends React.Component {
}
{
type === 5 ?
type === 4 || type === 5 ?
<div className="edu-txt-center ysyslxh mt56 " style={{marginBottom: "192px",}}>
<Pagination showQuickJumper current={page}
onChange={this.paginationonChangestwo} pageSize={limit}

@ -10,6 +10,7 @@ import {SnackbarHOC, WordsBtn} from 'educoder';
import {TPMIndexHOC} from '../tpm/TPMIndexHOC';
import competition from './comcss/competition.css';
import {Button} from 'antd';
import RegisListviewdata from "./RegisListviewdata";
// 团队竞赛报名无报名子组件团队 竞赛报名-已创建战队
class Registrationitem extends React.Component {
@ -21,118 +22,48 @@ class Registrationitem extends React.Component {
render() {
return (
<div className="regitem">
<div className="regitemimg1 borders">
<div className="regitemimg2">
<div className="regitem2">
<div className="perregitemimg1 ">
<div className="personregitemimg">
</div>
<p>小猫头像</p>
</div>
<div className="borders" style={{
marginTop: "29px",
marginLeft: "37px"
<div className="" style={{
marginTop: "19px",
marginLeft: "54px",
display: "flex",
flexDirection: "initial",
}}>
<p style={{
border: "1px solid",
<p className="" style={{
color: "#05101A",
fontSize: "16px",
width: "160px",
textAlign: "center"
}}>重庆邮电大学</p>
</div>
<div className="borders" style={{
marginLeft: "37px",
display: "flex",
flexDirection: "initial",
width: "487px"
}}>
<div className="regitemimgs">
</div>
<div className="regitemimgs2">
</div>
<div className="regitemimgs2">
</div>
<div className="regitemimgs2">
</div>
<div className="regitemimgs2">
}}>小猫头像</p>
</div>
<div className="regitemimgs2">
</div>
<div className="regitemimgs22">
</div>
<p className="" style={{
color: "#459BE5",
fontSize: "16px",
textAlign: "center",
marginLeft: "25px",
}}>已报名</p>
</div>
<div className="borders" style={{
marginLeft: "37px",
<div className="" style={{
marginLeft: "632px",
width: "151px",
marginTop: "19px",
marginRight: "35px",
}}>
<p style={{
border: "1px solid",
marginTop: "30px",
color: "#05101A",
color: "#999999",
fontSize: "16px",
}}>邀请码yngh5</p>
textAlign: "center",
}}>2019-09-07 08:33</p>
</div>
<div className="regitemimgs3 "
style={{
marginLeft: "18px",
}}
>
</div>
{
this.props.type === 5 ?
<div className="regitemimgs4"
style={{
marginLeft: "32px",
}}
>
<div className="regitemimgs5">
<p>删除战队</p>
</div>
<div className="regitemimgs6">
<p>编辑战队</p>
</div>
</div>
: this.props.type === 2 ?
<div className="regitemimgs4"
style={{
marginLeft: "32px",
}}
>
<div className="regitemimgs5">
<p>战队详情</p>
</div>
<div className="regitemimgs6">
<p>退出战队</p>
</div>
</div>
:
this.props.type === 2 ?
<div className="regitemimgs4"
style={{
marginLeft: "32px",
}}
>
<div className="regitemimgs6">
<p>退出战队</p>
</div>
</div>
:
""
}
</div>

@ -1,6 +1,6 @@
/*All*/
.borders {
border: 1px solid;
border: 0.5px solid;
}
/*All*/
@ -8,7 +8,7 @@
.registrationback {
height: 368px;
width: 1200px;
border: 1px solid;
border: 0.5px solid;
display: flex;
display: -webkit-flex;
flex-direction: column;
@ -19,7 +19,7 @@
.registrationback1 {
height: 368px;
width: 1200px;
border: 1px solid;
border: 0.5px solid;
display: flex;
flex-direction: column;
background: #0dcecb;
@ -63,6 +63,7 @@
color: #ffffff;
font-size: 18px;
line-height: 20px;
margin-top: 7px;
}
.registrationbackp4 {
@ -112,6 +113,19 @@
}
.personreg1 {
margin-right: 46px;
text-align: center;
background: #C3C1C1;
height: 54px;
width: 156px;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer
}
.registbut11 {
margin-right: 46px;
text-align: center;
@ -163,6 +177,12 @@
}
.personreg1 p {
color: #ffffff;
font-size: 20px;
cursor: not-allowed;
}
.registbut2 {
text-align: center;
color: #05101A;
@ -217,7 +237,7 @@
}
.bootomimg {
border: 1px solid;
border: 0.5px solid;
height: 80px;
width: 125px;
margin-top: 107px;
@ -239,10 +259,16 @@
.regitem {
display: flex;
flex-direction: initial;
border: 1px solid;
border: 0.5px solid;
margin-top: 44px;
}
.regitem2 {
display: flex;
flex-direction: initial;
border-bottom: 1px solid #EDEDED;
margin-top: 19px;
}
/*垂直*/
.regitemimg1 {
display: flex;
@ -252,20 +278,35 @@
margin-left: 17px;
}
.perregitemimg1 {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-left: 26px;
padding-bottom: 18px;
}
.regitemimg2 {
border: 1px solid;
border: 0.5px solid;
height: 78px;
width: 78px;
}
.personregitemimg {
border: 0.5px solid;
height: 64px;
width: 64px;
}
.regitemimg2 p {
border: 1px solid;
border: 0.5px solid;
color: #999999;
font-size: 14px;
}
.regitemimgs {
border: 1px solid;
border: 0.5px solid;
width: 69px;
height: 69px;
margin-top: 3px;
@ -274,7 +315,7 @@
.regitemimgs2 {
margin-top: 16px;
border: 1px solid;
border: 0.5px solid;
width: 49px;
height: 51px;
margin-left: 25px
@ -282,14 +323,14 @@
.regitemimgs22 {
margin-top: 27px;
border: 1px solid;
border: 0.5px solid;
width: 28px;
height: 28px;
margin-left: 20px;
}
.regitemimgs3 {
border: 1px solid;
border: 0.5px solid;
height: 22px;
width: 22px;
margin-top: 30px;
@ -402,7 +443,7 @@ reglistviewdivs2 {
}
.reglistimg2 {
border: 1px solid;
border: 0.5px solid;
height: 78px;
width: 78px;
}

@ -0,0 +1,97 @@
import React, {Component} from 'react';
import {SnackbarHOC, WordsBtn} from 'educoder';
import {TPMIndexHOC} from '../../tpm/TPMIndexHOC';
import competition from '../comcss/competition.css';
import {Button, Pagination,} from 'antd';
import CompetitionMaxImg from '../CompetitionMaxImg';
import Registrationitem from '../Registrationitem';
// 团队竞赛报名无报名
class PersonalCompetit extends React.Component {
constructor(props) {
super(props)
this.state = {
loadingstate: false,
page: 1,
limit: 20,
type: 6,
pint: 1,
test: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
}
}
paginationonChangestwo = (pageNumber) => {
this.setState({
page: pageNumber,
loadingstate: true,
})
}
render() {
const {test, page, limit, type, pint} = this.state;
const listItems = test.map((item, index) =>
<Registrationitem></Registrationitem>
);
return (
<div className="newMain clearfix ">
<div className={"educontent mb20"} style={{width: "1200px", marginTop: "26px"}}>
<div className="educontent mb20 ">
<p className="clearfix mb20 mt10">
<a className="btn colorgrey fl hovercolorblue ">在线竞赛</a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<a
className=" btn colorgrey fl hovercolorblue ">全国高校计算机大赛-项目挑战</a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">报名</WordsBtn>
</p>
</div>
{/*大图*/}
{
type === 6 ?
<CompetitionMaxImg type={type} pint={pint}></CompetitionMaxImg>
:
""
}
{
pint === 1 || pint === 3 ?
<div style={{
marginTop: "22px"
}}>
<p>参赛总人数<span style={{color: "#459BE5"}}>132</span></p>
</div>
: ""}
{/*列表*/}
{
pint === 1 || pint === 3 ?
<div
style={{
marginTop: "31px"
}}
>
{
listItems
}
</div>
: ""}
{
pint === 1 || pint === 3 ?
<div className="edu-txt-center ysyslxh mt56 " style={{marginBottom: "192px",}}>
<Pagination showQuickJumper current={page}
onChange={this.paginationonChangestwo} pageSize={limit}
total={30}></Pagination>
</div>
: ""
}
</div>
</div>
)
}
}
export default SnackbarHOC()(TPMIndexHOC(PersonalCompetit));

@ -0,0 +1,144 @@
import React, {Component} from 'react';
import {
BrowserRouter as Router,
Route,
Switch
} from 'react-router-dom';
import axios from 'axios';
import moment from 'moment';
import {SnackbarHOC, WordsBtn} from 'educoder';
import {TPMIndexHOC} from '../tpm/TPMIndexHOC';
import competition from './comcss/competition.css';
import {Button} from 'antd';
// 团队竞赛报名无报名子组件团队 竞赛报名-已创建战队
class Registrationitem extends React.Component {
constructor(props) {
super(props)
}
render() {
return (
<div className="regitem">
<div className="regitemimg1 borders">
<div className="regitemimg2">
</div>
</div>
<div className="borders" style={{
marginTop: "29px",
marginLeft: "37px"
}}>
<p style={{
border: "1px solid",
color: "#05101A",
fontSize: "16px",
width: "160px",
textAlign: "center"
}}>重庆邮电大学</p>
</div>
<div className="borders" style={{
marginLeft: "37px",
display: "flex",
flexDirection: "initial",
width: "487px"
}}>
<div className="regitemimgs">
</div>
<div className="regitemimgs2">
</div>
<div className="regitemimgs2">
</div>
<div className="regitemimgs2">
</div>
<div className="regitemimgs2">
</div>
<div className="regitemimgs2">
</div>
<div className="regitemimgs22">
</div>
</div>
<div className="borders" style={{
marginLeft: "37px",
}}>
<p style={{
border: "1px solid",
marginTop: "30px",
color: "#05101A",
fontSize: "16px",
}}>邀请码yngh5</p>
</div>
<div className="regitemimgs3 "
style={{
marginLeft: "18px",
}}
>
</div>
{
this.props.type === 5 ?
<div className="regitemimgs4"
style={{
marginLeft: "32px",
}}
>
<div className="regitemimgs5">
<p>删除战队</p>
</div>
<div className="regitemimgs6">
<p>编辑战队</p>
</div>
</div>
: this.props.type === 2 ?
<div className="regitemimgs4"
style={{
marginLeft: "32px",
}}
>
<div className="regitemimgs5">
<p>战队详情</p>
</div>
<div className="regitemimgs6">
<p>退出战队</p>
</div>
</div>
:
this.props.type === 3 ?
<div className="regitemimgs4"
style={{
marginLeft: "32px",
}}
>
<div className="regitemimgs6">
<p>退出战队</p>
</div>
</div>
:
""
}
</div>
)
}
}
export default Registrationitem;
Loading…
Cancel
Save