Merge branches 'yslcompetition' and 'ysm1' of https://bdgit.educoder.net/Hjqreturn/educoder into ysm1

dev_sync_trustie
杨树明 5 years ago
commit ef0880b9d2

@ -508,7 +508,7 @@ class Registration extends React.Component {
})
if (bool) {
//确认
this.Refreshteam();
} else {
//取消

@ -410,6 +410,15 @@
}
.regitemimgs222 {
margin-top: 12px;
width: 28px;
height: 28px;
margin-left: 20px;
border-radius: 50%;
}
.regitemimgs3 {
/* border: 0.5px solid; */
height: 22px;
@ -426,6 +435,11 @@
margin-top: 18px;
}
.regitemimgs444 {
display: flex;
flex-direction: row-reverse;
margin-top: 18px;
}
.regitemimgs5 {
margin-left: 10px;
text-align: center;
@ -442,6 +456,23 @@
cursor: pointer
}
.regitemimgs555 {
margin-left: 33px;
text-align: center;
background: #ffffff;
height: 40px;
width: 72px;
color: #459be5;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
border: 1px;
border-style: solid;
border-color: #459BE5;
cursor: pointer
}
.regitemimgs6 {
text-align: center;
background: #ffffff;

@ -10,6 +10,8 @@ import NoneData from '../../../modules/courses/coursesPublic/NoneData'
const {Search} = Input;
//创建战队
var myabool = true;
var myabool2 = true;
class PersonModal extends Component {
//导师是搜索 和学生搜索都会添加到下面框中
/**
@ -146,6 +148,16 @@ class PersonModal extends Component {
};
//创建战队
Createateam = () => {
debugger
try {
if (this.state.polls_nametest.length === 0) {
this.props.showNotification(`请输入您的战队名称最多不超过60个字符`);
return
}
} catch (e) {
}
const {polls_nametest, mydatas, GetenrollmentAPI} = this.state;
@ -177,6 +189,25 @@ class PersonModal extends Component {
}
}
try {
if (i === 0) {
this.props.showNotification(`请添加导师`);
return;
}
} catch (e) {
}
try {
if (s === 0) {
this.props.showNotification(`请添加队员`);
return;
}
} catch (e) {
}
//确认的时候 去确认老师人数是否符合
try {
if (GetenrollmentAPI) {
@ -424,7 +455,18 @@ class PersonModal extends Component {
//点击获取老师数据
getdatacpersondiv1Items = (object) => {
try {
if (this.props.teamutiple_limited === true) {
if (object.enrollable === false) {
myabool = false;
return
}
}
} catch (e) {
myabool = true;
}
myabool = true;
var datas = {
enrollable: object.enrollable,
id: object.id,
@ -470,15 +512,15 @@ class PersonModal extends Component {
try {
if (this.props.GetenrollmentAPI.teacher_staff.mutiple_limited === true) {
if (object.enrollable === false) {
myabool2 = false;
return
}
}
} catch (e) {
myabool2 = true;
}
myabool2 = true;
var datas = {
enrollable: object.enrollable,
id: object.id,
@ -589,20 +631,26 @@ class PersonModal extends Component {
}
inputOnBlur = (e) => {
// ////console.log("inputOnBlur");
// ////console.log(e);
this.setState({
person1: false,
person2: false
})
console.log("inputOnBlur");
console.log(e);
if (myabool === true) {
this.setState({
person1: false,
person2: false
})
}
}
inputOnBlur2 = (e) => {
// ////console.log("inputOnBlur");
// ////console.log(e);
this.setState({
person1: false,
person2: false
})
if (myabool2 === true) {
this.setState({
person1: false,
person2: false
})
}
}
startSearch = (e) => {
@ -876,6 +924,8 @@ class PersonModal extends Component {
</div>
);
var cpersondiv1Items = [];
// console.log("this.props.teamutiple_limited ");
// console.log(this.props.teamutiple_limited );
if (teacher_ids) {
cpersondiv1Items = teacher_ids.map((item, index) =>
<a
@ -887,7 +937,7 @@ class PersonModal extends Component {
alignItems: "center",
height: "40px",
}}
onClick={() => this.getdatacpersondiv1Items(item)}
onMouseDown={() => this.getdatacpersondiv1Items(item)}
>
<style>
@ -1021,7 +1071,7 @@ class PersonModal extends Component {
alignItems: "center",
height: "40px",
}}
onClick={() => this.getdatacpersondiv1Items2(item)}
onMouseDown={() => this.getdatacpersondiv1Items2(item)}
>
<style>
{

@ -20,6 +20,19 @@ class PersonalModalteam extends Component {
Tmoconfirmto = () => {
try {
if (this.state.yslzxueshiskmcdm1) {
if (this.state.yslzxueshiskmcdm1.length === 0) {
this.props.showNotification(`请输入您的邀请码`);
return
}
}
} catch (e) {
}
let url = `/competitions/${this.props.match.params.identifier}/competition_teams/join.json`;
axios.post(url, {
invite_code: this.state.yslzxueshiskmcdm1

@ -96,57 +96,100 @@ class PersonalCompetititem extends React.Component {
textAlign: "center"
}}>{data[0].name}</p>
</div>
<div className=" " style={{
marginLeft: "37px",
display: "flex",
flexDirection: "initial",
width: "487px"
}}>
{
data && data[0].team_members.map((item, index) => {
return (
{this.props.type === 5 || this.props.type === 2 ?
<div className=" " style={{
marginLeft: "37px",
display: "flex",
flexDirection: "initial",
width: "357px"
}}>
{
data && data[0].team_members.map((item, index) => {
return (
index === 0 ?
<img className="regitemimgs" src={getImageUrl("images/" + item.image_url)}>
index === 0 ?
<img className="regitemimgs" src={getImageUrl("images/" + item.image_url)}>
</img>
: index === 1 ?
<img className="regitemimgs2" src={getImageUrl("images/" + item.image_url)}>
</img>
: index === 1 ?
<img className="regitemimgs2" src={getImageUrl("images/" + item.image_url)}>
</img>
: index === 2 ?
<img className="regitemimgs2" src={getImageUrl("images/" + item.image_url)}>
</img>
: index === 3 ?
<div>
<img className="regitemimgs2" src={getImageUrl("images/" + item.image_url)}>
</img>
: index === 2 ?
<img className="regitemimgs2" src={getImageUrl("images/" + item.image_url)}>
</img>
</img>
: index === 3 ?
<img className="regitemimgs222"
src={getImageUrl(`images/educoder/competitions/pexjiazai.png`)}>
</img>
</div>
: ""
)
})
}
</div> :
<div className=" " style={{
marginLeft: "37px",
display: "flex",
flexDirection: "initial",
width: "487px"
}}>
{
data && data[0].team_members.map((item, index) => {
return (
index === 0 ?
<img className="regitemimgs" src={getImageUrl("images/" + item.image_url)}>
</img>
: index === 1 ?
<img className="regitemimgs2" src={getImageUrl("images/" + item.image_url)}>
</img>
: index === 4 ?
: index === 2 ?
<img className="regitemimgs2" src={getImageUrl("images/" + item.image_url)}>
</img>
: index === 5 ?
<div>
: index === 3 ?
<img className="regitemimgs2" src={getImageUrl("images/" + item.image_url)}>
</img>
: index === 4 ?
<img className="regitemimgs2" src={getImageUrl("images/" + item.image_url)}>
<img className="regitemimgs22"
src={getImageUrl(`images/educoder/competitions/pexjiazai.png`)}>
</img>
: index === 5 ?
<div>
<img className="regitemimgs2" src={getImageUrl("images/" + item.image_url)}>
</img>
</div>
: ""
)
})
}
</img>
</div>
<div className=" " style={{
<img className="regitemimgs22"
src={getImageUrl(`images/educoder/competitions/pexjiazai.png`)}>
</img>
</div>
: ""
)
})
}
</div>
}
<div className=" " style={this.props.type === 5 || this.props.type === 2 ? {
marginLeft: "20px",
} : {
marginLeft: "37px",
}}>
<div style={{marginTop: "23px", width: '113px'}}>
<div style={{marginTop: "23px", width: '140px'}}>
<span style={{
color: "#05101A",
fontSize: "16px",
@ -190,13 +233,21 @@ class PersonalCompetititem extends React.Component {
{
this.props.type === 5 ?
<div className="regitemimgs4"
<div className="regitemimgs444"
style={{
marginLeft: "32px",
}}
>
<div className="regitemimgs5" onClick={() => this.props.Exittheteamshow(data[0].id, true)}>
<p onClick={() => this.props.Exittheteamshow(data[0].id, true)}>删除战队</p>
<div className="regitemimgs555">
<a href={`/newcompetitions/${"gcc-course-2019"}/competition_teams/${data[0].id}`} style={{
color: "#459be5",
width: "100%",
height: "100%",
lineHeight: "39px",
}}>战队详情</a>
</div>
<div className="regitemimgs555" onClick={() => this.props.Exittheteamshow(data[0].id, false)}>
<p onClick={() => this.props.Exittheteamshow(data[0].id, false)}>删除战队</p>
</div>
<div className="regitemimgs6" onClick={() => this.props.Createateamedit(data[0])}>
<p onClick={() => this.props.Createateamedit(data[0])}>编辑战队</p>
@ -204,12 +255,13 @@ class PersonalCompetititem extends React.Component {
</div>
: this.props.type === 2 ?
<div className="regitemimgs4 "
<div className="regitemimgs444 "
style={{
marginLeft: "32px",
}}
>
<div className="regitemimgs5">
<div className="regitemimgs555">
<a href={`/newcompetitions/${"gcc-course-2019"}/competition_teams/${data[0].id}`} style={{
color: "#459be5",
width: "100%",
@ -217,10 +269,12 @@ class PersonalCompetititem extends React.Component {
lineHeight: "39px",
}}>战队详情</a>
</div>
<div className="regitemimgs6" onClick={() => this.props.Exittheteamshow(data[0].id, false)}>
<p onClick={() => this.props.Exittheteamshow(data[0].id, false)}>退出战队</p>
<div className="regitemimgs555" onClick={() => this.props.Exittheteamshow(data[0].id, false)}>
<p onClick={() => this.props.Exittheteamshow(data[0].id, false)}>删除战队</p>
</div>
<div className="regitemimgs6" onClick={() => this.props.Createateamedit(data[0])}>
<p onClick={() => this.props.Createateamedit(data[0])}>编辑战队</p>
</div>
</div>
:
this.props.type === 3 ?

Loading…
Cancel
Save