题目解析非必填项

dev_jupyter
杨树林 5 years ago
parent 5bc401236c
commit 5d9552ec98

@ -149,10 +149,10 @@ class ChoquesEditor extends Component{
this.props.showNotification('多选题最小正确选项为2个'); this.props.showNotification('多选题最小正确选项为2个');
return editordata; return editordata;
} }
if(!question_titlesysl) { // if(!question_titlesysl) {
this.props.showNotification('请您输入题目解析'); // this.props.showNotification('请您输入题目解析');
return editordata; // return editordata;
} // }
/** /**
{ {
"question_title":"同学朋友间常用的沟通工具是什么?", "question_title":"同学朋友间常用的沟通工具是什么?",

@ -556,6 +556,8 @@ class Itembankstop extends Component {
id: result.data.tag_discipline_id, id: result.data.tag_discipline_id,
name:value, name:value,
} }
if(this.state.Knowpoints.length>=5){
this.state.knowledgepoints.push(leydata); this.state.knowledgepoints.push(leydata);
const _result =[]; const _result =[];
this.state.knowledgepoints.filter(item => { this.state.knowledgepoints.filter(item => {
@ -569,6 +571,22 @@ class Itembankstop extends Component {
knowledgepoints: this.state.knowledgepoints, knowledgepoints: this.state.knowledgepoints,
knowledgepoints2: _result, knowledgepoints2: _result,
}) })
}else{
this.state.Knowpoints.push(leydata);
this.state.knowledgepoints.push(leydata);
const _result =[];
this.state.knowledgepoints.filter(item => {
if (this.state.Knowpoints.findIndex(t => t.id === item.id) === -1) {
_result.push(item);
}
});
this.setState({
Knowpoints: this.state.Knowpoints,
knowledgepoints: this.state.knowledgepoints,
knowledgepoints2: _result,
})
}
} }
}).catch((error) => { }).catch((error) => {
//console.log(error); //console.log(error);

@ -119,11 +119,11 @@ class JudquestionEditor extends Component{
//
if(!question_titlesysl) { // if(!question_titlesysl) {
this.props.showNotification('请您输入题目解析'); // this.props.showNotification('请您输入题目解析');
return editordata; // return editordata;
} // }
/** /**
{ {
"question_title":"同学朋友间常用的沟通工具是什么?", "question_title":"同学朋友间常用的沟通工具是什么?",

@ -157,10 +157,10 @@ class SingleEditor extends Component{
if(!question_titlesysl) { // if(!question_titlesysl) {
this.props.showNotification('请您输入题目解析'); // this.props.showNotification('请您输入题目解析');
return editordata; // return editordata;
} // }
/** /**
{ {
"question_title":"同学朋友间常用的沟通工具是什么?", "question_title":"同学朋友间常用的沟通工具是什么?",

Loading…
Cancel
Save