dev_sync_trustie
杨树林 5 years ago
parent cfd9e4f6c0
commit 8007cf0145

@ -64,6 +64,7 @@ class Registration extends React.Component {
pint: 0,
competition_name: undefined,
mutiple_limited: false,
teamutiple_limited: false,
}
}
@ -117,6 +118,7 @@ class Registration extends React.Component {
teacher_staff: result.data.teacher_staff,
member_staff: result.data.member_staff,
mutiple_limited: result.data.member_staff.mutiple_limited,
teamutiple_limited: result.data.teacher_staff.mutiple_limited
})
if (result.data.enroll_ended === true) {
this.setState({
@ -631,7 +633,7 @@ class Registration extends React.Component {
render() {
const {page, pages, limit, type, tmodalsType, tmodalsTypes, data, count, competition_teams, Newtit, itemiddata, messagePerbool, messageexitol, GetenrollmentAPI, loadingstate, pint, competition_name, mutiple_limited} = this.state;
const {page, pages, limit, type, tmodalsType, tmodalsTypes, data, count, competition_teams, Newtit, itemiddata, messagePerbool, messageexitol, GetenrollmentAPI, loadingstate, pint, competition_name, mutiple_limited, teamutiple_limited} = this.state;
return (
<div className="newMain clearfix newMainybot">
@ -659,6 +661,7 @@ class Registration extends React.Component {
tmodalsType === true ?
<PersonModal modalsType={tmodalsType} {...this.props} {...this.state} Newtit={Newtit}
mutiple_limited={mutiple_limited}
teamutiple_limited={teamutiple_limited}
itemiddata={itemiddata} GetenrollmentAPI={GetenrollmentAPI}
Tmoconfirm1={(bool) => this.Tmoconfirm1(bool)}
GetenrollmentAPIopens={() => this.GetenrollmentAPI()}

@ -774,6 +774,31 @@ reglistviewdivs2 {
cursor: default;
}
.maxnamewidth85 {
max-width: 85px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: default;
}
.maxnamewidth90 {
max-width: 90px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: default;
}
.maxnamewidth110 {
max-width: 110px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: default;
}
.maxnamewidth160 {
max-width: 160px;
overflow: hidden;

@ -878,37 +878,107 @@ class PersonModal extends Component {
var cpersondiv1Items = [];
if (teacher_ids) {
cpersondiv1Items = teacher_ids.map((item, index) =>
<a className="reglistviewdivss2" key={index} style={{
<a
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)}
onClick={() => 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>
<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>
)
}
</a>
);
}
@ -953,24 +1023,62 @@ class PersonModal extends Component {
}}
onClick={() => 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>
<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"
@ -1199,11 +1307,6 @@ class PersonModal extends Component {
`
}
</style>
{/*<Search*/}
{/* */}
{/* placeholder="请输入想要队员姓名的任意关键字进行搜索"*/}
{/* onSearch={(value) => this.onSearch(value)}*/}
{/*/>*/}
<Dropdown overlay={persondiv2} getPopupContainer={trigger => trigger.parentNode}
visible={this.state.person2}>

Loading…
Cancel
Save