|
|
|
@ -315,6 +315,7 @@ export default { |
|
|
|
|
const { questionTypes: types, difficults } = QuesConst |
|
|
|
|
const { numToLetter } = Util |
|
|
|
|
const paper = [] |
|
|
|
|
let firstNotReview |
|
|
|
|
outline.map(e => { |
|
|
|
|
if (e.userAnswerList && e.userAnswerList.length) { |
|
|
|
|
e.shrink = false |
|
|
|
@ -381,7 +382,10 @@ export default { |
|
|
|
|
n.isCorrect = n.notScored ? 5 : (n.userScore && n.questionScore === n.userScore ? 1 : (rightLen ? 3 : 2)) |
|
|
|
|
} else if (type === 'essay') { // 简答题 |
|
|
|
|
if (!n.userScore) n.userScore = '' |
|
|
|
|
if (isNaN(n.reviewScore)) n.reviewScore = '' |
|
|
|
|
if (isNaN(n.reviewScore)) { |
|
|
|
|
n.reviewScore = '' |
|
|
|
|
if (!firstNotReview) firstNotReview = n.id // 第一个未评阅的试题 |
|
|
|
|
} |
|
|
|
|
this.handleIsCorrect(n) |
|
|
|
|
} |
|
|
|
|
n.originUserScore = n.notScored ? '-' : n.reviewScore |
|
|
|
@ -398,6 +402,12 @@ export default { |
|
|
|
|
// } |
|
|
|
|
this.paper = paper |
|
|
|
|
|
|
|
|
|
// 如果有未评阅的试题,则加载完后自动滚动到该试题的位置 |
|
|
|
|
firstNotReview && this.$nextTick(() => { |
|
|
|
|
const el = document.querySelector('#ques' + firstNotReview) |
|
|
|
|
el && this.scrollToSmooth(el.offsetTop - document.querySelector('#middle').offsetTop, 200) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
this.loading = false |
|
|
|
|
} catch (e) { |
|
|
|
|
this.loading = false |
|
|
|
|