|
|
|
@ -10,6 +10,8 @@ import NoneData from '../../../modules/courses/coursesPublic/NoneData'
|
|
|
|
|
const {Search} = Input;
|
|
|
|
|
|
|
|
|
|
//创建战队
|
|
|
|
|
var myabool = true;
|
|
|
|
|
var myabool2 = true;
|
|
|
|
|
class PersonModal extends Component {
|
|
|
|
|
//导师是搜索 和学生搜索都会添加到下面框中
|
|
|
|
|
/**
|
|
|
|
@ -50,7 +52,8 @@ class PersonModal extends Component {
|
|
|
|
|
myteaherdata: [],
|
|
|
|
|
myshtudentdata: [],
|
|
|
|
|
Thecurrentnumberbool: false,
|
|
|
|
|
|
|
|
|
|
Thecurrentnumberboolstu: false,
|
|
|
|
|
Thecurrentnumberstu: "",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -65,7 +68,7 @@ class PersonModal extends Component {
|
|
|
|
|
school_name: this.props.user.user_school,
|
|
|
|
|
student_id: null,
|
|
|
|
|
identity: this.props.user.user_identity,
|
|
|
|
|
type: "导师",
|
|
|
|
|
type: this.props.user.is_teacher === true ? "导师" : "队员",
|
|
|
|
|
};
|
|
|
|
|
data.push(datas);
|
|
|
|
|
|
|
|
|
@ -110,30 +113,30 @@ class PersonModal extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidUpdate = (prevProps) => {
|
|
|
|
|
if (prevProps.user != this.props.user) {
|
|
|
|
|
////console.log("Registration.js componentDidUpdate");
|
|
|
|
|
////console.log(this.props);
|
|
|
|
|
// ////console.log(prevProps);
|
|
|
|
|
//identity职场称
|
|
|
|
|
//user_school学校
|
|
|
|
|
//real_name姓名
|
|
|
|
|
//type 类型
|
|
|
|
|
var data = [];
|
|
|
|
|
var datas = {
|
|
|
|
|
enrollable: false,
|
|
|
|
|
id: undefined,
|
|
|
|
|
name: this.props.user.real_name,
|
|
|
|
|
school_name: this.props.user.user_school,
|
|
|
|
|
student_id: null,
|
|
|
|
|
identity: this.props.user.user_identity,
|
|
|
|
|
type: "导师",
|
|
|
|
|
};
|
|
|
|
|
data.push(datas);
|
|
|
|
|
this.setState({
|
|
|
|
|
myuser: this.props.user,
|
|
|
|
|
mydatas: data,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// if (prevProps.user != this.props.user) {
|
|
|
|
|
// ////console.log("Registration.js componentDidUpdate");
|
|
|
|
|
// ////console.log(this.props);
|
|
|
|
|
// // ////console.log(prevProps);
|
|
|
|
|
// //identity职场称
|
|
|
|
|
// //user_school学校
|
|
|
|
|
// //real_name姓名
|
|
|
|
|
// //type 类型
|
|
|
|
|
// var data = [];
|
|
|
|
|
// var datas = {
|
|
|
|
|
// enrollable: false,
|
|
|
|
|
// id: undefined,
|
|
|
|
|
// name: this.props.user.real_name,
|
|
|
|
|
// school_name: this.props.user.user_school,
|
|
|
|
|
// student_id: null,
|
|
|
|
|
// identity: this.props.user.user_identity,
|
|
|
|
|
// type: "导师",
|
|
|
|
|
// };
|
|
|
|
|
// data.push(datas);
|
|
|
|
|
// this.setState({
|
|
|
|
|
// myuser: this.props.user,
|
|
|
|
|
// mydatas: data,
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
if (prevProps.GetenrollmentAPI != this.props.GetenrollmentAPI) {
|
|
|
|
|
////console.log("Registration.js GetenrollmentAPIcomponentDidUpdate");
|
|
|
|
@ -145,12 +148,23 @@ 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;
|
|
|
|
|
var myteaherdata = [];
|
|
|
|
|
var myshtudentdata = [];
|
|
|
|
|
var i = 0;
|
|
|
|
|
var s = 0;
|
|
|
|
|
for (var a = 0; a < mydatas.length; a++) {
|
|
|
|
|
if (mydatas[a].type === "导师") {
|
|
|
|
|
i++;
|
|
|
|
@ -163,6 +177,7 @@ class PersonModal extends Component {
|
|
|
|
|
// }
|
|
|
|
|
myteaherdata.push(mydatas[a].id);
|
|
|
|
|
} else if (mydatas[a].type === "队员") {
|
|
|
|
|
s++;
|
|
|
|
|
// var objectts = {
|
|
|
|
|
// enrollable: mydatas[a].enrollable,
|
|
|
|
|
// id: mydatas[a].id,
|
|
|
|
@ -174,7 +189,26 @@ 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) {
|
|
|
|
|
if (GetenrollmentAPI.teacher_staff) {
|
|
|
|
@ -195,13 +229,52 @@ class PersonModal extends Component {
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
Thecurrentnumberbool: false,
|
|
|
|
|
Thecurrentnumber: i,
|
|
|
|
|
booltech: false,
|
|
|
|
|
boolstud: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//确认的时候 去确认学生人数是否符合
|
|
|
|
|
try {
|
|
|
|
|
if (GetenrollmentAPI) {
|
|
|
|
|
if (GetenrollmentAPI.member_staff) {
|
|
|
|
|
if (GetenrollmentAPI.member_staff.minimum > s) {
|
|
|
|
|
this.setState({
|
|
|
|
|
Thecurrentnumberboolstu: true,
|
|
|
|
|
Thecurrentnumberstu: s,
|
|
|
|
|
booltech: false,
|
|
|
|
|
boolstud: false
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
} else if (GetenrollmentAPI.member_staff.maximum < s) {
|
|
|
|
|
this.setState({
|
|
|
|
|
Thecurrentnumberboolstu: true,
|
|
|
|
|
Thecurrentnumberstu: s,
|
|
|
|
|
booltech: false,
|
|
|
|
|
boolstud: false
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
Thecurrentnumberboolstu: false,
|
|
|
|
|
Thecurrentnumberstu: s,
|
|
|
|
|
booltech: false,
|
|
|
|
|
boolstud: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Thecurrentnumber
|
|
|
|
|
if (this.props.Newtit === true) {
|
|
|
|
|
//创建新的战队
|
|
|
|
@ -252,8 +325,8 @@ class PersonModal extends Component {
|
|
|
|
|
// ////console.log("搜索的老师");
|
|
|
|
|
const datas = {
|
|
|
|
|
keyword: keywordteachers,
|
|
|
|
|
team_id: team_idteachers,
|
|
|
|
|
teacher_ids: teacher_ids,
|
|
|
|
|
team_id: null,
|
|
|
|
|
teacher_ids: null,
|
|
|
|
|
};
|
|
|
|
|
let url = `/competitions/${this.props.match.params.identifier}/teachers.json`;
|
|
|
|
|
axios.get((url), {params: datas}).then((result) => {
|
|
|
|
@ -280,8 +353,8 @@ class PersonModal extends Component {
|
|
|
|
|
// ////console.log("搜索的学生");
|
|
|
|
|
const datas = {
|
|
|
|
|
keyword: keywordstudents,
|
|
|
|
|
team_id: team_idstudents,
|
|
|
|
|
student_ids: student_ids,
|
|
|
|
|
team_id: null,
|
|
|
|
|
student_ids: null,
|
|
|
|
|
};
|
|
|
|
|
let url = `/competitions/${this.props.match.params.identifier}/students.json`;
|
|
|
|
|
axios.get((url), {params: datas}).then((result) => {
|
|
|
|
@ -306,7 +379,8 @@ class PersonModal extends Component {
|
|
|
|
|
this.setState({
|
|
|
|
|
keywordteachers: e.target.value,
|
|
|
|
|
booltech: false,
|
|
|
|
|
Thecurrentnumberbool: false
|
|
|
|
|
Thecurrentnumberbool: false,
|
|
|
|
|
Thecurrentnumberboolstu: false,
|
|
|
|
|
})
|
|
|
|
|
// try {
|
|
|
|
|
// if (e.target.value.length > 0) {
|
|
|
|
@ -345,8 +419,10 @@ class PersonModal extends Component {
|
|
|
|
|
this.setState({
|
|
|
|
|
keywordstudents: e.target.value,
|
|
|
|
|
boolstud: false,
|
|
|
|
|
Thecurrentnumberbool: false
|
|
|
|
|
Thecurrentnumberbool: false,
|
|
|
|
|
Thecurrentnumberboolstu: false,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// try {
|
|
|
|
|
// if (e.target.value.length > 0) {
|
|
|
|
|
// this.setState({
|
|
|
|
@ -379,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,
|
|
|
|
@ -421,6 +508,19 @@ class PersonModal extends Component {
|
|
|
|
|
}
|
|
|
|
|
//点击获取学生数据2
|
|
|
|
|
getdatacpersondiv1Items2 = (object) => {
|
|
|
|
|
//
|
|
|
|
|
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,
|
|
|
|
@ -531,18 +631,26 @@ class PersonModal extends Component {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
inputOnBlur = (e) => {
|
|
|
|
|
// ////console.log("inputOnBlur");
|
|
|
|
|
// ////console.log(e);
|
|
|
|
|
this.setState({
|
|
|
|
|
person1: 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({
|
|
|
|
|
person2: false
|
|
|
|
|
})
|
|
|
|
|
if (myabool2 === true) {
|
|
|
|
|
this.setState({
|
|
|
|
|
person1: false,
|
|
|
|
|
person2: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
startSearch = (e) => {
|
|
|
|
@ -627,7 +735,7 @@ class PersonModal extends Component {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
deletedata = (item) => {
|
|
|
|
|
var {mydatas} = this.state;
|
|
|
|
|
var {mydatas, GetenrollmentAPI} = this.state;
|
|
|
|
|
if (item) {
|
|
|
|
|
var pos = mydatas.indexOf(item);
|
|
|
|
|
// ////console.log("deletedata");
|
|
|
|
@ -641,14 +749,118 @@ class PersonModal extends Component {
|
|
|
|
|
mydatas: mydatas,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
var myteaherdata = [];
|
|
|
|
|
var myshtudentdata = [];
|
|
|
|
|
var i = 0;
|
|
|
|
|
var s = 0;
|
|
|
|
|
try {
|
|
|
|
|
for (var a = 0; a < mydatas.length; a++) {
|
|
|
|
|
if (mydatas[a].type === "导师") {
|
|
|
|
|
i = i + 1;
|
|
|
|
|
// var objectt = {
|
|
|
|
|
// enrollable: mydatas[a].enrollable,
|
|
|
|
|
// id: mydatas[a].id,
|
|
|
|
|
// identity: mydatas[a].identity,
|
|
|
|
|
// name: mydatas[a].name,
|
|
|
|
|
// school_name: mydatas[a].school_name,
|
|
|
|
|
// }
|
|
|
|
|
myteaherdata.push(mydatas[a].id);
|
|
|
|
|
} else if (mydatas[a].type === "队员") {
|
|
|
|
|
s = s + 1;
|
|
|
|
|
// var objectts = {
|
|
|
|
|
// enrollable: mydatas[a].enrollable,
|
|
|
|
|
// id: mydatas[a].id,
|
|
|
|
|
// name: mydatas[a].name,
|
|
|
|
|
// school_name: mydatas[a].school_name,
|
|
|
|
|
// student_id: mydatas[a].student_id,
|
|
|
|
|
// }
|
|
|
|
|
myshtudentdata.push(mydatas[a].id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// console.log("deletedata");
|
|
|
|
|
// console.log(i);
|
|
|
|
|
//删除老师的时候判断是否符合人数
|
|
|
|
|
try {
|
|
|
|
|
if (GetenrollmentAPI) {
|
|
|
|
|
if (GetenrollmentAPI.teacher_staff) {
|
|
|
|
|
if (GetenrollmentAPI.teacher_staff.minimum > i) {
|
|
|
|
|
this.setState({
|
|
|
|
|
Thecurrentnumberbool: true,
|
|
|
|
|
Thecurrentnumber: i,
|
|
|
|
|
booltech: false,
|
|
|
|
|
boolstud: false
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
} else if (GetenrollmentAPI.teacher_staff.maximum < i) {
|
|
|
|
|
this.setState({
|
|
|
|
|
Thecurrentnumberbool: true,
|
|
|
|
|
Thecurrentnumber: i,
|
|
|
|
|
booltech: false,
|
|
|
|
|
boolstud: false
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
Thecurrentnumberbool: false,
|
|
|
|
|
Thecurrentnumber: i,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// debugger
|
|
|
|
|
//删除学生的时候判断是否符合人数
|
|
|
|
|
try {
|
|
|
|
|
if (GetenrollmentAPI) {
|
|
|
|
|
if (GetenrollmentAPI.member_staff) {
|
|
|
|
|
if (GetenrollmentAPI.member_staff.minimum > s) {
|
|
|
|
|
this.setState({
|
|
|
|
|
Thecurrentnumberboolstu: true,
|
|
|
|
|
Thecurrentnumberstu: s,
|
|
|
|
|
booltech: false,
|
|
|
|
|
boolstud: false
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
} else if (GetenrollmentAPI.member_staff.maximum < s) {
|
|
|
|
|
this.setState({
|
|
|
|
|
Thecurrentnumberboolstu: true,
|
|
|
|
|
Thecurrentnumberstu: s,
|
|
|
|
|
booltech: false,
|
|
|
|
|
boolstud: false
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
Thecurrentnumberboolstu: false,
|
|
|
|
|
Thecurrentnumberstu: s,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
// console.log('Registration.js');
|
|
|
|
|
// console.log(this.props.mutiple_limited);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const {
|
|
|
|
|
addonAfter, Numberofteammentors, Thecurrentnumber, person1, person2,
|
|
|
|
|
keywordteachers, team_idteachers, teacher_ids,
|
|
|
|
|
keywordstudents, team_idstudents, student_ids,
|
|
|
|
|
member_ids, mydatas, booltech, boolstud, GetenrollmentAPI, Thecurrentnumberbool
|
|
|
|
|
member_ids, mydatas, booltech, boolstud, GetenrollmentAPI, Thecurrentnumberbool,
|
|
|
|
|
Thecurrentnumberboolstu, Thecurrentnumberstu
|
|
|
|
|
} = this.state;
|
|
|
|
|
//Modal
|
|
|
|
|
//keyboard是否支持键盘 esc 关闭
|
|
|
|
@ -665,11 +877,21 @@ class PersonModal extends Component {
|
|
|
|
|
alignItems: "center",
|
|
|
|
|
height: "40px",
|
|
|
|
|
}}>
|
|
|
|
|
<p className=" reglistviewdivss4p"
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
a:hover
|
|
|
|
|
{
|
|
|
|
|
color: #05101A;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<a title={item.name} className=" reglistviewdivss4p maxnamewidth90"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
}}
|
|
|
|
|
>{item.name === undefined || item.name === null || item.name === "" ? "--" : item.name}</p>
|
|
|
|
|
>{item.name === undefined || item.name === null || item.name === "" ? "--" : item.name}</a>
|
|
|
|
|
{
|
|
|
|
|
index === 0 ?
|
|
|
|
|
<p className=" reglistviewdivss4p"
|
|
|
|
@ -678,32 +900,32 @@ class PersonModal extends Component {
|
|
|
|
|
}}
|
|
|
|
|
>创建者</p>
|
|
|
|
|
:
|
|
|
|
|
<p className=" reglistviewdivss4p"
|
|
|
|
|
<a title={item.type} className=" reglistviewdivss4p maxnamewidth90"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
}}
|
|
|
|
|
>{item.type === undefined || item.type === null || item.type === "" ? "--" : item.type}</p>
|
|
|
|
|
>{item.type === undefined || item.type === null || item.type === "" ? "--" : item.type}</a>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<p className=" reglistviewdivss5p"
|
|
|
|
|
<a title={item.school_name} className=" reglistviewdivss5p maxnamewidth110"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
}}
|
|
|
|
|
>{item.school_name === undefined || item.school_name === null || item.school_name === "" ? "--" : item.school_name}</p>
|
|
|
|
|
<p className=" reglistviewdivss2p"
|
|
|
|
|
>{item.school_name === undefined || item.school_name === null || item.school_name === "" ? "--" : item.school_name}</a>
|
|
|
|
|
<a title={item.identity} className=" reglistviewdivss2p maxnamewidth90"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
}}
|
|
|
|
|
>{item.identity === undefined || item.identity === null || item.identity === "" ? "--" : item.identity}</p>
|
|
|
|
|
>{item.identity === undefined || item.identity === null || item.identity === "" ? "--" : item.identity}</a>
|
|
|
|
|
{
|
|
|
|
|
index === 0 ?
|
|
|
|
|
<p className=" reglistviewdivss33p"
|
|
|
|
|
<p className=" reglistviewdivss333p"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
}}
|
|
|
|
|
></p>
|
|
|
|
|
:
|
|
|
|
|
<p className=" reglistviewdivss33p"
|
|
|
|
|
<p className=" reglistviewdivss333p"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
}}
|
|
|
|
@ -712,46 +934,119 @@ 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 className="reglistviewdivss2" key={index} style={{
|
|
|
|
|
<div className={"yslanswerList"}>
|
|
|
|
|
<li
|
|
|
|
|
className={this.props.teamutiple_limited === undefined || this.props.teamutiple_limited === null ? "reglistviewdivss2 " : (this.props.teamutiple_limited === true && item.enrollable === false ? "reglistviewdivss2c" : "reglistviewdivss2 ")}
|
|
|
|
|
key={index} style={{
|
|
|
|
|
width: "100%",
|
|
|
|
|
display: "flex",
|
|
|
|
|
justifyContent: " space-around",
|
|
|
|
|
alignItems: "center",
|
|
|
|
|
height: "40px",
|
|
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
onClick={() => this.getdatacpersondiv1Items(item)}
|
|
|
|
|
onMouseDown={() => this.getdatacpersondiv1Items(item)}
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
<p className=" cpersondiv1Items"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
width: "100px"
|
|
|
|
|
}}
|
|
|
|
|
>{item.name === undefined || item.name === null || item.name === "" ? "--" : item.name}</p>
|
|
|
|
|
<p className=" cpersondiv1Items"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
width: "100px"
|
|
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
> {item.identity === undefined || item.identity === null || item.identity === "" ? "--" : item.identity}</p>
|
|
|
|
|
<p className=" cpersondiv1Items"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
width: "120px"
|
|
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
>{item.school_name === undefined || item.school_name === null || item.school_name === "" ? "--" : item.school_name}</p>
|
|
|
|
|
</a>
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
a:hover
|
|
|
|
|
{
|
|
|
|
|
color: #05101A;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
{item.name === undefined || item.name === null || item.name === "" ?
|
|
|
|
|
<a className=" cpersondiv1Items"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
width: "90px"
|
|
|
|
|
}}
|
|
|
|
|
>--</a>
|
|
|
|
|
:
|
|
|
|
|
<a title={item.name} className=" cpersondiv1Items maxnamewidth90"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
width: "90px"
|
|
|
|
|
}}
|
|
|
|
|
>{item.name}</a>
|
|
|
|
|
}
|
|
|
|
|
{item.identity === undefined || item.identity === null || item.identity === "" ?
|
|
|
|
|
<p className=" cpersondiv1Items maxnamewidth85"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
width: "85px"
|
|
|
|
|
}}
|
|
|
|
|
>--</p>
|
|
|
|
|
:
|
|
|
|
|
<a title={item.identity} className=" cpersondiv1Items maxnamewidth85"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
width: "85px"
|
|
|
|
|
}}
|
|
|
|
|
>{item.identity}</a>}
|
|
|
|
|
{item.school_name === undefined || item.school_name === null || item.school_name === "" ?
|
|
|
|
|
|
|
|
|
|
<p className=" cpersondiv1Items"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
width: "110px"
|
|
|
|
|
}}
|
|
|
|
|
>--</p>
|
|
|
|
|
:
|
|
|
|
|
<a title={item.school_name} className=" cpersondiv1Items maxnamewidth110"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
width: "110px"
|
|
|
|
|
}}
|
|
|
|
|
>{item.school_name}</a>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
this.props.teamutiple_limited === undefined || this.props.teamutiple_limited === null ?
|
|
|
|
|
<p className=" cpersondiv1Items"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
width: "87px"
|
|
|
|
|
}}
|
|
|
|
|
>{""}</p>
|
|
|
|
|
:
|
|
|
|
|
(
|
|
|
|
|
this.props.teamutiple_limited === true ?
|
|
|
|
|
<p className=" cpersondiv1Items"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
color: "#FF6800",
|
|
|
|
|
width: "87px"
|
|
|
|
|
}}
|
|
|
|
|
>{item.enrollable === false ? "已加入其他战队" : ""}</p>
|
|
|
|
|
:
|
|
|
|
|
<p className=" cpersondiv1Items"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
width: "87px"
|
|
|
|
|
}}
|
|
|
|
|
>{""}</p>
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const cpersondiv1 = (
|
|
|
|
|
<div className={" backgroundspersondiv cpersondiv1 borders2"}>
|
|
|
|
|
<Spin spinning={false}>
|
|
|
|
|
<div className={cpersondiv1Items.length === 0 ? "demo-infinite-container33" : "demo-infinite-container2"}>
|
|
|
|
|
<div
|
|
|
|
|
className={cpersondiv1Items.length === 0 ? "demo-infinite-container33 yslanswerList" : "demo-infinite-container2 yslanswerList"}>
|
|
|
|
|
{
|
|
|
|
|
cpersondiv1Items.length === 0 ?
|
|
|
|
|
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE}/>
|
|
|
|
@ -778,48 +1073,115 @@ class PersonModal extends Component {
|
|
|
|
|
var persondiv2Items = [];
|
|
|
|
|
if (member_ids) {
|
|
|
|
|
persondiv2Items = member_ids.map((item, index) =>
|
|
|
|
|
<a className="reglistviewdivss2 " key={index} style={{
|
|
|
|
|
<div className={"yslanswerList"}>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li
|
|
|
|
|
className={this.props.mutiple_limited === undefined || this.props.mutiple_limited === null ? "reglistviewdivss2 " : (this.props.mutiple_limited === true && item.enrollable === false ? "reglistviewdivss2c" : "reglistviewdivss2 ")}
|
|
|
|
|
key={index} style={{
|
|
|
|
|
width: "100%",
|
|
|
|
|
display: "flex",
|
|
|
|
|
justifyContent: " space-around",
|
|
|
|
|
alignItems: "center",
|
|
|
|
|
height: "40px",
|
|
|
|
|
}}
|
|
|
|
|
onClick={() => this.getdatacpersondiv1Items2(item)}
|
|
|
|
|
onMouseDown={() => this.getdatacpersondiv1Items2(item)}
|
|
|
|
|
>
|
|
|
|
|
<p className=" cpersondiv1Items"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
width: "90px"
|
|
|
|
|
}}
|
|
|
|
|
>{item.name === undefined || item.name === null || item.name === "" ? "--" : item.name}</p>
|
|
|
|
|
<p className=" cpersondiv1Items"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
width: "85px"
|
|
|
|
|
}}
|
|
|
|
|
>{item.identity === undefined || item.identity === null || item.identity === "" ? "--" : item.identity}</p>
|
|
|
|
|
<p className=" cpersondiv1Items"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
width: "110px"
|
|
|
|
|
}}
|
|
|
|
|
>{item.school_name === undefined || item.school_name === null || item.school_name === "" ? "--" : item.school_name}</p>
|
|
|
|
|
<p className=" cpersondiv1Items"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
color: "#FF6800",
|
|
|
|
|
width: "87px"
|
|
|
|
|
}}
|
|
|
|
|
>{item.enrollable === false ? "" : "已加入其他战队"}</p>
|
|
|
|
|
</a>
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
a:hover
|
|
|
|
|
{
|
|
|
|
|
color: #05101A;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
{item.name === undefined || item.name === null || item.name === "" ?
|
|
|
|
|
<a className=" cpersondiv1Items"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
width: "90px"
|
|
|
|
|
}}
|
|
|
|
|
>--</a>
|
|
|
|
|
:
|
|
|
|
|
<a title={item.name} className=" cpersondiv1Items maxnamewidth90"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
width: "90px"
|
|
|
|
|
}}
|
|
|
|
|
>{item.name}</a>
|
|
|
|
|
}
|
|
|
|
|
{item.student_id === undefined || item.student_id === null || item.student_id === "" ?
|
|
|
|
|
<p className=" cpersondiv1Items maxnamewidth85"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
width: "85px"
|
|
|
|
|
}}
|
|
|
|
|
>--</p>
|
|
|
|
|
:
|
|
|
|
|
<a title={"学号:" + item.student_id} className=" cpersondiv1Items maxnamewidth85"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
width: "85px"
|
|
|
|
|
}}
|
|
|
|
|
>{"学号:" + item.student_id}</a>}
|
|
|
|
|
{item.school_name === undefined || item.school_name === null || item.school_name === "" ?
|
|
|
|
|
|
|
|
|
|
<p className=" cpersondiv1Items"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
width: "110px"
|
|
|
|
|
}}
|
|
|
|
|
>--</p>
|
|
|
|
|
:
|
|
|
|
|
<a title={item.school_name} className=" cpersondiv1Items maxnamewidth110"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
width: "110px"
|
|
|
|
|
}}
|
|
|
|
|
>{item.school_name}</a>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
this.props.mutiple_limited === undefined || this.props.mutiple_limited === null ?
|
|
|
|
|
<p className=" cpersondiv1Items"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
width: "87px"
|
|
|
|
|
}}
|
|
|
|
|
>{""}</p>
|
|
|
|
|
:
|
|
|
|
|
(
|
|
|
|
|
this.props.mutiple_limited === true ?
|
|
|
|
|
<p className=" cpersondiv1Items"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
color: "#FF6800",
|
|
|
|
|
width: "87px"
|
|
|
|
|
}}
|
|
|
|
|
>{item.enrollable === false ? "已加入其他战队" : ""}</p>
|
|
|
|
|
:
|
|
|
|
|
<p className=" cpersondiv1Items"
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
width: "87px"
|
|
|
|
|
}}
|
|
|
|
|
>{""}</p>
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
const persondiv2 = (
|
|
|
|
|
<div className={" backgroundspersondiv cpersondiv1 borders2"}>
|
|
|
|
|
{/*this.state.loading2*/}
|
|
|
|
|
<Spin spinning={false}>
|
|
|
|
|
<div className={persondiv2Items.length === 0 ? "demo-infinite-container33" : "demo-infinite-container2"}>
|
|
|
|
|
<div className={persondiv2Items.length === 0 ? "demo-infinite-container33 " : "demo-infinite-container2 "}>
|
|
|
|
|
{
|
|
|
|
|
persondiv2Items.length === 0 ?
|
|
|
|
|
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE}/>
|
|
|
|
@ -857,16 +1219,16 @@ class PersonModal extends Component {
|
|
|
|
|
width="620px"
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
a:hover
|
|
|
|
|
{
|
|
|
|
|
background-color:#F6F4F4;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
{/*<style>*/}
|
|
|
|
|
{/* {*/}
|
|
|
|
|
{/* `*/}
|
|
|
|
|
{/* a:hover*/}
|
|
|
|
|
{/* {*/}
|
|
|
|
|
{/* background-color:#F6F4F4;*/}
|
|
|
|
|
{/* }*/}
|
|
|
|
|
{/* `*/}
|
|
|
|
|
{/* }*/}
|
|
|
|
|
{/*</style>*/}
|
|
|
|
|
<div className="permaindiv">
|
|
|
|
|
{/*队名*/}
|
|
|
|
|
<style>{
|
|
|
|
@ -963,6 +1325,7 @@ class PersonModal extends Component {
|
|
|
|
|
placeholder="请输入老师姓名的任意关键字进行搜索,可以后续在添加"
|
|
|
|
|
onPressEnter={this.startSearch}
|
|
|
|
|
onFocus={this.inputOnFocus}
|
|
|
|
|
onBlur={this.inputOnBlur}
|
|
|
|
|
onChange={(e) => this.teacheronChange(e)}
|
|
|
|
|
value={this.state.keywordteachers}
|
|
|
|
|
suffix={
|
|
|
|
@ -1008,11 +1371,6 @@ class PersonModal extends Component {
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
{/*<Search*/}
|
|
|
|
|
{/* */}
|
|
|
|
|
{/* placeholder="请输入想要队员姓名的任意关键字进行搜索"*/}
|
|
|
|
|
{/* onSearch={(value) => this.onSearch(value)}*/}
|
|
|
|
|
{/*/>*/}
|
|
|
|
|
|
|
|
|
|
<Dropdown overlay={persondiv2} getPopupContainer={trigger => trigger.parentNode}
|
|
|
|
|
visible={this.state.person2}>
|
|
|
|
@ -1021,6 +1379,7 @@ class PersonModal extends Component {
|
|
|
|
|
placeholder="请输入想要队员姓名的任意关键字进行搜索"
|
|
|
|
|
onPressEnter={this.startSearch2}
|
|
|
|
|
onFocus={this.inputOnFocus2}
|
|
|
|
|
onBlur={this.inputOnBlur2}
|
|
|
|
|
onChange={(e) => this.studentsonChange(e)}
|
|
|
|
|
value={this.state.keywordstudents}
|
|
|
|
|
suffix={
|
|
|
|
@ -1114,8 +1473,21 @@ class PersonModal extends Component {
|
|
|
|
|
) :
|
|
|
|
|
""
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
GetenrollmentAPI && GetenrollmentAPI.member_staff ?
|
|
|
|
|
(
|
|
|
|
|
Thecurrentnumberboolstu === true ?
|
|
|
|
|
<p style={{
|
|
|
|
|
marginLeft: "53px",
|
|
|
|
|
color: "#D0021B",
|
|
|
|
|
fontSize: "12px",
|
|
|
|
|
marginTop: "9px"
|
|
|
|
|
}}>战队队员为{GetenrollmentAPI.member_staff.minimum}-{GetenrollmentAPI.member_staff.maximum}人,现在为{Thecurrentnumberstu}人</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
: ""
|
|
|
|
|
) :
|
|
|
|
|
""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<div style={{
|
|
|
|
|
marginTop: "24px",
|
|
|
|
|