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

@ -64,6 +64,7 @@ class Registration extends React.Component {
pint: 0, pint: 0,
competition_name: undefined, competition_name: undefined,
mutiple_limited: false, mutiple_limited: false,
teamutiple_limited: false,
} }
} }
@ -117,6 +118,7 @@ class Registration extends React.Component {
teacher_staff: result.data.teacher_staff, teacher_staff: result.data.teacher_staff,
member_staff: result.data.member_staff, member_staff: result.data.member_staff,
mutiple_limited: result.data.member_staff.mutiple_limited, mutiple_limited: result.data.member_staff.mutiple_limited,
teamutiple_limited: result.data.teacher_staff.mutiple_limited
}) })
if (result.data.enroll_ended === true) { if (result.data.enroll_ended === true) {
this.setState({ this.setState({
@ -631,7 +633,7 @@ class Registration extends React.Component {
render() { 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 ( return (
<div className="newMain clearfix newMainybot"> <div className="newMain clearfix newMainybot">
@ -659,6 +661,7 @@ class Registration extends React.Component {
tmodalsType === true ? tmodalsType === true ?
<PersonModal modalsType={tmodalsType} {...this.props} {...this.state} Newtit={Newtit} <PersonModal modalsType={tmodalsType} {...this.props} {...this.state} Newtit={Newtit}
mutiple_limited={mutiple_limited} mutiple_limited={mutiple_limited}
teamutiple_limited={teamutiple_limited}
itemiddata={itemiddata} GetenrollmentAPI={GetenrollmentAPI} itemiddata={itemiddata} GetenrollmentAPI={GetenrollmentAPI}
Tmoconfirm1={(bool) => this.Tmoconfirm1(bool)} Tmoconfirm1={(bool) => this.Tmoconfirm1(bool)}
GetenrollmentAPIopens={() => this.GetenrollmentAPI()} GetenrollmentAPIopens={() => this.GetenrollmentAPI()}

@ -774,6 +774,31 @@ reglistviewdivs2 {
cursor: default; 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 { .maxnamewidth160 {
max-width: 160px; max-width: 160px;
overflow: hidden; overflow: hidden;

@ -878,37 +878,107 @@ class PersonModal extends Component {
var cpersondiv1Items = []; var cpersondiv1Items = [];
if (teacher_ids) { if (teacher_ids) {
cpersondiv1Items = teacher_ids.map((item, index) => 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%", width: "100%",
display: "flex", display: "flex",
justifyContent: " space-around", justifyContent: " space-around",
alignItems: "center", alignItems: "center",
height: "40px", height: "40px",
}} }}
onClick={() => this.getdatacpersondiv1Items(item)} onClick={() => this.getdatacpersondiv1Items(item)}
> >
<p className=" cpersondiv1Items" <style>
style={{ {
textAlign: "center", `
width: "100px" a:hover
}} {
>{item.name === undefined || item.name === null || item.name === "" ? "--" : item.name}</p> color: #05101A;
<p className=" cpersondiv1Items" }
style={{ `
textAlign: "center", }
width: "100px" </style>
{item.name === undefined || item.name === null || item.name === "" ?
}} <a className=" cpersondiv1Items"
> {item.identity === undefined || item.identity === null || item.identity === "" ? "--" : item.identity}</p> style={{
<p className=" cpersondiv1Items" textAlign: "center",
style={{ width: "90px"
textAlign: "center", }}
width: "120px" >--</a>
:
}} <a title={item.name} className=" cpersondiv1Items maxnamewidth90"
>{item.school_name === undefined || item.school_name === null || item.school_name === "" ? "--" : item.school_name}</p> 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> </a>
); );
} }
@ -953,24 +1023,62 @@ class PersonModal extends Component {
}} }}
onClick={() => this.getdatacpersondiv1Items2(item)} onClick={() => this.getdatacpersondiv1Items2(item)}
> >
<p className=" cpersondiv1Items" <style>
style={{ {
textAlign: "center", `
width: "90px" a:hover
}} {
>{item.name === undefined || item.name === null || item.name === "" ? "--" : item.name}</p> color: #05101A;
<p className=" cpersondiv1Items" }
style={{ `
textAlign: "center", }
width: "85px" </style>
}} {item.name === undefined || item.name === null || item.name === "" ?
>{item.identity === undefined || item.identity === null || item.identity === "" ? "--" : item.identity}</p> <a className=" cpersondiv1Items"
<p className=" cpersondiv1Items" style={{
style={{ textAlign: "center",
textAlign: "center", width: "90px"
width: "110px" }}
}} >--</a>
>{item.school_name === undefined || item.school_name === null || item.school_name === "" ? "--" : item.school_name}</p> :
<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 ? this.props.mutiple_limited === undefined || this.props.mutiple_limited === null ?
<p className=" cpersondiv1Items" <p className=" cpersondiv1Items"
@ -1199,11 +1307,6 @@ class PersonModal extends Component {
` `
} }
</style> </style>
{/*<Search*/}
{/* */}
{/* placeholder="请输入想要队员姓名的任意关键字进行搜索"*/}
{/* onSearch={(value) => this.onSearch(value)}*/}
{/*/>*/}
<Dropdown overlay={persondiv2} getPopupContainer={trigger => trigger.parentNode} <Dropdown overlay={persondiv2} getPopupContainer={trigger => trigger.parentNode}
visible={this.state.person2}> visible={this.state.person2}>

Loading…
Cancel
Save