|
|
|
@ -280,9 +280,13 @@ class PollNew extends Component {
|
|
|
|
|
questionnair: true,
|
|
|
|
|
left_banner_id:result.data.left_banner_id
|
|
|
|
|
})
|
|
|
|
|
// console.log(this.state.polls_nametest)
|
|
|
|
|
// console.log(this.state.polls_descriptiontest)
|
|
|
|
|
// }
|
|
|
|
|
if( result.data.poll.polls_name){
|
|
|
|
|
if( result.data.poll.polls_name.length>0){
|
|
|
|
|
this.setState({
|
|
|
|
|
addonAfter: result.data.poll.polls_name.length,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
})
|
|
|
|
@ -326,8 +330,13 @@ class PollNew extends Component {
|
|
|
|
|
polls_descriptiontest: result.data.poll.polls_description,
|
|
|
|
|
questionnair: true,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
if( result.data.poll.polls_name){
|
|
|
|
|
if( result.data.poll.polls_name.length>0){
|
|
|
|
|
this.setState({
|
|
|
|
|
addonAfter: result.data.poll.polls_name.length,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
})
|
|
|
|
@ -966,17 +975,22 @@ class PollNew extends Component {
|
|
|
|
|
if (this.state.problemtopicbool === true) {
|
|
|
|
|
insindex = this.state.problemtopic;
|
|
|
|
|
}
|
|
|
|
|
this.createquestionsandanswers(object, 1, arrc, null, 0, 0, insindex);
|
|
|
|
|
this.createquestionsandanswers(object, 1, arrc, null, 0, 0, insindex,0);
|
|
|
|
|
// newarrpoll.push(question);
|
|
|
|
|
newarrpoll.splice(thiss.state.Insertposition, 0, question);
|
|
|
|
|
|
|
|
|
|
} else if (object.question.question_type === 2) {
|
|
|
|
|
//插入多选题
|
|
|
|
|
if(object.question.max_choices){
|
|
|
|
|
if(object.question.max_choices>0){
|
|
|
|
|
if (object.question.max_choices < object.question.min_choices) {
|
|
|
|
|
this.props.showNotification(`可选的最大限制不能小于最小限制`);
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var questiontwo = {};
|
|
|
|
|
var other = [];
|
|
|
|
@ -1026,7 +1040,7 @@ class PollNew extends Component {
|
|
|
|
|
if (this.state.problemtopicbool === true) {
|
|
|
|
|
insindex = this.state.problemtopic;
|
|
|
|
|
}
|
|
|
|
|
this.createquestionsandanswers(object, 2, arrc, null, object.question.max_choices, object.question.min_choices, insindex);
|
|
|
|
|
this.createquestionsandanswers(object, 2, arrc, null, object.question.max_choices, object.question.min_choices, insindex,object.question.answers.length);
|
|
|
|
|
//插入多选题
|
|
|
|
|
// if (object.question.max_choices > arrc.length) {
|
|
|
|
|
// // console.log("选择题的最大可选项不能大于选项数")
|
|
|
|
@ -1096,7 +1110,7 @@ class PollNew extends Component {
|
|
|
|
|
if (this.state.problemtopicbool === true) {
|
|
|
|
|
insindex = this.state.problemtopic;
|
|
|
|
|
}
|
|
|
|
|
this.createquestionsandanswers(object, 3, null, null, 0, 0, insindex);
|
|
|
|
|
this.createquestionsandanswers(object, 3, null, null, 0, 0, insindex,0);
|
|
|
|
|
// newarrpoll.push(question);
|
|
|
|
|
newarrpoll.splice(thiss.state.Insertposition, 0, question);
|
|
|
|
|
}
|
|
|
|
@ -1159,23 +1173,31 @@ class PollNew extends Component {
|
|
|
|
|
question = {"question": questiontwo};
|
|
|
|
|
if (uuk !== -1) {
|
|
|
|
|
// console.log("修改")
|
|
|
|
|
this.edittotheserver(object, 1, arrc, null, 0, 0);
|
|
|
|
|
this.edittotheserver(object, 1, arrc, null, 0, 0,0);
|
|
|
|
|
newarrpoll.splice(uuk, 1, question);
|
|
|
|
|
} else {
|
|
|
|
|
// console.log("他原来的删除掉了")
|
|
|
|
|
this.createquestionsandanswers(object, 1, arrc, null, 0, 0, object.question.id);
|
|
|
|
|
this.createquestionsandanswers(object, 1, arrc, null, 0, 0, object.question.id,0);
|
|
|
|
|
newarrpoll.push(question);
|
|
|
|
|
}
|
|
|
|
|
newarr[indexo].question.new = "new"
|
|
|
|
|
// console.log(newarrpoll)
|
|
|
|
|
} else if (object.question.question_type === 2) {
|
|
|
|
|
//插入多选题
|
|
|
|
|
|
|
|
|
|
if(object.question.max_choices){
|
|
|
|
|
if(object.question.max_choices>0){
|
|
|
|
|
if (object.question.max_choices < object.question.min_choices) {
|
|
|
|
|
this.props.showNotification('可选的最大限制不能小于最小限制!');
|
|
|
|
|
this.props.showNotification(`可选的最大限制不能小于最小限制`);
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// if (object.question.max_choices < object.question.min_choices) {
|
|
|
|
|
// this.props.showNotification('可选的最大限制不能小于最小限制!');
|
|
|
|
|
//
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
var questiontwo = {};
|
|
|
|
|
var other = [];
|
|
|
|
|
var option = [];
|
|
|
|
@ -1230,11 +1252,11 @@ class PollNew extends Component {
|
|
|
|
|
// }
|
|
|
|
|
if (uuk !== -1) {
|
|
|
|
|
// console.log("修改")
|
|
|
|
|
this.edittotheserver(object, 2, arrc, null, object.question.max_choices, object.question.min_choices);
|
|
|
|
|
this.edittotheserver(object, 2, arrc, null, object.question.max_choices, object.question.min_choices,object.question.answers.length);
|
|
|
|
|
newarrpoll.splice(uuk, 1, question);
|
|
|
|
|
} else {
|
|
|
|
|
// console.log("删除")
|
|
|
|
|
this.createquestionsandanswers(object, 2, arrc, null, object.question.max_choices, object.question.min_choices, object.question.id);
|
|
|
|
|
this.createquestionsandanswers(object, 2, arrc, null, object.question.max_choices, object.question.min_choices, object.question.id,object.question.answers.length);
|
|
|
|
|
newarrpoll.push(question);
|
|
|
|
|
}
|
|
|
|
|
// console.log(newarrpoll)
|
|
|
|
@ -1276,11 +1298,11 @@ class PollNew extends Component {
|
|
|
|
|
|
|
|
|
|
if (uuk !== -1) {
|
|
|
|
|
// console.log("修改")
|
|
|
|
|
this.edittotheserver(object, 3, null, null, 0, 0);
|
|
|
|
|
this.edittotheserver(object, 3, null, null, 0, 0,0);
|
|
|
|
|
newarrpoll.splice(uuk, 1, question);
|
|
|
|
|
} else {
|
|
|
|
|
// console.log("删除")
|
|
|
|
|
this.createquestionsandanswers(object, 3, null, null, 0, 0, object.question.id);
|
|
|
|
|
this.createquestionsandanswers(object, 3, null, null, 0, 0, object.question.id,0);
|
|
|
|
|
newarrpoll.push(question);
|
|
|
|
|
}
|
|
|
|
|
// console.log(newarrpoll)
|
|
|
|
@ -1448,15 +1470,24 @@ class PollNew extends Component {
|
|
|
|
|
if (this.state.problemtopicbool === true) {
|
|
|
|
|
insindex = this.state.problemtopic;
|
|
|
|
|
}
|
|
|
|
|
this.createquestionsandanswers(object, 1, arrc, null, 0, 0, insindex);
|
|
|
|
|
this.createquestionsandanswers(object, 1, arrc, null, 0, 0, insindex,0);
|
|
|
|
|
newarrpoll.splice(thiss.state.Insertposition, 0, question);
|
|
|
|
|
} else if (object.question.question_type === 2) {
|
|
|
|
|
//插入多选题
|
|
|
|
|
if(object.question.max_choices){
|
|
|
|
|
if(object.question.max_choices>0){
|
|
|
|
|
if (object.question.max_choices < object.question.min_choices) {
|
|
|
|
|
this.props.showNotification(`可选的最大限制不能小于最小限制`);
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// if (object.question.max_choices < object.question.min_choices) {
|
|
|
|
|
// this.props.showNotification(`可选的最大限制不能小于最小限制`);
|
|
|
|
|
//
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
var questiontwo = {};
|
|
|
|
|
var other = [];
|
|
|
|
@ -1502,7 +1533,7 @@ class PollNew extends Component {
|
|
|
|
|
if (this.state.problemtopicbool === true) {
|
|
|
|
|
insindex = this.state.problemtopic;
|
|
|
|
|
}
|
|
|
|
|
this.createquestionsandanswers(object, 2, arrc, null, object.question.max_choices, object.question.min_choices, insindex);
|
|
|
|
|
this.createquestionsandanswers(object, 2, arrc, null, object.question.max_choices, object.question.min_choices, insindex,object.question.answers.length);
|
|
|
|
|
//插入多选题
|
|
|
|
|
// if (object.question.max_choices > arrc.length) {
|
|
|
|
|
|
|
|
|
@ -1550,7 +1581,7 @@ class PollNew extends Component {
|
|
|
|
|
if (this.state.problemtopicbool === true) {
|
|
|
|
|
insindex = this.state.problemtopic;
|
|
|
|
|
}
|
|
|
|
|
this.createquestionsandanswers(object, 3, null, null, 0, 0, insindex);
|
|
|
|
|
this.createquestionsandanswers(object, 3, null, null, 0, 0, insindex,0);
|
|
|
|
|
// newarrpoll.push(question);
|
|
|
|
|
newarrpoll.splice(thiss.state.Insertposition, 0, question);
|
|
|
|
|
}
|
|
|
|
@ -1611,21 +1642,30 @@ class PollNew extends Component {
|
|
|
|
|
question = {"question": questiontwo};
|
|
|
|
|
if (uuk !== -1) {
|
|
|
|
|
// console.log("修改")
|
|
|
|
|
this.edittotheserver(object, 1, arrc, null, 0, 0);
|
|
|
|
|
this.edittotheserver(object, 1, arrc, null, 0, 0,0);
|
|
|
|
|
newarrpoll.splice(uuk, 1, question);
|
|
|
|
|
} else {
|
|
|
|
|
// console.log("删除")
|
|
|
|
|
this.createquestionsandanswers(object, 1, arrc, null, 0, 0, object.question.id);
|
|
|
|
|
this.createquestionsandanswers(object, 1, arrc, null, 0, 0, object.question.id,0);
|
|
|
|
|
newarrpoll.push(question);
|
|
|
|
|
}
|
|
|
|
|
// console.log(newarrpoll)
|
|
|
|
|
} else if (object.question.question_type === 2) {
|
|
|
|
|
//插入多选题
|
|
|
|
|
if(object.question.max_choices){
|
|
|
|
|
if(object.question.max_choices>0){
|
|
|
|
|
if (object.question.max_choices < object.question.min_choices) {
|
|
|
|
|
this.props.showNotification(`可选的最大限制不能小于最小限制`);
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// if (object.question.max_choices < object.question.min_choices) {
|
|
|
|
|
// this.props.showNotification(`可选的最大限制不能小于最小限制`);
|
|
|
|
|
//
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
var questiontwo = {};
|
|
|
|
|
var other = [];
|
|
|
|
|
var option = [];
|
|
|
|
@ -1667,11 +1707,11 @@ class PollNew extends Component {
|
|
|
|
|
//插入多选题
|
|
|
|
|
if (uuk !== -1) {
|
|
|
|
|
// console.log("修改")
|
|
|
|
|
this.edittotheserver(object, 2, arrc, null, object.question.max_choices, object.question.min_choices);
|
|
|
|
|
this.edittotheserver(object, 2, arrc, null, object.question.max_choices, object.question.min_choices,object.question.answers.length);
|
|
|
|
|
newarrpoll.splice(uuk, 1, question);
|
|
|
|
|
} else {
|
|
|
|
|
// console.log("删除")
|
|
|
|
|
this.createquestionsandanswers(object, 2, arrc, null, object.question.max_choices, object.question.min_choices, object.question.id);
|
|
|
|
|
this.createquestionsandanswers(object, 2, arrc, null, object.question.max_choices, object.question.min_choices, object.question.id,object.question.answers.length);
|
|
|
|
|
newarrpoll.push(question);
|
|
|
|
|
}
|
|
|
|
|
// console.log(newarrpoll)
|
|
|
|
@ -1712,11 +1752,11 @@ class PollNew extends Component {
|
|
|
|
|
question = {"question": questiontwo};
|
|
|
|
|
if (uuk !== -1) {
|
|
|
|
|
// console.log("修改")
|
|
|
|
|
this.edittotheserver(object, 3, null, null, 0, 0);
|
|
|
|
|
this.edittotheserver(object, 3, null, null, 0, 0,0);
|
|
|
|
|
newarrpoll.splice(uuk, 1, question);
|
|
|
|
|
} else {
|
|
|
|
|
// console.log("删除")
|
|
|
|
|
this.createquestionsandanswers(object, 3, null, null, 0, 0, object.question.id);
|
|
|
|
|
this.createquestionsandanswers(object, 3, null, null, 0, 0, object.question.id,0);
|
|
|
|
|
newarrpoll.push(question);
|
|
|
|
|
}
|
|
|
|
|
// console.log(newarrpoll)
|
|
|
|
@ -1752,7 +1792,8 @@ class PollNew extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
////新增到服务器中
|
|
|
|
|
createquestionsandanswers = (object, number, option, other, max_choices, min_choices, insert_id) => {
|
|
|
|
|
createquestionsandanswers = (object, number, option, other, max_choices, min_choices, insert_id,length) => {
|
|
|
|
|
|
|
|
|
|
var thiss = this;
|
|
|
|
|
var poll_id = this.state.pollid;
|
|
|
|
|
var urlly = `/polls/${poll_id}/poll_questions.json`
|
|
|
|
@ -1765,12 +1806,16 @@ class PollNew extends Component {
|
|
|
|
|
max_choicess = max_choices;
|
|
|
|
|
min_choicess = min_choices;
|
|
|
|
|
}
|
|
|
|
|
console.log("createquestionsandanswers");
|
|
|
|
|
console.log(max_choicess);
|
|
|
|
|
console.log(min_choicess);
|
|
|
|
|
console.log(length);
|
|
|
|
|
axios.post(urlly, {
|
|
|
|
|
question_title: object.question.question_title,
|
|
|
|
|
question_type: number,
|
|
|
|
|
is_necessary: object.question.is_necessary,
|
|
|
|
|
max_choices: max_choicess,
|
|
|
|
|
min_choices: min_choicess,
|
|
|
|
|
max_choices: max_choicess===undefined?length:max_choicess===null?length:max_choicess===0?length:max_choicess,
|
|
|
|
|
min_choices: min_choicess===undefined?2:min_choicess===null?2:min_choicess===0?2:min_choicess,
|
|
|
|
|
question_answers: option,
|
|
|
|
|
question_other_answer: null,
|
|
|
|
|
insert_id: insert_id
|
|
|
|
@ -1801,17 +1846,30 @@ class PollNew extends Component {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
///编辑修改到服务器当中
|
|
|
|
|
edittotheserver = (object, number, option, other, max_choices, min_choices) => {
|
|
|
|
|
edittotheserver = (object, number, option, other, max_choices, min_choices,length) => {
|
|
|
|
|
// console.log("调用了edittotheserver")
|
|
|
|
|
var url = `/poll_questions/${object.question.id}.json`
|
|
|
|
|
var thiss = this;
|
|
|
|
|
var max_choicess = null;
|
|
|
|
|
var min_choicess = null;
|
|
|
|
|
if (max_choices === 0 && min_choices === 0) {
|
|
|
|
|
max_choicess = null;
|
|
|
|
|
min_choicess = null;
|
|
|
|
|
} else {
|
|
|
|
|
max_choicess = max_choices;
|
|
|
|
|
min_choicess = min_choices;
|
|
|
|
|
}
|
|
|
|
|
console.log("createquestionsandanswers");
|
|
|
|
|
console.log(max_choicess);
|
|
|
|
|
console.log(min_choicess);
|
|
|
|
|
console.log(length);
|
|
|
|
|
axios.put(url, {
|
|
|
|
|
// debug: true,
|
|
|
|
|
question_title: object.question.question_title,
|
|
|
|
|
question_type: number,
|
|
|
|
|
is_necessary: object.question.is_necessary,
|
|
|
|
|
max_choices: max_choices,
|
|
|
|
|
min_choices: min_choices,
|
|
|
|
|
max_choices: max_choicess===undefined?length:max_choicess===null?length:max_choicess===0?length:max_choicess,
|
|
|
|
|
min_choices: min_choicess===undefined?2:min_choicess===null?2:min_choicess===0?2:min_choicess,
|
|
|
|
|
question_answers: option,
|
|
|
|
|
question_other_answer: null,
|
|
|
|
|
}).then((result) => {
|
|
|
|
@ -2123,6 +2181,12 @@ class PollNew 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;
|
|
|
|
@ -2146,18 +2210,8 @@ class PollNew 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 = max;
|
|
|
|
|
}
|
|
|
|
|
}catch (e) {
|
|
|
|
|
arr[i].question.min_choices = 2;
|
|
|
|
|
arr[i].question.max_choices = length;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -2169,17 +2223,30 @@ class PollNew 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);
|
|
|
|
|
}
|
|
|
|
@ -2455,7 +2522,7 @@ class PollNew extends Component {
|
|
|
|
|
// console.log(this.state.projects===undefined?"":this.state.projects.poll_questions)
|
|
|
|
|
var displaymysave = (mysave === true) ? "" : "display:none;";
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<div className="newMain">
|
|
|
|
|
{/*提示*/}
|
|
|
|
|
{Modalstype && Modalstype === true ? <Modals
|
|
|
|
|
modalsType={this.state.Modalstype}
|
|
|
|
@ -2465,14 +2532,8 @@ class PollNew extends Component {
|
|
|
|
|
modalsBottomval={this.state.ModalsBottomval}
|
|
|
|
|
loadtype={this.state.Loadtype}
|
|
|
|
|
/> : ""}
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
.newMains{ margin: 0 auto; padding-bottom: 235px !important; min-width:1200px; min-height: 800px !important;}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<div className="educontent newMains">
|
|
|
|
|
|
|
|
|
|
<div className="educontent mb50">
|
|
|
|
|
<p className="clearfix mb20 mt10">
|
|
|
|
|
<a className=" btn colorgrey fl hovercolorblue" onClick={()=>this.gotohome()}>{this.props.coursedata.name}</a>
|
|
|
|
|
<span className="color-grey-9 fl ml3 mr3">></span>
|
|
|
|
@ -2874,7 +2935,7 @@ class PollNew extends Component {
|
|
|
|
|
value={itemo.question.min_choices === 0 || itemo.question.min_choices === "0" ? "--" : itemo.question.min_choices === null ? "--" : itemo.question.min_choices === undefined ? "--" : itemo.question.min_choices}
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
<Option value={String("0")}>--</Option>
|
|
|
|
|
<Option value={"0"}>--</Option>
|
|
|
|
|
{itemo.question.answers === undefined ? "" : itemo.question.answers.map((itemt, indext) => {
|
|
|
|
|
return (
|
|
|
|
|
indext >= 1 ? <Option value={String(indext + 1)}>{indext + 1}</Option> : ""
|
|
|
|
@ -2885,10 +2946,10 @@ class PollNew extends Component {
|
|
|
|
|
className="ml10 mr10 color-grey-6 lineh-40 fl">~</span>
|
|
|
|
|
{/*可选最大*/}
|
|
|
|
|
<Select className="fl w100"
|
|
|
|
|
onChange={(value) => this.HandleGradationGroupChangeee(value, indexo,itemo.question.min_choices)}
|
|
|
|
|
onChange={(value) => this.HandleGradationGroupChangeee(value, indexo,itemo.question.min_choices,itemo.question.answers.length)}
|
|
|
|
|
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>
|
|
|
|
|
<Option value={"0"}>--</Option>
|
|
|
|
|
{itemo.question.answers === undefined ? "" : itemo.question.answers.map((itemt, indext) => {
|
|
|
|
|
return (
|
|
|
|
|
indext >= 1 ? <Option value={String(indext + 1)}>{indext + 1}</Option> : ""
|
|
|
|
@ -3128,7 +3189,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,itemo.question.min_choices)}
|
|
|
|
|
onChange={(value) => this.HandleGradationGroupChangeee(value, indexo,itemo.question.min_choices,itemo.question.answers.length)}
|
|
|
|
|
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>
|
|
|
|
@ -3380,7 +3441,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,itemo.question.min_choices)}
|
|
|
|
|
onChange={(value) => this.HandleGradationGroupChangeee(value, indexo,itemo.question.min_choices,itemo.question.answers.length)}
|
|
|
|
|
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>
|
|
|
|
|