dev_sync_trustie
杨树林 5 years ago
parent 8414c6a3b2
commit dbd1e97d40

@ -589,6 +589,12 @@ reglistviewdivs2 {
}
.demo-infinite-container33 {
border-radius: 2px;
height: 161px;
width: 410px;
}
.cpersondiv1Items {
color: #05101A;
font-size: 12px;

@ -6,6 +6,7 @@ import competition from '../comcss/competition.css';
import Registrationitem from "../Registrationitem";
import InfiniteScroll from 'react-infinite-scroller';
// import PersonModaltion from "./PersonModaltion";
import NoneData from '../../../modules/courses/coursesPublic/NoneData'
const {Search} = Input;
//创建战队
@ -64,6 +65,9 @@ class PersonModal extends Component {
}
Getteacherdata = (keywordteachers, team_idteachers, teacher_ids) => {
this.setState({
person2: false,
})
//老师姓名 keyword
//当前战队ID team_id
//当前老师ID数组 teacher_ids
@ -88,6 +92,9 @@ class PersonModal extends Component {
})
};
Getstudentsdata = (keywordstudents, team_idstudents, student_ids) => {
this.setState({
person1: false,
})
//学生姓名 keyword
//当前战队ID team_id
//当前队员ID数组 student_ids
@ -117,22 +124,69 @@ class PersonModal extends Component {
teacheronChange = (e) => {
console.log(e.target.value);
console.log("老师输入框事件|||||||||||123123123");
try {
if (e.target.value.length > 0) {
this.setState({
person1: true,
person2: false,
keywordteachers: e.target.value
})
} else {
this.setState({
person1: false,
person2: false,
keywordteachers: e.target.value
})
}
} catch (e) {
this.setState({
person1: true,
person2: false,
keywordteachers: e.target.value
})
}
try {
const {team_idteachers, teacher_ids} = this.state;
this.Getteacherdata(e.target.value, team_idteachers, teacher_ids);
} catch (e) {
}
};
//学生输入框事件
studentsonChange = (e) => {
console.log("学生输入框事件");
console.log(e);
try {
if (e.target.value.length > 0) {
this.setState({
person2: true,
person1: false,
keywordstudents: e.target.value
})
});
} else {
this.setState({
person2: false,
person1: false,
keywordstudents: e.target.value
});
}
} catch (e) {
this.setState({
person2: true,
person1: false,
keywordstudents: e.target.value
});
}
try {
const {team_idstudents, student_ids} = this.statel
this.Getstudentsdata(e.target.value, team_idstudents, student_ids);
} catch (e) {
}
}
//点击获取老师数据
getdatacpersondiv1Items = (object) => {
@ -249,17 +303,60 @@ class PersonModal extends Component {
inputOnFocus = (e) => {
console.log("inputOnFocus");
console.log(e);
try {
if (this.state.keywordteachers && this.state.keywordteachers.length > 0) {
this.setState({
person1: true,
person2: false,
})
} else {
this.setState({
person1: false,
person2: false,
})
}
} catch (e) {
this.setState({
person1: true
person1: true,
person2: false,
})
}
}
inputOnFocus2 = (e) => {
console.log("inputOnFocus2");
console.log(e);
try {
if (this.state.keywordstudents && this.state.keywordstudents.length > 0) {
this.setState({
person2: true,
person1: false,
})
} else {
this.setState({
person2: true
person2: false,
person1: false,
})
}
} catch (e) {
this.setState({
person2: true,
person1: false,
})
}
}
inputOnFocus3 = (e) => {
console.log("inputOnFocus3");
console.log(e);
this.setState({
person2: false,
person1: false,
})
}
@ -352,7 +449,11 @@ class PersonModal extends Component {
const cpersondiv1 = (
<div className={" backgroundspersondiv cpersondiv1 borders2"}>
<Spin spinning={false}>
<div className="demo-infinite-container2">
<div className={cpersondiv1Items.length === 0 ? "demo-infinite-container33" : "demo-infinite-container2"}>
{
cpersondiv1Items.length === 0 ?
<NoneData></NoneData>
:
<InfiniteScroll
initialLoad={false}
pageStart={0}
@ -366,6 +467,8 @@ class PersonModal extends Component {
}
</InfiniteScroll>
}
</div>
</Spin>
</div>
@ -410,7 +513,11 @@ class PersonModal extends Component {
<div className={" backgroundspersondiv cpersondiv1 borders2"}>
{/*this.state.loading2*/}
<Spin spinning={false}>
<div className="demo-infinite-container2">
<div className={persondiv2Items.length === 0 ? "demo-infinite-container33" : "demo-infinite-container2"}>
{
persondiv2Items.length === 0 ?
<NoneData></NoneData>
:
<InfiniteScroll
initialLoad={false}
pageStart={0}
@ -424,6 +531,7 @@ class PersonModal extends Component {
}
</InfiniteScroll>
}
</div>
</Spin>
</div>
@ -504,7 +612,8 @@ class PersonModal extends Component {
队名:
</p>
<Input className="yslzxueshiskmc" onInput={this.changeTopicName} placeholder="请输入您的战队名称最多不超过60个字符"
<Input className="yslzxueshiskmc" onInput={this.changeTopicName} onFocus={this.inputOnFocus3}
placeholder="请输入您的战队名称最多不超过60个字符"
addonAfter={String(addonAfter) + "/60"} maxLength={60}/>
</div>

Loading…
Cancel
Save