diff --git a/public/react/src/modules/competition/comcss/competition.css b/public/react/src/modules/competition/comcss/competition.css index 3f74dddde..b324dc939 100644 --- a/public/react/src/modules/competition/comcss/competition.css +++ b/public/react/src/modules/competition/comcss/competition.css @@ -589,6 +589,12 @@ reglistviewdivs2 { } +.demo-infinite-container33 { + border-radius: 2px; + height: 161px; + width: 410px; + +} .cpersondiv1Items { color: #05101A; font-size: 12px; diff --git a/public/react/src/modules/competition/competmodal/PersonModal.js b/public/react/src/modules/competition/competmodal/PersonModal.js index 656bd41eb..cb130f5df 100644 --- a/public/react/src/modules/competition/competmodal/PersonModal.js +++ b/public/react/src/modules/competition/competmodal/PersonModal.js @@ -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,21 +124,68 @@ class PersonModal extends Component { teacheronChange = (e) => { console.log(e.target.value); console.log("老师输入框事件|||||||||||123123123"); - this.setState({ - person1: true, - keywordteachers: e.target.value - }) + 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); - this.setState({ - person2: true, - keywordstudents: e.target.value - }) + 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) { + + } } //点击获取老师数据 @@ -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, + person2: false, + }) + } - this.setState({ - person1: true - }) } 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: false, + person1: false, + }) + } + + } catch (e) { + this.setState({ + person2: true, + person1: false, + }) + } + + + } + + inputOnFocus3 = (e) => { + console.log("inputOnFocus3"); + console.log(e); this.setState({ - person2: true + person2: false, + person1: false, }) } @@ -352,7 +449,11 @@ class PersonModal extends Component { const cpersondiv1 = (
-
+
+ { + cpersondiv1Items.length === 0 ? + + : + } +
@@ -410,7 +513,11 @@ class PersonModal extends Component {
{/*this.state.loading2*/} -
+
+ { + persondiv2Items.length === 0 ? + + : + }
@@ -504,7 +612,8 @@ class PersonModal extends Component { 队名:

-