dev_aliyun_beta
杨树林 6 years ago
parent 622623eaae
commit 04cd8f4eab

@ -2141,8 +2141,14 @@ class PollNewQuestbank extends Component {
})
}
//最小值
//最小值
HandleGradationGroupChangee = (value, index, max, length) => {
// console.log("最小值");
// console.log(value);
// console.log(index);
// console.log(max);
// console.log(length);
// debugger
var minbool = false;
var maxbool = false;
@ -2166,18 +2172,8 @@ class PollNewQuestbank extends Component {
} else {
for (var i = 0; i < arr.length; i++) {
if (index === i) {
try {
if(parseInt(value)===0){
arr[i].question.min_choices = 2;
arr[i].question.max_choices = length;
}else{
arr[i].question.min_choices = parseInt(value);
arr[i].question.max_choices = length;
}
}catch (e) {
arr[i].question.min_choices = 2;
arr[i].question.max_choices = length;
}
arr[i].question.min_choices = parseInt(value);
arr[i].question.max_choices = length;
break;
}
}
@ -2189,19 +2185,32 @@ class PollNewQuestbank extends Component {
}
//最大值
HandleGradationGroupChangeee = (value, index,minchoices) => {
HandleGradationGroupChangeee = (value, index,minchoices,length) => {
// console.log("2112");
// console.log(value);
// console.log(minchoices);
// console.log("最大值");
// console.log(value);
// console.log(index);
// console.log(minchoices);
// console.log(length);
let arr = this.state.adddom;
for (var i = 0; i < arr.length; i++) {
if (index === i) {
if(parseInt(value)===0&&parseInt(minchoices)===0){
arr[i].question.min_choices= parseInt(0);
arr[i].question.max_choices = parseInt(0);
}else if(parseInt(minchoices)===0){
arr[i].question.min_choices= parseInt(2);
arr[i].question.max_choices = parseInt(value);
}
else if(parseInt(value)===0&&parseInt(minchoices)>0){
arr[i].question.min_choices= parseInt(minchoices);
arr[i].question.max_choices = parseInt(value);
}else {
}
else {
arr[i].question.min_choices= minchoices===null?2:minchoices===undefined?2:minchoices===0?2:parseInt(minchoices);
arr[i].question.max_choices = parseInt(value);
arr[i].question.max_choices = parseInt(value);
}
}
}

Loading…
Cancel
Save