dev_aliyun_beta
杨树林 5 years ago
parent de810c237b
commit 0edbdf92ac

@ -74,6 +74,7 @@ class PollNewQuestbank extends Component {
first_category_url: "",
left_banner_id: "",
publishtimeid_int:0,
boolneweied:undefined,
}
// console.log("试卷新建和编辑");
// console.log(JSON.stringify(props));
@ -390,6 +391,7 @@ class PollNewQuestbank extends Component {
}
//添加单选题目
addmysingles = () => {
if (this.state.q_countst > 0) {
this.scrollToAnchor("publishtimeid"+this.state.publishtimeid_int);
this.props.showNotification(`不能同时编辑两题`);
@ -403,6 +405,7 @@ class PollNewQuestbank extends Component {
}
this.setState({
Newdisplay: true,
boolneweied:true,
})
var Insertposition = this.state.poll_questions.length;
// console.log(JSON.stringify(this.state.poll_questions));
@ -431,6 +434,7 @@ class PollNewQuestbank extends Component {
}
this.setState({
Newdisplay: true,
boolneweied:true,
})
var Insertposition = this.state.poll_questions.length;
// console.log(JSON.stringify(this.state.poll_questions));
@ -456,6 +460,7 @@ class PollNewQuestbank extends Component {
}
this.setState({
Newdisplay: true,
boolneweied:true,
})
var Insertposition = this.state.poll_questions.length;
// console.log(JSON.stringify(this.state.poll_questions));
@ -474,8 +479,12 @@ class PollNewQuestbank extends Component {
//编辑方法
adddomedit = (object,indexysl) => {
if (this.state.q_countst > 0) {
if(this.state.boolneweied===true){
this.scrollToAnchor("publishtimeids");
}else{
this.scrollToAnchor("publishtimeid"+this.state.publishtimeid_int);
}
this.props.showNotification(`不能同时编辑两题`);
this.scrollToAnchor("publishtimeids");
return;
}
@ -483,7 +492,8 @@ class PollNewQuestbank extends Component {
this.setState({
q_countst: 1,
bindingid: object.question.id,
publishtimeid_int:indexysl
publishtimeid_int:indexysl,
boolneweied:false,
})
// window.scrollTo(0, this.refs.targetElement.offsetTops)
let {adddom} = this.state;
@ -644,16 +654,22 @@ class PollNewQuestbank extends Component {
// console.log(pollid)
// console.log(Insertposition)
// console.log(Whether)
console.log("addMytopic");
console.log(id);
// console.log("addMytopic");
// console.log(id);
if (this.state.q_countst > 0) {
if(Whether===true){
this.scrollToAnchor("publishtimeids");
if(this.state.boolneweied===true){
this.scrollToAnchor("publishtimeids");
}else{
this.scrollToAnchor("publishtimeid"+this.state.publishtimeid_int);
}
}
this.props.showNotification(`不能同时编辑两题`);
return;
}
if(Whether===true){
this.setState({
publishtimeid_int:inty,
@ -667,6 +683,7 @@ class PollNewQuestbank extends Component {
this.setState({
Insertposition: Insertposition,
q_countst: 1,
boolneweied:false,
})
// window.scrollTo(0, this.refs.targetElement.offsetTop)
var arrr = this.state.adddom;
@ -875,6 +892,7 @@ class PollNewQuestbank extends Component {
bindingid: undefined,
Newdisplay: false,
newoption: false,
boolneweied:undefined
})
} else {
@ -885,6 +903,7 @@ class PollNewQuestbank extends Component {
problemtopicbool: false,
Newdisplay: false,
newoption: false,
boolneweied:undefined
})
}
}
@ -1450,6 +1469,7 @@ class PollNewQuestbank extends Component {
adddom: newarr,
problemtopic: null,
problemtopicbool: false,
boolneweied:undefined
// mysingles: this.state.mysingles,
// mydoubles: this.state.mydoubles,
// mymainsint: this.state.mymainsint
@ -1964,7 +1984,9 @@ class PollNewQuestbank extends Component {
})
}
this.Deleteadddom(indexo);
// console.log(indexo)
this.setState({
boolneweied:undefined
})
}

Loading…
Cancel
Save