|
|
|
@ -70,15 +70,15 @@ class NullEditor extends Component{
|
|
|
|
|
let answerArray = []
|
|
|
|
|
if(!question_title) {
|
|
|
|
|
this.refs['titleEditor'].showError()
|
|
|
|
|
this.props.showNotification('题目不能为空'); return;
|
|
|
|
|
this.props.showNotification('题目:不能为空'); return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
const intScore = parseFloat(question_score)
|
|
|
|
|
if(!question_score || intScore == NaN) {
|
|
|
|
|
this.props.showNotification('分值不能为空'); return;
|
|
|
|
|
this.props.showNotification('分值:不能为空'); return;
|
|
|
|
|
} else {
|
|
|
|
|
if (intScore == 0) {
|
|
|
|
|
this.props.showNotification('分值必须大于0'); return;
|
|
|
|
|
this.props.showNotification('分值:必须大于0'); return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
let isEmpty = false;
|
|
|
|
@ -91,7 +91,8 @@ class NullEditor extends Component{
|
|
|
|
|
answerArray[index].answer_text.push(item)
|
|
|
|
|
if(!item) {
|
|
|
|
|
this.refs[`nullChildEditor${index}`].showError(itemIndex)
|
|
|
|
|
this.props.showNotification(`请先输入第${index+1}个填空的第${itemIndex+1}参考答案。`);
|
|
|
|
|
// this.props.showNotification(`请先输入第${index+1}个填空的第${itemIndex+1}参考答案。`);
|
|
|
|
|
this.props.showNotification(`答案:不能为空`);
|
|
|
|
|
isEmpty = true;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -101,7 +102,7 @@ class NullEditor extends Component{
|
|
|
|
|
}
|
|
|
|
|
if(!question_title) {
|
|
|
|
|
this.refs['titleEditor'].showError()
|
|
|
|
|
this.props.showNotification('题目不能为空'); return;
|
|
|
|
|
this.props.showNotification('题目:不能为空'); return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|