|
|
|
@ -21,8 +21,6 @@ import MessagePersonModal from './competmodal/MessagePersonModal';
|
|
|
|
|
import PersonalModalteam from './competmodal/PersonalModalteam';
|
|
|
|
|
import PersonalCompetititem from './personal/PersonalCompetititem';
|
|
|
|
|
import ExittheteamModel from './competmodal/ExittheteamModel';
|
|
|
|
|
import pexjiazai from "./pexjiazai.png";
|
|
|
|
|
|
|
|
|
|
// 团队竞赛报名无报名
|
|
|
|
|
class Registration extends React.Component {
|
|
|
|
|
/***
|
|
|
|
@ -546,7 +544,6 @@ class Registration extends React.Component {
|
|
|
|
|
};
|
|
|
|
|
//刷新战队
|
|
|
|
|
Refreshteam = () => {
|
|
|
|
|
|
|
|
|
|
const {keyword, page, per_page} = this.state;
|
|
|
|
|
this.Getdata(keyword, page, per_page, this.props.user.admin);
|
|
|
|
|
this.GetenrollmentAPI();
|
|
|
|
@ -596,66 +593,32 @@ class Registration extends React.Component {
|
|
|
|
|
//个人竞赛
|
|
|
|
|
// /competitions/:identifier/competition_teams.json
|
|
|
|
|
Personalregistration = () => {
|
|
|
|
|
let {teacher_staff, member_staff, data, enroll_ended} = this.state;
|
|
|
|
|
let {teacher_staff, member_staff, data, enroll_ended, enrolled} = this.state;
|
|
|
|
|
if (enroll_ended === true) {
|
|
|
|
|
//已截止
|
|
|
|
|
this.props.showNotification(`报名已截止`);
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (teacher_staff) {
|
|
|
|
|
if (teacher_staff.mutiple_limited) {
|
|
|
|
|
if (teacher_staff.mutiple_limited === true) {
|
|
|
|
|
if (data) {
|
|
|
|
|
if (data.length > teacher_staff.maximum) {
|
|
|
|
|
this.props.showNotification(`你已经报名,不能重复报名!`);
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (member_staff) {
|
|
|
|
|
if (member_staff.mutiple_limited) {
|
|
|
|
|
if (member_staff.mutiple_limited === true) {
|
|
|
|
|
if (data) {
|
|
|
|
|
if (data.length > member_staff.maximum) {
|
|
|
|
|
if (enrolled === true) {
|
|
|
|
|
this.props.showNotification(`你已经报名,不能重复报名!`);
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const url = `/competitions/${this.props.match.params.identifier}/competition_teams.json`;
|
|
|
|
|
axios.post(url).then((response) => {
|
|
|
|
|
if (response) {
|
|
|
|
|
if (response.data) {
|
|
|
|
|
this.props.showNotification(`报名成功,预祝您夺得桂冠!`);
|
|
|
|
|
this.Refreshteam();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
const {page, pages, limit, type, tmodalsType, tmodalsTypes, data, count, competition_teams, Newtit, itemiddata, messagePerbool, messageexitol, GetenrollmentAPI, loadingstate, pint} = this.state;
|
|
|
|
|
// var listItems = "";
|
|
|
|
|
|
|
|
|
|
// if (competition_teams) {
|
|
|
|
|
// listItems = competition_teams.map((item, index) =>
|
|
|
|
|
//
|
|
|
|
|
// );
|
|
|
|
|
// }
|
|
|
|
|
// const listItemss = test.map((item, index) =>
|
|
|
|
|
//
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="newMain clearfix ">
|
|
|
|
|