Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_forum
杨树明 5 years ago
commit b30b6bdfdb

@ -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">~</span>
{/*可选最大*/}
<Select className="fl w100"
onChange={(value) => 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}
>
<Option value={String("0")}>--</Option>
@ -3015,7 +3018,7 @@ class PollNew extends Component {
className="ml10 mr10 color-grey-6 lineh-40 fl">~</span>
{/*可选最大*/}
<Select className="fl w100"
onChange={(value) => 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}
>
<Option value={String("0")}>--</Option>
@ -3267,7 +3270,7 @@ class PollNew extends Component {
className="ml10 mr10 color-grey-6 lineh-40 fl">~</span>
{/*可选最大*/}
<Select className="fl w100"
onChange={(value) => 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}
>
<Option value={String("0")}>--</Option>

Loading…
Cancel
Save