diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js index be904afe7..edafd9e5b 100644 --- a/public/react/src/modules/courses/poll/PollNew.js +++ b/public/react/src/modules/courses/poll/PollNew.js @@ -844,12 +844,12 @@ class PollNew extends Component { if (object.question.question_type === 2) { if (object.question.max_choices > 0) { - if (object.question.min_choices < 2) { - this.props.showNotification(`可选最小不能少于2个`); - - return; - - } + // if (object.question.min_choices < 2) { + // this.props.showNotification(`可选最小不能少于2个`); + // + // return; + // + // } } } @@ -1332,10 +1332,10 @@ class PollNew extends Component { if (object.question.question_type === 2) { if (object.question.max_choices > 0) { - if (object.question.min_choices < 2) { - this.props.showNotification(`可选最小不能少于2个`); - return; - } + // if (object.question.min_choices < 2) { + // this.props.showNotification(`可选最小不能少于2个`); + // return; + // } } } if (object.question.new === "new") { @@ -2108,14 +2108,17 @@ class PollNew extends Component { } //最大值 - HandleGradationGroupChangeee = (value, index) => { - + HandleGradationGroupChangeee = (value, index,minchoices) => { + // console.log(value); let arr = this.state.adddom; for (var i = 0; i < arr.length; i++) { if (index === i) { + arr[i].question.min_choices= minchoices===null?0:minchoices===undefined?0:parseInt(minchoices); arr[i].question.max_choices = parseInt(value); } } + // console.log(2119); + // console.log(arr); this.setState({ adddom: arr }) @@ -2772,7 +2775,7 @@ class PollNew extends Component { className="ml10 mr10 color-grey-6 lineh-40 fl">~ {/*可选最大*/} this.HandleGradationGroupChangeee(value, indexo)} + onChange={(value) => this.HandleGradationGroupChangeee(value, indexo,itemo.question.min_choices)} value={itemo.question.max_choices === 0 || itemo.question.max_choices === "0" ? "--" : itemo.question.min_choices === null ? "--" : itemo.question.min_choices === undefined ? "--" : itemo.question.max_choices} > @@ -3267,7 +3270,7 @@ class PollNew extends Component { className="ml10 mr10 color-grey-6 lineh-40 fl">~ {/*可选最大*/}