dev_aliyun_beta
杨树林 6 years ago
parent 0edbdf92ac
commit 0bdb0962de

@ -479,10 +479,14 @@ class PollNewQuestbank extends Component {
//编辑方法 //编辑方法
adddomedit = (object,indexysl) => { adddomedit = (object,indexysl) => {
if (this.state.q_countst > 0) { if (this.state.q_countst > 0) {
if(this.state.boolneweied===true){ if(this.state.boolneweied !== undefined){
this.scrollToAnchor("publishtimeids"); if(this.state.boolneweied===true){
this.scrollToAnchor("publishtimeids");
}else{
this.scrollToAnchor("publishtimeid"+this.state.publishtimeid_int);
}
}else{ }else{
this.scrollToAnchor("publishtimeid"+this.state.publishtimeid_int); this.scrollToAnchor("publishtimeids");
} }
this.props.showNotification(`不能同时编辑两题`); this.props.showNotification(`不能同时编辑两题`);
return; return;
@ -566,18 +570,18 @@ class PollNewQuestbank extends Component {
} }
answers.push(answerstwo); answers.push(answerstwo);
} }
try { // try {
if(anserbool===false){ // if(anserbool===false){
let answersysltwo = { // let answersysltwo = {
"answer_id": parseInt(object.question.answers[object.question.answers.length-1].answer_id)+1, // "answer_id": parseInt(object.question.answers[object.question.answers.length-1].answer_id)+1,
"answer_position": parseInt(object.question.answers[object.question.answers.length-1].answer_position)+1, // "answer_position": parseInt(object.question.answers[object.question.answers.length-1].answer_position)+1,
"answer_text": "其他" // "answer_text": "其他"
} // }
answers.push(answersysltwo); // answers.push(answersysltwo);
} // }
}catch (e) { // }catch (e) {
//
} // }
questiontwo = { questiontwo = {
"id": object.question.id, "id": object.question.id,
@ -659,12 +663,15 @@ class PollNewQuestbank extends Component {
if (this.state.q_countst > 0) { if (this.state.q_countst > 0) {
if(Whether===true){ if(Whether===true){
if(this.state.boolneweied===true){ if(this.state.boolneweied !== undefined){
this.scrollToAnchor("publishtimeids"); if(this.state.boolneweied===true){
this.scrollToAnchor("publishtimeids");
}else{
this.scrollToAnchor("publishtimeid"+this.state.publishtimeid_int);
}
}else{ }else{
this.scrollToAnchor("publishtimeid"+this.state.publishtimeid_int); this.scrollToAnchor("publishtimeids");
} }
} }
this.props.showNotification(`不能同时编辑两题`); this.props.showNotification(`不能同时编辑两题`);
return; return;

Loading…
Cancel
Save