|
|
|
@ -411,9 +411,7 @@ export default class TPMquestion extends Component {
|
|
|
|
|
window.location.href = '/shixuns/'+this.props.match.params.shixunId+'/challenges/'+this.props.match.params.checkpointId+'/editquestion';
|
|
|
|
|
}
|
|
|
|
|
questionadd=()=>{
|
|
|
|
|
$('html').animate({
|
|
|
|
|
scrollTop: 10
|
|
|
|
|
}, 200);
|
|
|
|
|
|
|
|
|
|
let{questionaddarray}=this.state;
|
|
|
|
|
|
|
|
|
|
let questionaddsums=questionaddarray.length;
|
|
|
|
@ -431,15 +429,13 @@ export default class TPMquestion extends Component {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
questionaddarrays.push({type:0,choose_id:0});
|
|
|
|
|
this.setState({
|
|
|
|
|
activetype:0,
|
|
|
|
|
questionaddarray:questionaddarrays,
|
|
|
|
|
questionaddtype:true,
|
|
|
|
|
newquestionaddtype:true,
|
|
|
|
|
editquestionaddtype:false,
|
|
|
|
|
newquestionaddtype:true,
|
|
|
|
|
questionlists:[{str:"A",val:"",type:false},{str:"B",val:"",type:false},{str:"C",val:"",type:false},{str:"D",val:"",type:false}],
|
|
|
|
|
answeshixunsGroup: 1,
|
|
|
|
|
answeoptions:[10,20],
|
|
|
|
@ -447,17 +443,17 @@ export default class TPMquestion extends Component {
|
|
|
|
|
shixunssanswerkillvalue:"",
|
|
|
|
|
shixunsskillanswerlist:[],
|
|
|
|
|
contentMdRefval:"",
|
|
|
|
|
newquestioMDMdContval:""
|
|
|
|
|
newquestioMDMdContval:"",
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// this.newquestioMDMdCont.current.setValue('')
|
|
|
|
|
// this.newquestioMDMdRef.current.setValue('')
|
|
|
|
|
//
|
|
|
|
|
// }, 2000)
|
|
|
|
|
|
|
|
|
|
this.shixunsautoHeight()
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.newquestioMDMdRef.current.setValue('')
|
|
|
|
|
}, 1000)
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.newquestioMDMdCont.current.setValue('')
|
|
|
|
|
}, 1500)
|
|
|
|
|
// this.shixunsautoHeight()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
editquestionlists=(newquestionlists)=>{
|
|
|
|
@ -592,6 +588,10 @@ export default class TPMquestion extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
answer_subit=(sumtype,challenge_choose_id)=>{
|
|
|
|
|
$('html').animate({
|
|
|
|
|
scrollTop:10
|
|
|
|
|
}, 500);
|
|
|
|
|
|
|
|
|
|
let {challenge_id,questionlists,shixunsskillanswerlist,answeonshixunsmark,answeshixunsGroup,questionaddarray} =this.state;
|
|
|
|
|
if(challenge_id===undefined){
|
|
|
|
|
message.error("关卡id为空");
|
|
|
|
@ -817,7 +817,8 @@ export default class TPMquestion extends Component {
|
|
|
|
|
neweditanswerRefval:'',
|
|
|
|
|
editanswersRefval:''
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.newquestioMDMdRef.current.setValue('')
|
|
|
|
|
this.newquestioMDMdCont.current.setValue('')
|
|
|
|
|
}else{
|
|
|
|
|
let id = this.props.match.params.shixunId;
|
|
|
|
|
let url ='/shixuns/'+id+'/challenges/'+challenge_id+'/edit_choose_question.json?choose_id='+challenge_choose_id;
|
|
|
|
@ -920,6 +921,7 @@ export default class TPMquestion extends Component {
|
|
|
|
|
<Option key={d} id={k}>{d}</Option>
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
<div className="educontent mt30 mb30">
|
|
|
|
|