From c13dfbaa5b2bbe63057756a9b628dfc333abee79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 24 Oct 2019 22:49:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=9E=E8=B5=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/competition/Registration.js | 2 +- .../competition/comcss/competition.css | 31 ++++ .../competition/competmodal/PersonModal.js | 80 +++++++++-- .../competmodal/PersonalModalteam.js | 13 ++ .../personal/PersonalCompetititem.js | 136 ++++++++++++------ 5 files changed, 205 insertions(+), 57 deletions(-) diff --git a/public/react/src/modules/competition/Registration.js b/public/react/src/modules/competition/Registration.js index d599fdf3d..f0fc873c8 100644 --- a/public/react/src/modules/competition/Registration.js +++ b/public/react/src/modules/competition/Registration.js @@ -508,7 +508,7 @@ class Registration extends React.Component { }) if (bool) { //确认 - + this.Refreshteam(); } else { //取消 diff --git a/public/react/src/modules/competition/comcss/competition.css b/public/react/src/modules/competition/comcss/competition.css index 0f34dbf0d..075934e4b 100644 --- a/public/react/src/modules/competition/comcss/competition.css +++ b/public/react/src/modules/competition/comcss/competition.css @@ -410,6 +410,15 @@ } +.regitemimgs222 { + margin-top: 12px; + width: 28px; + height: 28px; + margin-left: 20px; + border-radius: 50%; + +} + .regitemimgs3 { /* border: 0.5px solid; */ height: 22px; @@ -426,6 +435,11 @@ margin-top: 18px; } +.regitemimgs444 { + display: flex; + flex-direction: row-reverse; + margin-top: 18px; +} .regitemimgs5 { margin-left: 10px; text-align: center; @@ -442,6 +456,23 @@ cursor: pointer } +.regitemimgs555 { + margin-left: 33px; + text-align: center; + background: #ffffff; + height: 40px; + width: 72px; + color: #459be5; + border-radius: 4px; + display: flex; + align-items: center; + justify-content: center; + border: 1px; + border-style: solid; + border-color: #459BE5; + cursor: pointer +} + .regitemimgs6 { text-align: center; background: #ffffff; diff --git a/public/react/src/modules/competition/competmodal/PersonModal.js b/public/react/src/modules/competition/competmodal/PersonModal.js index a27ba9b00..bbaa0332f 100644 --- a/public/react/src/modules/competition/competmodal/PersonModal.js +++ b/public/react/src/modules/competition/competmodal/PersonModal.js @@ -10,6 +10,8 @@ import NoneData from '../../../modules/courses/coursesPublic/NoneData' const {Search} = Input; //创建战队 +var myabool = true; +var myabool2 = true; class PersonModal extends Component { //导师是搜索 和学生搜索都会添加到下面框中 /** @@ -146,6 +148,16 @@ 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; @@ -177,6 +189,25 @@ 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) { @@ -424,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, @@ -470,15 +512,15 @@ class PersonModal extends Component { 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, @@ -589,20 +631,26 @@ class PersonModal extends Component { } inputOnBlur = (e) => { - // ////console.log("inputOnBlur"); - // ////console.log(e); - this.setState({ - person1: false, - person2: 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({ - person1: false, - person2: false - }) + if (myabool2 === true) { + this.setState({ + person1: false, + person2: false + }) + } + } startSearch = (e) => { @@ -876,6 +924,8 @@ class PersonModal extends Component { ); var cpersondiv1Items = []; + // console.log("this.props.teamutiple_limited "); + // console.log(this.props.teamutiple_limited ); if (teacher_ids) { cpersondiv1Items = teacher_ids.map((item, index) => this.getdatacpersondiv1Items(item)} + onMouseDown={() => this.getdatacpersondiv1Items(item)} >