|
|
@ -63,6 +63,8 @@ class PollNew extends Component {
|
|
|
|
problemtopicbool: false,
|
|
|
|
problemtopicbool: false,
|
|
|
|
newoption: false,
|
|
|
|
newoption: false,
|
|
|
|
cancellation: false,
|
|
|
|
cancellation: false,
|
|
|
|
|
|
|
|
bindingid:undefined,
|
|
|
|
|
|
|
|
Newdisplay:false,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// console.log("试卷新建和编辑");
|
|
|
|
// console.log("试卷新建和编辑");
|
|
|
|
// console.log(JSON.stringify(props));
|
|
|
|
// console.log(JSON.stringify(props));
|
|
|
@ -311,7 +313,9 @@ class PollNew extends Component {
|
|
|
|
newoption: false
|
|
|
|
newoption: false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
Newdisplay:true,
|
|
|
|
|
|
|
|
})
|
|
|
|
var Insertposition = this.state.poll_questions.length;
|
|
|
|
var Insertposition = this.state.poll_questions.length;
|
|
|
|
// console.log(JSON.stringify(this.state.poll_questions));
|
|
|
|
// console.log(JSON.stringify(this.state.poll_questions));
|
|
|
|
for (var i = 0; i < this.state.poll_questions.length; i++) {
|
|
|
|
for (var i = 0; i < this.state.poll_questions.length; i++) {
|
|
|
@ -332,7 +336,9 @@ class PollNew extends Component {
|
|
|
|
newoption: false
|
|
|
|
newoption: false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
Newdisplay:true,
|
|
|
|
|
|
|
|
})
|
|
|
|
var Insertposition = this.state.poll_questions.length;
|
|
|
|
var Insertposition = this.state.poll_questions.length;
|
|
|
|
// console.log(JSON.stringify(this.state.poll_questions));
|
|
|
|
// console.log(JSON.stringify(this.state.poll_questions));
|
|
|
|
for (var i = 0; i < this.state.poll_questions.length; i++) {
|
|
|
|
for (var i = 0; i < this.state.poll_questions.length; i++) {
|
|
|
@ -349,7 +355,9 @@ class PollNew extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
//添加主观题目
|
|
|
|
//添加主观题目
|
|
|
|
addmymainsint = () => {
|
|
|
|
addmymainsint = () => {
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
Newdisplay:true,
|
|
|
|
|
|
|
|
})
|
|
|
|
var Insertposition = this.state.poll_questions.length;
|
|
|
|
var Insertposition = this.state.poll_questions.length;
|
|
|
|
// console.log(JSON.stringify(this.state.poll_questions));
|
|
|
|
// console.log(JSON.stringify(this.state.poll_questions));
|
|
|
|
for (var i = 0; i < this.state.poll_questions.length; i++) {
|
|
|
|
for (var i = 0; i < this.state.poll_questions.length; i++) {
|
|
|
@ -375,8 +383,9 @@ class PollNew extends Component {
|
|
|
|
var anserbool = false;
|
|
|
|
var anserbool = false;
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
q_countst: 1,
|
|
|
|
q_countst: 1,
|
|
|
|
|
|
|
|
bindingid:object.question.id
|
|
|
|
})
|
|
|
|
})
|
|
|
|
window.scrollTo(0, this.refs.targetElement.offsetTop)
|
|
|
|
// window.scrollTo(0, this.refs.targetElement.offsetTops)
|
|
|
|
let {adddom} = this.state;
|
|
|
|
let {adddom} = this.state;
|
|
|
|
// var arr =new Object(objects);
|
|
|
|
// var arr =new Object(objects);
|
|
|
|
// console.log(arr)
|
|
|
|
// console.log(arr)
|
|
|
@ -522,7 +531,8 @@ class PollNew extends Component {
|
|
|
|
// console.log(pollid)
|
|
|
|
// console.log(pollid)
|
|
|
|
// console.log(Insertposition)
|
|
|
|
// console.log(Insertposition)
|
|
|
|
// console.log(Whether)
|
|
|
|
// console.log(Whether)
|
|
|
|
// console.log(id)
|
|
|
|
console.log("addMytopic");
|
|
|
|
|
|
|
|
console.log(id);
|
|
|
|
if (this.state.q_countst > 0) {
|
|
|
|
if (this.state.q_countst > 0) {
|
|
|
|
this.props.showNotification(`不能同时编辑两题`);
|
|
|
|
this.props.showNotification(`不能同时编辑两题`);
|
|
|
|
|
|
|
|
|
|
|
@ -537,7 +547,7 @@ class PollNew extends Component {
|
|
|
|
Insertposition: Insertposition,
|
|
|
|
Insertposition: Insertposition,
|
|
|
|
q_countst: 1,
|
|
|
|
q_countst: 1,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
window.scrollTo(0, this.refs.targetElement.offsetTop)
|
|
|
|
// window.scrollTo(0, this.refs.targetElement.offsetTop)
|
|
|
|
var arrr = this.state.adddom;
|
|
|
|
var arrr = this.state.adddom;
|
|
|
|
let newarrr = [...arrr];
|
|
|
|
let newarrr = [...arrr];
|
|
|
|
|
|
|
|
|
|
|
@ -551,12 +561,13 @@ class PollNew extends Component {
|
|
|
|
var question = {}
|
|
|
|
var question = {}
|
|
|
|
var questiontwo = {
|
|
|
|
var questiontwo = {
|
|
|
|
// "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length,
|
|
|
|
// "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length,
|
|
|
|
"id": this.state.poll_questions[newarr.length - 1].question.id + 1,
|
|
|
|
"id": Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id,
|
|
|
|
"is_necessary": 1,
|
|
|
|
"is_necessary": 1,
|
|
|
|
"question_number": 1,
|
|
|
|
"question_number": 1,
|
|
|
|
"question_title": "",
|
|
|
|
"question_title": "",
|
|
|
|
"question_type": 1,
|
|
|
|
"question_type": 1,
|
|
|
|
"new": "new",
|
|
|
|
"new": "new",
|
|
|
|
|
|
|
|
"newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1,
|
|
|
|
"answers": [
|
|
|
|
"answers": [
|
|
|
|
{"answer_id": 1, "answer_position": 1, "answer_text": ""},
|
|
|
|
{"answer_id": 1, "answer_position": 1, "answer_text": ""},
|
|
|
|
{"answer_id": 2, "answer_position": 2, "answer_text": ""},
|
|
|
|
{"answer_id": 2, "answer_position": 2, "answer_text": ""},
|
|
|
@ -578,7 +589,7 @@ class PollNew extends Component {
|
|
|
|
//插入多选题
|
|
|
|
//插入多选题
|
|
|
|
var question = {}
|
|
|
|
var question = {}
|
|
|
|
var questiontwo = {
|
|
|
|
var questiontwo = {
|
|
|
|
"id": this.state.poll_questions[newarr.length - 1].question.id + 1,
|
|
|
|
"id": Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id,
|
|
|
|
"is_necessary": 1,
|
|
|
|
"is_necessary": 1,
|
|
|
|
"question_number": 2,
|
|
|
|
"question_number": 2,
|
|
|
|
"question_title": "",
|
|
|
|
"question_title": "",
|
|
|
@ -586,6 +597,7 @@ class PollNew extends Component {
|
|
|
|
"max_choices": 0,
|
|
|
|
"max_choices": 0,
|
|
|
|
"min_choices": 0,
|
|
|
|
"min_choices": 0,
|
|
|
|
"new": "new",
|
|
|
|
"new": "new",
|
|
|
|
|
|
|
|
"newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1,
|
|
|
|
"answers": [
|
|
|
|
"answers": [
|
|
|
|
{"answer_id": 1, "answer_position": 1, "answer_text": ""},
|
|
|
|
{"answer_id": 1, "answer_position": 1, "answer_text": ""},
|
|
|
|
{"answer_id": 2, "answer_position": 2, "answer_text": ""},
|
|
|
|
{"answer_id": 2, "answer_position": 2, "answer_text": ""},
|
|
|
@ -608,12 +620,13 @@ class PollNew extends Component {
|
|
|
|
// console.log(this.state.poll_questions[newarr.length - 1].question.id);
|
|
|
|
// console.log(this.state.poll_questions[newarr.length - 1].question.id);
|
|
|
|
var question = {}
|
|
|
|
var question = {}
|
|
|
|
var questiontwo = {
|
|
|
|
var questiontwo = {
|
|
|
|
"id": this.state.poll_questions[newarr.length - 1].question.id + 1,
|
|
|
|
"id": Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id,
|
|
|
|
"is_necessary": 1,
|
|
|
|
"is_necessary": 1,
|
|
|
|
"question_number": 3,
|
|
|
|
"question_number": 3,
|
|
|
|
"question_title": "",
|
|
|
|
"question_title": "",
|
|
|
|
"question_type": 3,
|
|
|
|
"question_type": 3,
|
|
|
|
"new": "new",
|
|
|
|
"new": "new",
|
|
|
|
|
|
|
|
"newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1,
|
|
|
|
"answers": []
|
|
|
|
"answers": []
|
|
|
|
};
|
|
|
|
};
|
|
|
|
question = {"question": questiontwo};
|
|
|
|
question = {"question": questiontwo};
|
|
|
@ -629,20 +642,21 @@ class PollNew extends Component {
|
|
|
|
/////上面视图全部删除后 要加载的
|
|
|
|
/////上面视图全部删除后 要加载的
|
|
|
|
if (index === 1) {
|
|
|
|
if (index === 1) {
|
|
|
|
// 插入单选题
|
|
|
|
// 插入单选题
|
|
|
|
var id;
|
|
|
|
var ids;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
id = this.state.poll_questions[newarr.length - 1].question.id + 1
|
|
|
|
ids = this.state.poll_questions[newarr.length - 1].question.id;
|
|
|
|
} catch (e) {
|
|
|
|
} catch (e) {
|
|
|
|
id = 1;
|
|
|
|
ids= 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var questiontwo = {
|
|
|
|
var questiontwo = {
|
|
|
|
// "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length,
|
|
|
|
// "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length,
|
|
|
|
"id": id,
|
|
|
|
"id": Whether=== true? id :ids,
|
|
|
|
"is_necessary": 1,
|
|
|
|
"is_necessary": 1,
|
|
|
|
"question_number": 1,
|
|
|
|
"question_number": 1,
|
|
|
|
"question_title": "",
|
|
|
|
"question_title": "",
|
|
|
|
"question_type": 1,
|
|
|
|
"question_type": 1,
|
|
|
|
"new": "new",
|
|
|
|
"new": "new",
|
|
|
|
|
|
|
|
"newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1,
|
|
|
|
"answers": [
|
|
|
|
"answers": [
|
|
|
|
{"answer_id": 1, "answer_position": 1, "answer_text": ""},
|
|
|
|
{"answer_id": 1, "answer_position": 1, "answer_text": ""},
|
|
|
|
{"answer_id": 2, "answer_position": 2, "answer_text": ""},
|
|
|
|
{"answer_id": 2, "answer_position": 2, "answer_text": ""},
|
|
|
@ -662,14 +676,14 @@ class PollNew extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
} else if (index === 2) {
|
|
|
|
} else if (index === 2) {
|
|
|
|
//插入多选题
|
|
|
|
//插入多选题
|
|
|
|
var id;
|
|
|
|
var ids;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
id = this.state.poll_questions[newarr.length - 1].question.id + 1
|
|
|
|
ids = this.state.poll_questions[newarr.length - 1].question.id;
|
|
|
|
} catch (e) {
|
|
|
|
} catch (e) {
|
|
|
|
id = 1;
|
|
|
|
ids = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var questiontwo = {
|
|
|
|
var questiontwo = {
|
|
|
|
"id": id,
|
|
|
|
"id": Whether=== true? id :ids,
|
|
|
|
"is_necessary": 1,
|
|
|
|
"is_necessary": 1,
|
|
|
|
"question_number": 2,
|
|
|
|
"question_number": 2,
|
|
|
|
"question_title": "",
|
|
|
|
"question_title": "",
|
|
|
@ -677,6 +691,7 @@ class PollNew extends Component {
|
|
|
|
"max_choices": 0,
|
|
|
|
"max_choices": 0,
|
|
|
|
"min_choices": 0,
|
|
|
|
"min_choices": 0,
|
|
|
|
"new": "new",
|
|
|
|
"new": "new",
|
|
|
|
|
|
|
|
"newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1,
|
|
|
|
"answers": [
|
|
|
|
"answers": [
|
|
|
|
{"answer_id": 1, "answer_position": 1, "answer_text": ""},
|
|
|
|
{"answer_id": 1, "answer_position": 1, "answer_text": ""},
|
|
|
|
{"answer_id": 2, "answer_position": 2, "answer_text": ""},
|
|
|
|
{"answer_id": 2, "answer_position": 2, "answer_text": ""},
|
|
|
@ -696,19 +711,20 @@ class PollNew extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
} else if (index === 3) {
|
|
|
|
} else if (index === 3) {
|
|
|
|
//插入主观题
|
|
|
|
//插入主观题
|
|
|
|
var id;
|
|
|
|
var ids;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
id = this.state.poll_questions[newarr.length - 1].question.id + 1
|
|
|
|
ids= this.state.poll_questions[newarr.length - 1].question.id;
|
|
|
|
} catch (e) {
|
|
|
|
} catch (e) {
|
|
|
|
id = 1;
|
|
|
|
ids = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var questiontwo = {
|
|
|
|
var questiontwo = {
|
|
|
|
"id": id,
|
|
|
|
"id":Whether=== true? id : ids,
|
|
|
|
"is_necessary": 1,
|
|
|
|
"is_necessary": 1,
|
|
|
|
"question_number": 3,
|
|
|
|
"question_number": 3,
|
|
|
|
"question_title": "",
|
|
|
|
"question_title": "",
|
|
|
|
"question_type": 3,
|
|
|
|
"question_type": 3,
|
|
|
|
"new": "new",
|
|
|
|
"new": "new",
|
|
|
|
|
|
|
|
"newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1,
|
|
|
|
"answers": []
|
|
|
|
"answers": []
|
|
|
|
};
|
|
|
|
};
|
|
|
|
question = {"question": questiontwo};
|
|
|
|
question = {"question": questiontwo};
|
|
|
@ -723,26 +739,51 @@ class PollNew extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//删除指定条目
|
|
|
|
//删除指定条目
|
|
|
|
Deleteadddom = (indexo) => {
|
|
|
|
Deleteadddom = (indexo,bool) => {
|
|
|
|
// console.log("deleteadddom 259")
|
|
|
|
// console.log("deleteadddom 259")
|
|
|
|
|
|
|
|
|
|
|
|
var arr = this.state.adddom;
|
|
|
|
var arr = this.state.adddom;
|
|
|
|
let newarr = [...arr];
|
|
|
|
let newarr = [...arr];
|
|
|
|
|
|
|
|
|
|
|
|
newarr.splice(indexo, 1);
|
|
|
|
newarr.splice(indexo, 1);
|
|
|
|
|
|
|
|
if(bool === true) {
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
adddom: newarr,
|
|
|
|
|
|
|
|
q_countst: 0,
|
|
|
|
|
|
|
|
problemtopic: null,
|
|
|
|
|
|
|
|
problemtopicbool: false,
|
|
|
|
|
|
|
|
bindingid:undefined,
|
|
|
|
|
|
|
|
Newdisplay:false,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
adddom: newarr,
|
|
|
|
adddom: newarr,
|
|
|
|
q_countst: 0,
|
|
|
|
q_countst: 0,
|
|
|
|
problemtopic: null,
|
|
|
|
problemtopic: null,
|
|
|
|
problemtopicbool: false,
|
|
|
|
problemtopicbool: false,
|
|
|
|
|
|
|
|
Newdisplay:false,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
//保存并继续
|
|
|
|
//保存并继续
|
|
|
|
//保存并继续,即提交本题的新建并继续创建一个相同的题(该新题处于编辑模式,题目和选项不要清空)
|
|
|
|
//保存并继续,即提交本题的新建并继续创建一个相同的题(该新题处于编辑模式,题目和选项不要清空)
|
|
|
|
Deleteadddomtwo = (indexo, object) => {
|
|
|
|
Deleteadddomtwo = (indexo, object,bool) => {
|
|
|
|
var thiss = this;
|
|
|
|
var thiss = this;
|
|
|
|
|
|
|
|
if(bool === true){
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
q_countst: 1,
|
|
|
|
q_countst: 1,
|
|
|
|
|
|
|
|
bindingid:undefined,
|
|
|
|
|
|
|
|
Newdisplay:false,
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
q_countst: 1,
|
|
|
|
|
|
|
|
Newdisplay:false,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var poll_questionslength = this.state.poll_questions.length;
|
|
|
|
var poll_questionslength = this.state.poll_questions.length;
|
|
|
|
// console.log("deleteadddomtwo|||||||||||||||||||||||||||||||||||||||||\\");
|
|
|
|
// console.log("deleteadddomtwo|||||||||||||||||||||||||||||||||||||||||\\");
|
|
|
|
// console.log(indexo);
|
|
|
|
// console.log(indexo);
|
|
|
@ -1229,7 +1270,15 @@ class PollNew extends Component {
|
|
|
|
//保存,即完成新建并退出本题编辑
|
|
|
|
//保存,即完成新建并退出本题编辑
|
|
|
|
// indexo 第几个数组
|
|
|
|
// indexo 第几个数组
|
|
|
|
//object 单个数组数据
|
|
|
|
//object 单个数组数据
|
|
|
|
Deleteadddomthree = (indexo, object) => {
|
|
|
|
Deleteadddomthree = (indexo, object,bool) => {
|
|
|
|
|
|
|
|
if(bool === true) {
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
bindingid:undefined,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
Newdisplay:false,
|
|
|
|
|
|
|
|
})
|
|
|
|
// console.log("deleteadddom 349")
|
|
|
|
// console.log("deleteadddom 349")
|
|
|
|
var thiss = this;
|
|
|
|
var thiss = this;
|
|
|
|
let arr = this.state.adddom;
|
|
|
|
let arr = this.state.adddom;
|
|
|
@ -2485,7 +2534,7 @@ class PollNew extends Component {
|
|
|
|
console.log(this.state.poll_questions);
|
|
|
|
console.log(this.state.poll_questions);
|
|
|
|
console.log(this.state.adddom);
|
|
|
|
console.log(this.state.adddom);
|
|
|
|
let resultDom;
|
|
|
|
let resultDom;
|
|
|
|
resultDom = <div className="problemShow bor-bottom-greyE">
|
|
|
|
resultDom = <div>
|
|
|
|
<p className="clearfix font-16">
|
|
|
|
<p className="clearfix font-16">
|
|
|
|
<span className="color-grey-6 fl">第{index + 1}题:</span>
|
|
|
|
<span className="color-grey-6 fl">第{index + 1}题:</span>
|
|
|
|
<span
|
|
|
|
<span
|
|
|
@ -2515,7 +2564,7 @@ class PollNew extends Component {
|
|
|
|
onClick={() => this.addMytopic(item.question.question_type, this.state.pollid, index + 1, true, item.question.id)}><Tooltip
|
|
|
|
onClick={() => this.addMytopic(item.question.question_type, this.state.pollid, index + 1, true, item.question.id)}><Tooltip
|
|
|
|
title={item.question.question_type === 1 ? "插入单选题" : item.question.question_type === 2 ? "插入多选题" : "插入主观题"}><i
|
|
|
|
title={item.question.question_type === 1 ? "插入单选题" : item.question.question_type === 2 ? "插入多选题" : "插入主观题"}><i
|
|
|
|
className="color-green font-18 iconfont icon-roundaddfill"></i></Tooltip></a>
|
|
|
|
className="color-green font-18 iconfont icon-roundaddfill"></i></Tooltip></a>
|
|
|
|
<a onClick={() => this.adddomedit(item)}><Tooltip title="编辑S"><i
|
|
|
|
<a onClick={() => this.adddomedit(item)}><Tooltip title="编辑"><i
|
|
|
|
className="color-green font-18 iconfont icon-bianjidaibeijing"></i></Tooltip></a>
|
|
|
|
className="color-green font-18 iconfont icon-bianjidaibeijing"></i></Tooltip></a>
|
|
|
|
</span> : <span className="fr"> <a onClick={() => this.adddomedit(item)}><Tooltip title="编辑"><i
|
|
|
|
</span> : <span className="fr"> <a onClick={() => this.adddomedit(item)}><Tooltip title="编辑"><i
|
|
|
|
className="color-green font-18 iconfont icon-bianjidaibeijing"></i></Tooltip></a> </span>
|
|
|
|
className="color-green font-18 iconfont icon-bianjidaibeijing"></i></Tooltip></a> </span>
|
|
|
@ -2538,12 +2587,43 @@ class PollNew extends Component {
|
|
|
|
})}
|
|
|
|
})}
|
|
|
|
</RadioGroup>
|
|
|
|
</RadioGroup>
|
|
|
|
{/*单选题*/}
|
|
|
|
{/*单选题*/}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
: item.question.question_type === 2 ?
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
{this.state.adddom === undefined ? "" : item.question.question_type === 1&&this.state.adddom.map((itemo, indexo) => {
|
|
|
|
<CheckboxGroup defaultChecked={false} disabled>
|
|
|
|
|
|
|
|
{item.question.answers === undefined ? "" : item.question.answers.map((items, i) => {
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
<div className="mt10 pt20 " style={{"clear": "both"}}>
|
|
|
|
|
|
|
|
<Checkbox value={i} className={"fl"} style={{"text-align": "left"}}></Checkbox>
|
|
|
|
|
|
|
|
<span className={" flex1"} style={{"text-align": "left","white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1120px"}}>{items.answer_text}</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
})}
|
|
|
|
|
|
|
|
</CheckboxGroup>
|
|
|
|
|
|
|
|
{/*多选题*/}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
: item.question.question_type === 3 ?
|
|
|
|
|
|
|
|
// 主观题
|
|
|
|
|
|
|
|
( <div>
|
|
|
|
|
|
|
|
</div>) : (<div></div>)}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
{/*这里是编辑和新增的地方*/}
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
this.state.bindingid && this.state.bindingid===item.question.id?
|
|
|
|
|
|
|
|
(this.state.Newdisplay === false?
|
|
|
|
|
|
|
|
<div className="problemShow bor-bottom-greyE">
|
|
|
|
|
|
|
|
<div >
|
|
|
|
|
|
|
|
{this.state.adddom === undefined ? "" :this.state.adddom===undefined?"": this.state.adddom.length===0?"":item.question.id === this.state.adddom[0].question.id&&this.state.adddom.map((itemo, indexo) => {
|
|
|
|
let arrid = itemo.question.id;
|
|
|
|
let arrid = itemo.question.id;
|
|
|
|
let resultDomtwo;
|
|
|
|
let resultDomtwo;
|
|
|
|
resultDomtwo =
|
|
|
|
resultDomtwo =
|
|
|
|
<div>
|
|
|
|
<div >
|
|
|
|
<span
|
|
|
|
<span
|
|
|
|
className="font-16 color-grey-6 mb20">{itemo.question.question_type === 1 ? "单选题" : itemo.question.question_type === 2 ? "多选题" : "主观题"}
|
|
|
|
className="font-16 color-grey-6 mb20">{itemo.question.question_type === 1 ? "单选题" : itemo.question.question_type === 2 ? "多选题" : "主观题"}
|
|
|
|
<Checkbox value={itemo.question.is_necessary}
|
|
|
|
<Checkbox value={itemo.question.is_necessary}
|
|
|
@ -2572,7 +2652,7 @@ class PollNew extends Component {
|
|
|
|
<div></div>) : itemt.answer_text === "其他" ? (
|
|
|
|
<div></div>) : itemt.answer_text === "其他" ? (
|
|
|
|
<p className="df mb20">
|
|
|
|
<p className="df mb20">
|
|
|
|
<span
|
|
|
|
<span
|
|
|
|
className="color-grey-6 mr10 w60 font-16 lineh-40"
|
|
|
|
className="color-grey-6 mr3 w60 font-16 lineh-40"
|
|
|
|
style={{"text-align": "center"}}>其它</span>
|
|
|
|
style={{"text-align": "center"}}>其它</span>
|
|
|
|
|
|
|
|
|
|
|
|
<input
|
|
|
|
<input
|
|
|
@ -2629,11 +2709,11 @@ class PollNew extends Component {
|
|
|
|
: ""}
|
|
|
|
: ""}
|
|
|
|
<span className="fr mt5">
|
|
|
|
<span className="fr mt5">
|
|
|
|
<ActionBtn style="greyBack" className="mr20 w100"
|
|
|
|
<ActionBtn style="greyBack" className="mr20 w100"
|
|
|
|
onClick={() => this.Deleteadddom(indexo)}>取消</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddom(indexo,true)}>取消</ActionBtn>
|
|
|
|
<ActionBtn style="blue" className="mr20 w100"
|
|
|
|
<ActionBtn style="blue" className="mr20 w100"
|
|
|
|
onClick={() => this.Deleteadddomthree(indexo, itemo)}>保存</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddomthree(indexo, itemo,true)}>保存</ActionBtn>
|
|
|
|
<ActionBtn style="blue" className=" w100"
|
|
|
|
<ActionBtn style="blue" className=" w100"
|
|
|
|
onClick={() => this.Deleteadddomtwo(indexo, itemo)}>保存并继续</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续</ActionBtn>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -2727,11 +2807,11 @@ class PollNew extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
<span className="fr mt5">
|
|
|
|
<span className="fr mt5">
|
|
|
|
<ActionBtn style="greyBack" className=" mr20 w100"
|
|
|
|
<ActionBtn style="greyBack" className=" mr20 w100"
|
|
|
|
onClick={() => this.Deleteadddom(indexo)}>取消</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddom(indexo,true)}>取消</ActionBtn>
|
|
|
|
<ActionBtn style="blue" className="mr20 w100"
|
|
|
|
<ActionBtn style="blue" className="mr20 w100"
|
|
|
|
onClick={() => this.Deleteadddomthree(indexo, itemo)}>保存</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddomthree(indexo, itemo,true)}>保存</ActionBtn>
|
|
|
|
<ActionBtn style="blue" className=" w100"
|
|
|
|
<ActionBtn style="blue" className=" w100"
|
|
|
|
onClick={() => this.Deleteadddomtwo(indexo, itemo)}>保存并继续</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续</ActionBtn>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
@ -2740,24 +2820,24 @@ class PollNew extends Component {
|
|
|
|
<div className="clearfix mt30" >
|
|
|
|
<div className="clearfix mt30" >
|
|
|
|
<span className="fr mt5">
|
|
|
|
<span className="fr mt5">
|
|
|
|
<ActionBtn style="greyBack" className=" mr20 w100"
|
|
|
|
<ActionBtn style="greyBack" className=" mr20 w100"
|
|
|
|
onClick={() => this.Deleteadddom(indexo)}>取消</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddom(indexo,true)}>取消</ActionBtn>
|
|
|
|
<ActionBtn style="blue" className="mr20 w100"
|
|
|
|
<ActionBtn style="blue" className="mr20 w100"
|
|
|
|
onClick={() => this.Deleteadddomthree(indexo, itemo)}>保存</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddomthree(indexo, itemo,true)}>保存</ActionBtn>
|
|
|
|
<ActionBtn style="blue" className=" w100"
|
|
|
|
<ActionBtn style="blue" className=" w100"
|
|
|
|
onClick={() => this.Deleteadddomtwo(indexo, itemo)}>保存并继续</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续</ActionBtn>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
: itemo.question.question_type === 3 ?
|
|
|
|
: itemo.question.question_type === 3 ?
|
|
|
|
<div className="clearfix mt30">
|
|
|
|
<div className="clearfix mt30" >
|
|
|
|
<span className="fr">
|
|
|
|
<span className="fr">
|
|
|
|
<ActionBtn style="greyBack" className="mr20 w100"
|
|
|
|
<ActionBtn style="greyBack" className="mr20 w100"
|
|
|
|
onClick={() => this.Deleteadddom(indexo)}>取消</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddom(indexo,true)}>取消</ActionBtn>
|
|
|
|
<ActionBtn style="blue" className="mr20 w100"
|
|
|
|
<ActionBtn style="blue" className="mr20 w100"
|
|
|
|
onClick={() => this.Deleteadddomthree(indexo, itemo)}>保存</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddomthree(indexo, itemo,true)}>保存</ActionBtn>
|
|
|
|
<ActionBtn style="blue" className=" w100"
|
|
|
|
<ActionBtn style="blue" className=" w100"
|
|
|
|
onClick={() => this.Deleteadddomtwo(indexo, itemo)}>保存并继续</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续</ActionBtn>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
:
|
|
|
|
:
|
|
|
@ -2774,29 +2854,19 @@ class PollNew extends Component {
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
)
|
|
|
|
})}
|
|
|
|
})}
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>:"")
|
|
|
|
|
|
|
|
:
|
|
|
|
|
|
|
|
<div className="bor-bottom-greyE problemShow">
|
|
|
|
|
|
|
|
{resultDom}
|
|
|
|
|
|
|
|
{this.state.Newdisplay === false?
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div className="mt10" >
|
|
|
|
: item.question.question_type === 2 ?
|
|
|
|
{this.state.adddom === undefined ? "" :this.state.adddom===undefined?"": this.state.adddom.length===0?"":item.question.id === this.state.adddom[0].question.id&&this.state.adddom.map((itemo, indexo) => {
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<CheckboxGroup defaultChecked={false} disabled>
|
|
|
|
|
|
|
|
{item.question.answers === undefined ? "" : item.question.answers.map((items, i) => {
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
<div className="mt10 pt20 " style={{"clear": "both"}}>
|
|
|
|
|
|
|
|
<Checkbox value={i} className={"fl"} style={{"text-align": "left"}}></Checkbox>
|
|
|
|
|
|
|
|
<span className={" flex1"} style={{"text-align": "left","white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1120px"}}>{items.answer_text}</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
})}
|
|
|
|
|
|
|
|
</CheckboxGroup>
|
|
|
|
|
|
|
|
{/*多选题*/}
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
{this.state.adddom === undefined ? "" : item.question.question_type === 2&&this.state.adddom.map((itemo, indexo) => {
|
|
|
|
|
|
|
|
let arrid = itemo.question.id;
|
|
|
|
let arrid = itemo.question.id;
|
|
|
|
let resultDomtwo;
|
|
|
|
let resultDomtwo;
|
|
|
|
resultDomtwo =
|
|
|
|
resultDomtwo =
|
|
|
|
<div>
|
|
|
|
<div >
|
|
|
|
<span
|
|
|
|
<span
|
|
|
|
className="font-16 color-grey-6 mb20">{itemo.question.question_type === 1 ? "单选题" : itemo.question.question_type === 2 ? "多选题" : "主观题"}
|
|
|
|
className="font-16 color-grey-6 mb20">{itemo.question.question_type === 1 ? "单选题" : itemo.question.question_type === 2 ? "多选题" : "主观题"}
|
|
|
|
<Checkbox value={itemo.question.is_necessary}
|
|
|
|
<Checkbox value={itemo.question.is_necessary}
|
|
|
@ -2825,7 +2895,7 @@ class PollNew extends Component {
|
|
|
|
<div></div>) : itemt.answer_text === "其他" ? (
|
|
|
|
<div></div>) : itemt.answer_text === "其他" ? (
|
|
|
|
<p className="df mb20">
|
|
|
|
<p className="df mb20">
|
|
|
|
<span
|
|
|
|
<span
|
|
|
|
className="color-grey-6 mr10 w60 font-16 lineh-40"
|
|
|
|
className="color-grey-6 mr3 w60 font-16 lineh-40"
|
|
|
|
style={{"text-align": "center"}}>其它</span>
|
|
|
|
style={{"text-align": "center"}}>其它</span>
|
|
|
|
|
|
|
|
|
|
|
|
<input
|
|
|
|
<input
|
|
|
@ -2882,11 +2952,11 @@ class PollNew extends Component {
|
|
|
|
: ""}
|
|
|
|
: ""}
|
|
|
|
<span className="fr mt5">
|
|
|
|
<span className="fr mt5">
|
|
|
|
<ActionBtn style="greyBack" className="mr20 w100"
|
|
|
|
<ActionBtn style="greyBack" className="mr20 w100"
|
|
|
|
onClick={() => this.Deleteadddom(indexo)}>取消</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddom(indexo,true)}>取消</ActionBtn>
|
|
|
|
<ActionBtn style="blue" className="mr20 w100"
|
|
|
|
<ActionBtn style="blue" className="mr20 w100"
|
|
|
|
onClick={() => this.Deleteadddomthree(indexo, itemo)}>保存</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddomthree(indexo, itemo,true)}>保存</ActionBtn>
|
|
|
|
<ActionBtn style="blue" className=" w100"
|
|
|
|
<ActionBtn style="blue" className=" w100"
|
|
|
|
onClick={() => this.Deleteadddomtwo(indexo, itemo)}>保存并继续</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续</ActionBtn>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -2980,11 +3050,11 @@ class PollNew extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
<span className="fr mt5">
|
|
|
|
<span className="fr mt5">
|
|
|
|
<ActionBtn style="greyBack" className=" mr20 w100"
|
|
|
|
<ActionBtn style="greyBack" className=" mr20 w100"
|
|
|
|
onClick={() => this.Deleteadddom(indexo)}>取消</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddom(indexo,true)}>取消</ActionBtn>
|
|
|
|
<ActionBtn style="blue" className="mr20 w100"
|
|
|
|
<ActionBtn style="blue" className="mr20 w100"
|
|
|
|
onClick={() => this.Deleteadddomthree(indexo, itemo)}>保存</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddomthree(indexo, itemo,true)}>保存</ActionBtn>
|
|
|
|
<ActionBtn style="blue" className=" w100"
|
|
|
|
<ActionBtn style="blue" className=" w100"
|
|
|
|
onClick={() => this.Deleteadddomtwo(indexo, itemo)}>保存并继续</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续</ActionBtn>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
@ -2993,24 +3063,24 @@ class PollNew extends Component {
|
|
|
|
<div className="clearfix mt30" >
|
|
|
|
<div className="clearfix mt30" >
|
|
|
|
<span className="fr mt5">
|
|
|
|
<span className="fr mt5">
|
|
|
|
<ActionBtn style="greyBack" className=" mr20 w100"
|
|
|
|
<ActionBtn style="greyBack" className=" mr20 w100"
|
|
|
|
onClick={() => this.Deleteadddom(indexo)}>取消</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddom(indexo,true)}>取消</ActionBtn>
|
|
|
|
<ActionBtn style="blue" className="mr20 w100"
|
|
|
|
<ActionBtn style="blue" className="mr20 w100"
|
|
|
|
onClick={() => this.Deleteadddomthree(indexo, itemo)}>保存</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddomthree(indexo, itemo,true)}>保存</ActionBtn>
|
|
|
|
<ActionBtn style="blue" className=" w100"
|
|
|
|
<ActionBtn style="blue" className=" w100"
|
|
|
|
onClick={() => this.Deleteadddomtwo(indexo, itemo)}>保存并继续</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续</ActionBtn>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
: itemo.question.question_type === 3 ?
|
|
|
|
: itemo.question.question_type === 3 ?
|
|
|
|
<div className="clearfix mt30">
|
|
|
|
<div className="clearfix mt30" >
|
|
|
|
<span className="fr">
|
|
|
|
<span className="fr">
|
|
|
|
<ActionBtn style="greyBack" className="mr20 w100"
|
|
|
|
<ActionBtn style="greyBack" className="mr20 w100"
|
|
|
|
onClick={() => this.Deleteadddom(indexo)}>取消</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddom(indexo,true)}>取消</ActionBtn>
|
|
|
|
<ActionBtn style="blue" className="mr20 w100"
|
|
|
|
<ActionBtn style="blue" className="mr20 w100"
|
|
|
|
onClick={() => this.Deleteadddomthree(indexo, itemo)}>保存</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddomthree(indexo, itemo,true)}>保存</ActionBtn>
|
|
|
|
<ActionBtn style="blue" className=" w100"
|
|
|
|
<ActionBtn style="blue" className=" w100"
|
|
|
|
onClick={() => this.Deleteadddomtwo(indexo, itemo)}>保存并继续</ActionBtn>
|
|
|
|
onClick={() => this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续</ActionBtn>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
:
|
|
|
|
:
|
|
|
@ -3027,17 +3097,28 @@ class PollNew extends Component {
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
)
|
|
|
|
})}
|
|
|
|
})}
|
|
|
|
|
|
|
|
</div>:""}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
: item.question.question_type === 3 ?
|
|
|
|
)
|
|
|
|
// 主观题
|
|
|
|
})}
|
|
|
|
( <div>
|
|
|
|
|
|
|
|
{this.state.adddom === undefined ? "" : item.question.question_type === 3&&this.state.adddom.map((itemo, indexo) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{/*新建单选多选2*/}
|
|
|
|
|
|
|
|
<div className="myyslwidth">
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
this.state.Newdisplay === true?
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
{this.state.adddom === undefined ? "" : this.state.adddom.map((itemo, indexo) => {
|
|
|
|
|
|
|
|
// console.log('打印this.state.adddom')
|
|
|
|
|
|
|
|
// console.log(this.state.adddom);
|
|
|
|
let arrid = itemo.question.id;
|
|
|
|
let arrid = itemo.question.id;
|
|
|
|
let resultDomtwo;
|
|
|
|
let resultDomtwo;
|
|
|
|
resultDomtwo =
|
|
|
|
resultDomtwo =
|
|
|
|
<div>
|
|
|
|
<div className="problemShow">
|
|
|
|
<span
|
|
|
|
<span
|
|
|
|
className="font-16 color-grey-6 mb20">{itemo.question.question_type === 1 ? "单选题" : itemo.question.question_type === 2 ? "多选题" : "主观题"}
|
|
|
|
className="font-16 color-grey-6 mb20">{itemo.question.question_type === 1 ? "单选题" : itemo.question.question_type === 2 ? "多选题" : "主观题"}
|
|
|
|
<Checkbox value={itemo.question.is_necessary}
|
|
|
|
<Checkbox value={itemo.question.is_necessary}
|
|
|
@ -3066,13 +3147,13 @@ class PollNew extends Component {
|
|
|
|
<div></div>) : itemt.answer_text === "其他" ? (
|
|
|
|
<div></div>) : itemt.answer_text === "其他" ? (
|
|
|
|
<p className="df mb20">
|
|
|
|
<p className="df mb20">
|
|
|
|
<span
|
|
|
|
<span
|
|
|
|
className="color-grey-6 mr10 w60 font-16 lineh-40"
|
|
|
|
className="color-grey-6 mr3 w60 font-16 lineh-40"
|
|
|
|
style={{"text-align": "center"}}>其它</span>
|
|
|
|
style={{"text-align": "center"}}>其它</span>
|
|
|
|
|
|
|
|
|
|
|
|
<input
|
|
|
|
<input
|
|
|
|
className="mr20 input-flex-40 TextAreainput" disabled
|
|
|
|
className="mr20 input-flex-40 TextAreainput" disabled
|
|
|
|
placeholder='无法编辑!将由参与答题的人手动录入'></input>
|
|
|
|
placeholder='无法编辑!将由参与答题的人手动录入'></input>
|
|
|
|
{this.state.polls_status === undefined || this.state.polls_status === 1 ?
|
|
|
|
{polls_status === undefined || polls_status === 1 ?
|
|
|
|
<a className="lineh-40"
|
|
|
|
<a className="lineh-40"
|
|
|
|
onClick={() => this.Deleteentrys(arrid, indext, true)}><Tooltip
|
|
|
|
onClick={() => this.Deleteentrys(arrid, indext, true)}><Tooltip
|
|
|
|
title="删除"
|
|
|
|
title="删除"
|
|
|
@ -3094,7 +3175,7 @@ class PollNew extends Component {
|
|
|
|
"line-height": "35px",
|
|
|
|
"line-height": "35px",
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|
onInput={(e) => this.HandleInputChanges(e, indexo, indext)}></TextArea>
|
|
|
|
onInput={(e) => this.HandleInputChanges(e, indexo, indext)}></TextArea>
|
|
|
|
{this.state.polls_status === undefined || this.state.polls_status === 1 ?
|
|
|
|
{polls_status === undefined || polls_status === 1 ?
|
|
|
|
<a className="lineh-40"
|
|
|
|
<a className="lineh-40"
|
|
|
|
onClick={() => this.Deleteentrys(arrid, indext, false)}><Tooltip
|
|
|
|
onClick={() => this.Deleteentrys(arrid, indext, false)}><Tooltip
|
|
|
|
title="删除" placement={"bottom"}><i
|
|
|
|
title="删除" placement={"bottom"}><i
|
|
|
@ -3109,14 +3190,14 @@ class PollNew extends Component {
|
|
|
|
{itemo.question.question_type === 1 ? (
|
|
|
|
{itemo.question.question_type === 1 ? (
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<div style={{minWidth: "1100px"}}>
|
|
|
|
<div style={{minWidth: "1100px"}}>
|
|
|
|
{this.state.polls_status === undefined || this.state.polls_status === 1 ?
|
|
|
|
{polls_status === undefined || polls_status === 1 ?
|
|
|
|
<ActionBtn style="grey" className="mr20 mt5"
|
|
|
|
<ActionBtn style="grey" className="mr20 mt5"
|
|
|
|
onClick={() => this.Ewoption(itemo.question.id, itemo)}>新增选项</ActionBtn>
|
|
|
|
onClick={() => this.Ewoption(itemo.question.id, itemo)}>新增选项</ActionBtn>
|
|
|
|
|
|
|
|
|
|
|
|
: ""}
|
|
|
|
: ""}
|
|
|
|
{this.state.polls_status === undefined || this.state.polls_status === 1 ?
|
|
|
|
{polls_status === undefined || polls_status === 1 ?
|
|
|
|
|
|
|
|
|
|
|
|
(this.state.newoption === false ?
|
|
|
|
(newoption === false ?
|
|
|
|
<ActionBtn style="grey" className="mr20 mt5"
|
|
|
|
<ActionBtn style="grey" className="mr20 mt5"
|
|
|
|
onClick={() => this.Addanotheroption(itemo.question.id)}>新增其他选项</ActionBtn>
|
|
|
|
onClick={() => this.Addanotheroption(itemo.question.id)}>新增其他选项</ActionBtn>
|
|
|
|
: "")
|
|
|
|
: "")
|
|
|
@ -3205,14 +3286,14 @@ class PollNew extends Component {
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
{itemo.question.question_type === 2 ?
|
|
|
|
{itemo.question.question_type === 2 ?
|
|
|
|
(
|
|
|
|
(
|
|
|
|
this.state.polls_status === undefined || this.state.polls_status === 1 ?
|
|
|
|
polls_status === undefined || polls_status === 1 ?
|
|
|
|
<div className="clearfix mt30" >
|
|
|
|
<div className="clearfix mt30" >
|
|
|
|
|
|
|
|
|
|
|
|
<div><ActionBtn style="grey" className="mr20 fl mt5"
|
|
|
|
<div><ActionBtn style="grey" className="mr20 fl mt5"
|
|
|
|
onClick={() => this.Ewoption(itemo.question.id, itemo)}>新增选项</ActionBtn>
|
|
|
|
onClick={() => this.Ewoption(itemo.question.id, itemo)}>新增选项</ActionBtn>
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.state.newoption === false ? <ActionBtn style="grey" className="mr20 fl mt5"
|
|
|
|
newoption === false ? <ActionBtn style="grey" className="mr20 fl mt5"
|
|
|
|
onClick={() => this.Addanotheroption(itemo.question.id)}>新增其他选项</ActionBtn> : ""
|
|
|
|
onClick={() => this.Addanotheroption(itemo.question.id)}>新增其他选项</ActionBtn> : ""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -3268,25 +3349,20 @@ class PollNew extends Component {
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
)
|
|
|
|
})}
|
|
|
|
})}
|
|
|
|
</div>) : (<div></div>)}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
:
|
|
|
|
|
|
|
|
""
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
{resultDom}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
})}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div className="myyslwidth">
|
|
|
|
|
|
|
|
{polls_status === undefined || polls_status === 1 ?
|
|
|
|
{polls_status === undefined || polls_status === 1 ?
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.props.match.params.news === "new" ?
|
|
|
|
this.props.match.params.news === "new" ?
|
|
|
|
this.state.Newedit === false ?
|
|
|
|
this.state.Newedit === false ?
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<div className=" mb10" style={this.state.adddom === undefined?{"border-bottom": "0.5px solid #ffffff"}:this.state.adddom.length <1? {"border-bottom": "0.5px solid #ffffff"}:{"border-bottom": "0.5px solid #eee"}}></div>
|
|
|
|
<div className=" mb10"></div>
|
|
|
|
|
|
|
|
|
|
|
|
<div style={{"padding": "10px 30px 20px 30px"}}>
|
|
|
|
<div style={{"padding": "10px 30px 20px 30px"}}>
|
|
|
|
<ActionBtn style="green" className="mr20" onClick={() => this.addmysingles()}><i
|
|
|
|
<ActionBtn style="green" className="mr20" onClick={() => this.addmysingles()}><i
|
|
|
@ -3300,7 +3376,7 @@ class PollNew extends Component {
|
|
|
|
: ""
|
|
|
|
: ""
|
|
|
|
:
|
|
|
|
:
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<div className=" mb10" style={this.state.adddom === undefined? {"border-bottom": "0.5px solid #ffffff"}:this.state.adddom.length <1? {"border-bottom": "0.5px solid #ffffff"}:{"border-bottom": "0.5px solid #eee"}}></div>
|
|
|
|
<div className=" mb10"></div>
|
|
|
|
<div style={{"padding": "10px 30px 20px 30px"}}>
|
|
|
|
<div style={{"padding": "10px 30px 20px 30px"}}>
|
|
|
|
<ActionBtn style="green" className="mr20" onClick={() => this.addmysingles()}><i
|
|
|
|
<ActionBtn style="green" className="mr20" onClick={() => this.addmysingles()}><i
|
|
|
|
className="iconfont icon-tianjiafangda font-15 mr10"></i>单选题</ActionBtn>
|
|
|
|
className="iconfont icon-tianjiafangda font-15 mr10"></i>单选题</ActionBtn>
|
|
|
|