dev_sync_trustie
杨树林 5 years ago
parent 1bf72e9314
commit fa47b00a7a

@ -29,6 +29,13 @@ class CompetitionMaxImg extends React.Component {
let {type, pint} = this.props;
return (
<div>
<style>
{
`
`
}
</style>
{
type === 1 || type === 2 ?
<div className="registrationback">

@ -22,6 +22,7 @@ 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 {
/***
@ -74,6 +75,8 @@ class Registration extends React.Component {
// //// ////console.log("调用子组件 ");
// ////console.log(this.props.isAdmin());
// //// ////console.log(this.props.isAdmin())
this.GetenrollmentAPI();
this.Getthenavigationbar();
}
@ -85,12 +88,26 @@ class Registration extends React.Component {
//console.log(this.props.user.admin);
const {keyword, page, per_page} = this.state;
this.Getdata(keyword, page, per_page, this.props.user.admin);
this.GetenrollmentAPI();
}
}
// 获取导航栏
Getthenavigationbar = () => {
const url = `/competitions/${"gcc-task-2020"}/competition_modules.json`;
axios.get((url)).then((result) => {
if (result) {
if (result.data) {
//// ////console.log("获取报名配置API");
//// ////console.log(result);
console.log(result);
}
}
}).catch((error) => {
//// ////console.log(error);
})
}
//获取报名配置API
GetenrollmentAPI = () => {
const url = `/competitions/${"gcc-task-2020"}/competition_staff.json`;
@ -591,35 +608,45 @@ class Registration extends React.Component {
//个人竞赛
// /competitions/:identifier/competition_teams.json
Personalregistration = () => {
let {teacher_staff, member_staff, data} = this.state;
let {teacher_staff, member_staff, data, enroll_ended} = this.state;
if (enroll_ended === true) {
//已截止
this.props.showNotification(`报名已截止`);
return;
}
if (teacher_staff) {
if (teacher_staff.mutiple_limited === true) {
if (data) {
if (data.length > teacher_staff.maximum) {
message.success('已限制多次报名!');
return
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 (teacher_staff.mutiple_limited === true) {
if (member_staff.mutiple_limited) {
if (member_staff.mutiple_limited === true) {
if (data) {
if (data.length > teacher_staff.maximum) {
message.success('已限制多次报名!');
if (data.length > member_staff.maximum) {
this.props.showNotification(`你已经报名,不能重复报名!`);
return;
}
}
}
}
}
const url = `/competitions/${"gcc-task-2020"}/competition_teams.json`;
axios.post(url).then((response) => {
if (response) {
if (response.data) {
this.props.showNotification(`报名成功,预祝您夺得桂冠!`);
this.Refreshteam();
@ -631,7 +658,7 @@ class Registration extends React.Component {
}
render() {
const {test, page, pages, limit, type, tmodalsType, tmodalsTypes, data, count, competition_teams, Newtit, itemiddata, messagePerbool, messageexitol, GetenrollmentAPI, loadingstate, pint} = this.state;
var listItems = "";
// var listItems = "";
// if (competition_teams) {
// listItems = competition_teams.map((item, index) =>
@ -716,7 +743,7 @@ class Registration extends React.Component {
: ""}
{/*列表*/}
{
pint === 1 || pint === 3 ?
type === 6 ?
<div
style={{
marginTop: "31px"
@ -726,7 +753,7 @@ class Registration extends React.Component {
{
data && data.map((item, index) => {
return (
<Registrationitem item={item}></Registrationitem>
<Registrationitem key={index} item={item}></Registrationitem>
)
})
}

@ -69,7 +69,7 @@ class Registrationitem extends React.Component {
color: "#999999",
fontSize: "16px",
textAlign: "center",
}}>2019-09-07 08:33</p>
}}>{item.created_at}</p>
</div>
</div>

@ -8,16 +8,17 @@
}
/*All*/
/*Registration.js*/
.registrationback {
height: 368px;
width: 1200px;
border: 0.5px solid;
display: flex;
display: -webkit-flex;
flex-direction: column;
align-items: center;
background: #0dcecb;
}
/*.registrationback {*/
/* height: 368px;*/
/* width: 1200px;*/
/* border: 0.5px solid;*/
/* display: flex;*/
/* display: -webkit-flex;*/
/* flex-direction: column;*/
/* align-items: center;*/
/* background:url(../../../../../images/regis/tipregistit.jpg)*/
/*}*/
.registrationbackcenter {
display: flex;
@ -26,14 +27,14 @@
align-items: center;
}
.registrationback1 {
height: 368px;
width: 1200px;
border: 0.5px solid;
display: flex;
flex-direction: column;
background: #0dcecb;
}
/*.registrationback1 {*/
/* height: 368px;*/
/* width: 1200px;*/
/* border: 0.5px solid;*/
/* display: flex;*/
/* flex-direction: column;*/
/* background:url(../../../../../images/regis/tipregistit.jpg)*/
/*}*/
.registrationbackp1 {
color: #ffffff;
@ -315,6 +316,23 @@
border-bottom: 1px solid #EDEDED;
}
.registrationback {
height: 368px;
width: 1200px;
display: flex;
display: -webkit-flex;
flex-direction: column;
align-items: center;
background-image: url(./tipregistit.jpg);
}
.registrationback1 {
height: 368px;
width: 1200px;
display: flex;
flex-direction: column;
background-image: url(./tipregistit.jpg);
}
.regitem2 {
display: flex;

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

Loading…
Cancel
Save