|
|
|
@ -9,7 +9,7 @@ import moment from 'moment';
|
|
|
|
|
import {SnackbarHOC, WordsBtn} from 'educoder';
|
|
|
|
|
import {TPMIndexHOC} from '../tpm/TPMIndexHOC';
|
|
|
|
|
import competition from './comcss/competition.css';
|
|
|
|
|
import {Button, Pagination, message} from 'antd';
|
|
|
|
|
import {Button, Pagination, message, Spin} from 'antd';
|
|
|
|
|
import Registrationitem from './Registrationitem';
|
|
|
|
|
import RegisNodata from './RegisNodata';
|
|
|
|
|
import CompetitionMaxImg from './CompetitionMaxImg';
|
|
|
|
@ -60,6 +60,7 @@ class Registration extends React.Component {
|
|
|
|
|
messageexitol: false,
|
|
|
|
|
exitintpermessages: "是否退出战队",
|
|
|
|
|
itemid: undefined,
|
|
|
|
|
itemiddata: [],
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -181,9 +182,13 @@ class Registration extends React.Component {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
loadingstate: false,
|
|
|
|
|
})
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
if (admin === true) {
|
|
|
|
|
//管理员
|
|
|
|
@ -192,6 +197,7 @@ class Registration extends React.Component {
|
|
|
|
|
count: 0,
|
|
|
|
|
competition_teams: [],
|
|
|
|
|
data: [],
|
|
|
|
|
loadingstate: false,
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
//普通账号
|
|
|
|
@ -200,9 +206,11 @@ class Registration extends React.Component {
|
|
|
|
|
count: 0,
|
|
|
|
|
competition_teams: [],
|
|
|
|
|
data: [],
|
|
|
|
|
loadingstate: false,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Getdatatype5 = (keyword, page, per_page, admin) => {
|
|
|
|
@ -247,8 +255,12 @@ class Registration extends React.Component {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
loadingstate: false,
|
|
|
|
|
})
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
if (admin === true) {
|
|
|
|
|
//管理员
|
|
|
|
@ -256,6 +268,7 @@ class Registration extends React.Component {
|
|
|
|
|
count: 0,
|
|
|
|
|
competition_teams: [],
|
|
|
|
|
data: [],
|
|
|
|
|
loadingstate: false,
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
//普通账号
|
|
|
|
@ -263,18 +276,22 @@ class Registration extends React.Component {
|
|
|
|
|
count: 0,
|
|
|
|
|
competition_teams: [],
|
|
|
|
|
data: [],
|
|
|
|
|
loadingstate: false,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//团队竞赛翻页
|
|
|
|
|
paginationonChangestwo = (pageNumber) => {
|
|
|
|
|
this.setState({
|
|
|
|
|
pages: pageNumber,
|
|
|
|
|
loadingstate: true,
|
|
|
|
|
})
|
|
|
|
|
const {keyword, per_page} = this.state;
|
|
|
|
|
this.Getdata(keyword, pageNumber, per_page, this.props.user.admin);
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
/**
|
|
|
|
|
* 加入战队
|
|
|
|
@ -361,7 +378,8 @@ class Registration extends React.Component {
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// this.setState({
|
|
|
|
|
// tmodalsType: true
|
|
|
|
|
// tmodalsType: true,
|
|
|
|
|
// Newtit:true,
|
|
|
|
|
// })
|
|
|
|
|
// } else {
|
|
|
|
|
// //学生
|
|
|
|
@ -374,16 +392,25 @@ class Registration extends React.Component {
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// this.setState({
|
|
|
|
|
// tmodalsType: true
|
|
|
|
|
// tmodalsType: true,
|
|
|
|
|
// Newtit:true,
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
tmodalsType: true
|
|
|
|
|
tmodalsType: true,
|
|
|
|
|
Newtit: true,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//编辑战队
|
|
|
|
|
Createateamedit = (data) => {
|
|
|
|
|
this.setState({
|
|
|
|
|
tmodalsType: true,
|
|
|
|
|
Newtit: false,
|
|
|
|
|
itemiddata: data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
Tmoconfirm = (bool) => {
|
|
|
|
|
//boolfalse 取消 true 确认
|
|
|
|
|
this.setState({
|
|
|
|
@ -423,11 +450,21 @@ class Registration extends React.Component {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
//显示退出战队弹框
|
|
|
|
|
Exittheteamshow = (itemid) => {
|
|
|
|
|
this.setState({
|
|
|
|
|
messageexitol: true,
|
|
|
|
|
itemid: itemid
|
|
|
|
|
})
|
|
|
|
|
Exittheteamshow = (itemid, bool) => {
|
|
|
|
|
if (bool === true) {
|
|
|
|
|
this.setState({
|
|
|
|
|
messageexitol: true,
|
|
|
|
|
itemid: itemid,
|
|
|
|
|
exitintpermessages: "是否删除战队",
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
messageexitol: true,
|
|
|
|
|
itemid: itemid,
|
|
|
|
|
exitintpermessages: "是否退出战队",
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
//刷新战队
|
|
|
|
@ -479,7 +516,7 @@ class Registration extends React.Component {
|
|
|
|
|
this.Getdatatype5(value, 1, 20, this.props.user.admin);
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
const {test, page, pages, limit, type, tmodalsType, tmodalsTypes, data, count, competition_teams} = this.state;
|
|
|
|
|
const {test, page, pages, limit, type, tmodalsType, tmodalsTypes, data, count, competition_teams, Newtit, itemiddata, messagePerbool, messageexitol, GetenrollmentAPI, loadingstate} = this.state;
|
|
|
|
|
var listItems = "";
|
|
|
|
|
if (competition_teams) {
|
|
|
|
|
listItems = competition_teams.map((item, index) =>
|
|
|
|
@ -502,14 +539,36 @@ class Registration extends React.Component {
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<MessagePersonModal messagePer={this.state.messagePer} {...this.props} {...this.state}
|
|
|
|
|
messagePerboolbuton={() => this.messagePerboolbuton()}></MessagePersonModal>
|
|
|
|
|
<PersonModal modalsType={tmodalsType} {...this.props} {...this.state} Newtit={true}
|
|
|
|
|
Tmoconfirm1={(bool) => this.Tmoconfirm1(bool)}></PersonModal>
|
|
|
|
|
<PersonalModalteam tmodalsTypes={tmodalsTypes} {...this.props} {...this.state}
|
|
|
|
|
Tmoconfirm={(bool) => this.Tmoconfirm(bool)}></PersonalModalteam>
|
|
|
|
|
<ExittheteamModel {...this.props} {...this.state}
|
|
|
|
|
Exittheteam={(bool) => this.Exittheteam(bool)}></ExittheteamModel>
|
|
|
|
|
{
|
|
|
|
|
messagePerbool === true ?
|
|
|
|
|
<MessagePersonModal messagePer={this.state.messagePer} {...this.props} {...this.state}
|
|
|
|
|
messagePerboolbuton={() => this.messagePerboolbuton()}
|
|
|
|
|
GetenrollmentAPI={GetenrollmentAPI}></MessagePersonModal>
|
|
|
|
|
: ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
tmodalsType === true ?
|
|
|
|
|
<PersonModal modalsType={tmodalsType} {...this.props} {...this.state} Newtit={Newtit}
|
|
|
|
|
itemiddata={itemiddata} GetenrollmentAPI={GetenrollmentAPI}
|
|
|
|
|
Tmoconfirm1={(bool) => this.Tmoconfirm1(bool)}></PersonModal>
|
|
|
|
|
:
|
|
|
|
|
""
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
tmodalsTypes === true ?
|
|
|
|
|
<PersonalModalteam tmodalsTypes={tmodalsTypes} {...this.props} {...this.state}
|
|
|
|
|
GetenrollmentAPI={GetenrollmentAPI}
|
|
|
|
|
Tmoconfirm={(bool) => this.Tmoconfirm(bool)}></PersonalModalteam>
|
|
|
|
|
: ""
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
messageexitol === true ?
|
|
|
|
|
<ExittheteamModel {...this.props} {...this.state} GetenrollmentAPI={GetenrollmentAPI}
|
|
|
|
|
Exittheteam={(bool) => this.Exittheteam(bool)}></ExittheteamModel>
|
|
|
|
|
: ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<div className="educontent mb20 ">
|
|
|
|
|
<p className="clearfix mb20 mt10">
|
|
|
|
|
<a className="btn colorgrey fl hovercolorblue ">在线竞赛</a>
|
|
|
|
@ -536,7 +595,8 @@ class Registration extends React.Component {
|
|
|
|
|
{
|
|
|
|
|
type === 2 || type === 3 || type === 5 ?
|
|
|
|
|
<PersonalCompetititem type={type} data={data}
|
|
|
|
|
Exittheteamshow={(itemid) => this.Exittheteamshow(itemid)}></PersonalCompetititem>
|
|
|
|
|
Exittheteamshow={(itemid) => this.Exittheteamshow(itemid)}
|
|
|
|
|
Createateamedit={(itemid) => this.Createateamedit(itemid)}></PersonalCompetititem>
|
|
|
|
|
: ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -556,7 +616,9 @@ class Registration extends React.Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{type === 4 || type === 5 ?
|
|
|
|
|
listItems
|
|
|
|
|
<Spin spinning={loadingstate}>
|
|
|
|
|
listItems
|
|
|
|
|
</Spin>
|
|
|
|
|
:
|
|
|
|
|
""
|
|
|
|
|
}
|
|
|
|
|