题目解析非必填项

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

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

@ -556,19 +556,37 @@ class Itembankstop extends Component {
id: result.data.tag_discipline_id,
name:value,
}
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,
})
if(this.state.Knowpoints.length>=5){
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,
})
}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) => {
//console.log(error);

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

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

Loading…
Cancel
Save