|
|
|
@ -70,6 +70,8 @@ class Registration extends React.Component {
|
|
|
|
|
members_count: 0,
|
|
|
|
|
mode: 0,
|
|
|
|
|
region_schools: [],
|
|
|
|
|
admin: false,
|
|
|
|
|
typeysl: 0,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -85,6 +87,9 @@ class Registration extends React.Component {
|
|
|
|
|
const {keyword, page, per_page} = this.state;
|
|
|
|
|
this.Getdata(keyword, page, per_page, this.props.user.admin);// 获取列表数据
|
|
|
|
|
this.GetenrollmentAPI();//获取我的报名配置
|
|
|
|
|
this.setState({
|
|
|
|
|
admin: this.props.user.admin
|
|
|
|
|
})
|
|
|
|
|
} catch (e) {
|
|
|
|
|
// const {keyword, page, per_page} = this.state;
|
|
|
|
|
// this.Getdata(keyword, page, per_page, this.props.isAdmin());
|
|
|
|
@ -107,6 +112,9 @@ class Registration extends React.Component {
|
|
|
|
|
this.GetenrollmentAPI();
|
|
|
|
|
//取模式
|
|
|
|
|
this.Getdataheader();
|
|
|
|
|
this.setState({
|
|
|
|
|
admin: this.props.user.admin
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -281,17 +289,90 @@ class Registration extends React.Component {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
type: 6,
|
|
|
|
|
data: result.data.my_teams,
|
|
|
|
|
count: result.data.count,
|
|
|
|
|
competition_teams: result.data.competition_teams,
|
|
|
|
|
personal: result.data.personal,
|
|
|
|
|
competition_name: result.data.competition_name,
|
|
|
|
|
members_count: result.data.members_count
|
|
|
|
|
if (this.props.user.admin === true) {
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
if (result.data.competition_teams.length === 0) {
|
|
|
|
|
this.setState({
|
|
|
|
|
type: 6,
|
|
|
|
|
typeysl: 1,
|
|
|
|
|
data: result.data.competition_teams,
|
|
|
|
|
count: result.data.count,
|
|
|
|
|
competition_teams: result.data.competition_teams,
|
|
|
|
|
personal: result.data.personal,
|
|
|
|
|
competition_name: result.data.competition_name,
|
|
|
|
|
members_count: result.data.members_count,
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
type: 6,
|
|
|
|
|
typeysl: 0,
|
|
|
|
|
data: result.data.competition_teams,
|
|
|
|
|
count: result.data.count,
|
|
|
|
|
competition_teams: result.data.competition_teams,
|
|
|
|
|
personal: result.data.personal,
|
|
|
|
|
competition_name: result.data.competition_name,
|
|
|
|
|
members_count: result.data.members_count,
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
this.setState({
|
|
|
|
|
type: 6,
|
|
|
|
|
typeysl: 1,
|
|
|
|
|
data: result.data.competition_teams,
|
|
|
|
|
count: result.data.count,
|
|
|
|
|
competition_teams: result.data.competition_teams,
|
|
|
|
|
personal: result.data.personal,
|
|
|
|
|
competition_name: result.data.competition_name,
|
|
|
|
|
members_count: result.data.members_count,
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
if (result.data.my_teams.length === 0) {
|
|
|
|
|
this.setState({
|
|
|
|
|
type: 6,
|
|
|
|
|
typeysl: 1,
|
|
|
|
|
data: result.data.my_teams,
|
|
|
|
|
count: result.data.count,
|
|
|
|
|
competition_teams: result.data.competition_teams,
|
|
|
|
|
personal: result.data.personal,
|
|
|
|
|
competition_name: result.data.competition_name,
|
|
|
|
|
members_count: result.data.members_count,
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
type: 6,
|
|
|
|
|
typeysl: 0,
|
|
|
|
|
data: result.data.my_teams,
|
|
|
|
|
count: result.data.count,
|
|
|
|
|
competition_teams: result.data.competition_teams,
|
|
|
|
|
personal: result.data.personal,
|
|
|
|
|
competition_name: result.data.competition_name,
|
|
|
|
|
members_count: result.data.members_count,
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
this.setState({
|
|
|
|
|
type: 6,
|
|
|
|
|
typeysl: 1,
|
|
|
|
|
data: result.data.my_teams,
|
|
|
|
|
count: result.data.count,
|
|
|
|
|
competition_teams: result.data.competition_teams,
|
|
|
|
|
personal: result.data.personal,
|
|
|
|
|
competition_name: result.data.competition_name,
|
|
|
|
|
members_count: result.data.members_count,
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -824,7 +905,7 @@ class Registration extends React.Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
const {page, mode, pages, limit, type, tmodalsType, tmodalsTypes, data, count, competition_teams, Newtit, itemiddata, messagePerbool, messageexitol, GetenrollmentAPI, loadingstate, pint, competition_name, mutiple_limited, teamutiple_limited, members_count} = this.state;
|
|
|
|
|
const {page, admin, typeysl, mode, pages, limit, type, tmodalsType, tmodalsTypes, data, count, competition_teams, Newtit, itemiddata, messagePerbool, messageexitol, GetenrollmentAPI, loadingstate, pint, competition_name, mutiple_limited, teamutiple_limited, members_count} = this.state;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="newMain clearfix newMainybot">
|
|
|
|
@ -894,15 +975,15 @@ class Registration extends React.Component {
|
|
|
|
|
></CompetitionMaxImg>
|
|
|
|
|
{/*大图结尾*/}
|
|
|
|
|
{/*没数据*/}
|
|
|
|
|
{
|
|
|
|
|
pint === 1 || pint === 3 ?
|
|
|
|
|
{admin === true ?
|
|
|
|
|
(pint === 1 || pint === 3 ?
|
|
|
|
|
<div style={{
|
|
|
|
|
marginTop: "22px"
|
|
|
|
|
}}>
|
|
|
|
|
<p>参赛总人数:<span style={{color: "#459BE5"}}>{members_count}</span><span
|
|
|
|
|
style={{marginLeft: "5px"}}>人</span>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div> : "")
|
|
|
|
|
: ""}
|
|
|
|
|
{/*列表*/}
|
|
|
|
|
{
|
|
|
|
@ -926,7 +1007,7 @@ class Registration extends React.Component {
|
|
|
|
|
</div>
|
|
|
|
|
: ""}
|
|
|
|
|
{
|
|
|
|
|
type === 1 ?
|
|
|
|
|
type === 1 || typeysl === 1 ?
|
|
|
|
|
<RegisNodata {...this.props} {...this.state} ></RegisNodata>
|
|
|
|
|
:
|
|
|
|
|
""
|
|
|
|
@ -1060,4 +1141,4 @@ export default Registration;
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|