From 4974f6638896ea397b44964ad83520528345e160 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, 5 Sep 2019 16:28:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/poll/PollNewQuestbank.js | 119 +++++++++++------- 1 file changed, 76 insertions(+), 43 deletions(-) diff --git a/public/react/src/modules/courses/poll/PollNewQuestbank.js b/public/react/src/modules/courses/poll/PollNewQuestbank.js index 14a7d2306..c598dc371 100644 --- a/public/react/src/modules/courses/poll/PollNewQuestbank.js +++ b/public/react/src/modules/courses/poll/PollNewQuestbank.js @@ -1061,11 +1061,11 @@ class PollNewQuestbank extends Component { if(object.question.min_choices>0){ if(object.question.max_choices){ if(object.question.max_choices===0){ - this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + this.props.showNotification(`可选的最大限制不能小于最小限制!`); return; } }else { - this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + this.props.showNotification(`可选的最大限制不能小于最小限制!`); return; } @@ -1292,11 +1292,11 @@ class PollNewQuestbank extends Component { if(object.question.min_choices>0){ if(object.question.max_choices){ if(object.question.max_choices===0){ - this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + this.props.showNotification(`最大限制不能小于最小限制!`); return; } }else { - this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + this.props.showNotification(`最大限制不能小于最小限制!`); return; } @@ -1622,11 +1622,11 @@ class PollNewQuestbank extends Component { if(object.question.min_choices>0){ if(object.question.max_choices){ if(object.question.max_choices===0){ - this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + this.props.showNotification(`可选的最大限制不能小于最小限制!`); return; } }else { - this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + this.props.showNotification(`可选的最大限制不能小于最小限制!`); return; } @@ -1826,11 +1826,11 @@ class PollNewQuestbank extends Component { if(object.question.min_choices>0){ if(object.question.max_choices){ if(object.question.max_choices===0){ - this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + this.props.showNotification(`可选的最大限制不能小于最小限制!`); return; } }else { - this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + this.props.showNotification(`可选的最大限制不能小于最小限制!`); return; } @@ -3209,16 +3209,17 @@ class PollNewQuestbank extends Component { }} onInput={(e) => this.HandleInputChanges(e, indexo, indext)}> {this.state.polls_status === undefined || this.state.polls_status === 1 ? - (itemo.question.question_type === 2 && itemo.question.answers.length === 3 ? - (indext ===1? - this.Ewoption(itemo.question.id, itemo)}> - : - "" - ) - : + // (itemo.question.question_type === 2 && itemo.question.answers.length === 3 ? + // (indext ===1? + // this.Ewoption(itemo.question.id, itemo)}> + // : + // "" + // ) + // "" + // : itemo.question.answers.length > 2 &&indext>1? :"") - : "") - : ""} + // : "") + : "":""}

)} ) @@ -3267,8 +3268,8 @@ class PollNewQuestbank extends Component { {this.state.polls_status === undefined || this.state.polls_status === 1 ? (this.state.newoption === false ? - this.Addanotheroption(itemo.question.id)}>添加[其它]选项 + this.Addanotheroption(itemo.question.id)}>添加[其它]选项 : "") : ""} @@ -3293,11 +3294,11 @@ class PollNewQuestbank extends Component { {polls_status === undefined || polls_status === 1 ? (newoption === false ? - this.Addanotheroption(itemo.question.id)}>添加[其它]选项 + this.Addanotheroption(itemo.question.id)}>添加[其它]选项 : "") : ""} -
+
可选
@@ -3314,6 +3315,17 @@ class PollNewQuestbank extends Component { "display": "block"; "opacity": "1"; } + .ant-select-selection__rendered{ + height:100%; + line-height:37px; + text-align:center; + } + .ant-select-selection-selected-value{ + display:block; + opacity:1; + width:100% + } + ` } @@ -3524,14 +3536,13 @@ class PollNewQuestbank extends Component { }} onInput={(e) => this.HandleInputChanges(e, indexo, indext)}> {this.state.polls_status === undefined || this.state.polls_status === 1 ? - ( itemo.question.question_type === 2 && itemo.question.answers.length === 3 ? - (indext ===1? - this.Ewoption(itemo.question.id, itemo)}> - :"") - : + // ( itemo.question.question_type === 2 && itemo.question.answers.length === 3 ? + // (indext ===1? + // this.Ewoption(itemo.question.id, itemo)}> + // :"") itemo.question.answers.length > 2 && indext>1 ? :"") - : "") - : ""} + // : "") + : "":""}

)}
) @@ -3580,8 +3591,8 @@ class PollNewQuestbank extends Component { {this.state.polls_status === undefined || this.state.polls_status === 1 ? (this.state.newoption === false ? - this.Addanotheroption(itemo.question.id)}>添加[其它]选项 + this.Addanotheroption(itemo.question.id)}>添加[其它]选项 : "") : ""} @@ -3606,8 +3617,8 @@ class PollNewQuestbank extends Component { {polls_status === undefined || polls_status === 1 ? (newoption === false ? - this.Addanotheroption(itemo.question.id)}>添加[其它]选项 + this.Addanotheroption(itemo.question.id)}>添加[其它]选项 : "") : ""}
@@ -3627,6 +3638,17 @@ class PollNewQuestbank extends Component { "display": "block"; "opacity": "1"; } + .ant-select-selection__rendered{ + height:100%; + line-height:37px; + text-align:center; + } + .ant-select-selection-selected-value{ + display:block; + opacity:1; + width:100% + } + ` } @@ -3909,8 +3931,8 @@ class PollNewQuestbank extends Component { {polls_status === undefined || polls_status === 1 ? (newoption === false ? - this.Addanotheroption(itemo.question.id)}>添加[其它]选项 + this.Addanotheroption(itemo.question.id)}>添加[其它]选项 : "") : ""} @@ -3936,8 +3958,8 @@ class PollNewQuestbank extends Component { {polls_status === undefined || polls_status === 1 ? (newoption === false ? - this.Addanotheroption(itemo.question.id)}>添加[其它]选项 + this.Addanotheroption(itemo.question.id)}>添加[其它]选项 : "") : ""}
@@ -3957,6 +3979,17 @@ class PollNewQuestbank extends Component { "display": "block"; "opacity": "1"; } + .ant-select-selection__rendered{ + height:100%; + line-height:37px; + text-align:center; + } + .ant-select-selection-selected-value{ + display:block; + opacity:1; + width:100% + } + ` }