|
|
|
@ -355,7 +355,7 @@ export default { |
|
|
|
|
} else if (type === 'essay') { // 简答题 |
|
|
|
|
if (!n.userScore) n.userScore = '' |
|
|
|
|
if (isNaN(n.reviewScore)) n.reviewScore = '' |
|
|
|
|
this.handleEssayScore(n) |
|
|
|
|
this.handleIsCorrect(n) |
|
|
|
|
} |
|
|
|
|
n.originUserScore = n.reviewScore |
|
|
|
|
n.newComments = n.comments || '' |
|
|
|
@ -376,8 +376,8 @@ export default { |
|
|
|
|
this.loading = false |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 判断简答题的对错 |
|
|
|
|
handleEssayScore (n) { |
|
|
|
|
// 判断试题的对错 |
|
|
|
|
handleIsCorrect (n) { |
|
|
|
|
n.isCorrect = n.reviewScore === '' ? 4 : (n.reviewScore === n.questionScore ? 1 : n.reviewScore ? 3 : 2) // 简答题没有reviewScore则显示待判分, 有则判断是否跟题目分数相同,完全相同是正确,小于则部分正确,0则错误 |
|
|
|
|
}, |
|
|
|
|
scrollToSmooth (position, duration) { |
|
|
|
@ -439,7 +439,7 @@ export default { |
|
|
|
|
reviewScore: ques.reviewScore, |
|
|
|
|
}]) |
|
|
|
|
ques.originUserScore = ques.reviewScore |
|
|
|
|
this.handleEssayScore(ques) |
|
|
|
|
this.handleIsCorrect(ques) |
|
|
|
|
Util.successMsg('保存成功') |
|
|
|
|
}, |
|
|
|
|
// 填空题的小空对错点击回调 |
|
|
|
@ -455,6 +455,7 @@ export default { |
|
|
|
|
jsonText: ques.jsonText |
|
|
|
|
}]) |
|
|
|
|
ques.originUserScore = ques.reviewScore |
|
|
|
|
this.handleIsCorrect(ques) |
|
|
|
|
Util.successMsg('保存成功') |
|
|
|
|
}, |
|
|
|
|
// 保存评语 |
|
|
|
@ -541,7 +542,7 @@ export default { |
|
|
|
|
reviewScore: n.reviewScore, |
|
|
|
|
}) |
|
|
|
|
n.originUserScore = n.reviewScore |
|
|
|
|
this.handleEssayScore(n) |
|
|
|
|
this.handleIsCorrect(n) |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
if (params.length) await this.$post(this.api.reviewPaper, params) |
|
|
|
|