|
|
|
@ -104,23 +104,29 @@ |
|
|
|
|
<div v-else>暂无解析</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div :class="['ques-info', { essay: item.questionType === 'essay' && ques.reviewScore === '' }]"> |
|
|
|
|
<div |
|
|
|
|
:class="['ques-info', { essay: item.questionType === 'essay' && ques.reviewScore === '' && !ques.notScored }]"> |
|
|
|
|
<template v-if="item.questionType === 'essay'"> |
|
|
|
|
<div class="line"> |
|
|
|
|
<span class="line-label">参考答案:</span> |
|
|
|
|
<div v-html="ques.questionAnswerVersionsList[0].referenceAnswer" class="html-parse"></div> |
|
|
|
|
<div v-if="ques.questionAnswerVersionsList[0].referenceAnswer" |
|
|
|
|
v-html="ques.questionAnswerVersionsList[0].referenceAnswer" class="html-parse"></div> |
|
|
|
|
<span v-else>暂无参考答案</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="line"> |
|
|
|
|
<span class="line-label">考生答案:</span> |
|
|
|
|
<div v-if="ques.answerContent" v-html="ques.answerContent" class="html-parse"></div> |
|
|
|
|
<div v-else>未作答</div> |
|
|
|
|
</div> |
|
|
|
|
<div v-if="ques.attachmentUrl" class="line"> |
|
|
|
|
<div v-if="ques.allowAttachment" class="line"> |
|
|
|
|
<span class="line-label">考生上传附件:</span> |
|
|
|
|
<template v-if="ques.attachmentUrl"> |
|
|
|
|
<el-link class="m-r-10" type="primary" @click="preview(ques.attachmentUrl)">{{ |
|
|
|
|
ques.attachmentName }}</el-link> |
|
|
|
|
<el-button type="primary" size="mini" round |
|
|
|
|
@click="download(ques.attachmentName, ques.attachmentUrl)">下载</el-button> |
|
|
|
|
</template> |
|
|
|
|
<span v-else>未上传</span> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<template v-else> |
|
|
|
@ -135,18 +141,22 @@ |
|
|
|
|
class="icon" @click="fillAnswerSwitch(ans, j, ques)"> |
|
|
|
|
</p> |
|
|
|
|
</div> |
|
|
|
|
<span v-else>未作答</span> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<div class="line">题目分值:{{ ques.questionScore }}分</div> |
|
|
|
|
<div class="line">题目分值:{{ ques.notScored ? '不计分' : ques.questionScore + '分' }}</div> |
|
|
|
|
<div class="line"> |
|
|
|
|
考生得分:<el-input class="score-input hide-spin" type="number" placeholder="请输入分数" size="small" |
|
|
|
|
考生得分:<template v-if="ques.notScored">不计分</template> |
|
|
|
|
<template v-else> |
|
|
|
|
<el-input class="score-input hide-spin" type="number" placeholder="请输入分数" size="small" |
|
|
|
|
:disabled="item.questionType === 'fill_blank' || readonly" v-model.number="ques.reviewScore" /> |
|
|
|
|
<span class="m-r-10">分</span> |
|
|
|
|
<span v-if="item.questionType === 'fill_blank'">(如需修改填空题的得分请直接修改考生答案的对错)</span> |
|
|
|
|
|
|
|
|
|
<el-button v-if="ques.originUserScore !== ques.reviewScore && !readonly" class="m-l-10" |
|
|
|
|
type="primary" size="mini" @click="saveScore(ques)">保存分数</el-button> |
|
|
|
|
</template> |
|
|
|
|
<el-popover v-if="!readonly" class="m-l-20" placement="bottom" width="400" trigger="click"> |
|
|
|
|
<el-input type="textarea" :rows="3" :autosize="{ minRows: 3 }" resize="none" placeholder="请输入" |
|
|
|
|
v-model="ques.newComments" /> |
|
|
|
@ -260,6 +270,10 @@ export default { |
|
|
|
|
id: 4, |
|
|
|
|
name: '待判分' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 5, |
|
|
|
|
name: '不计分' |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
info: {}, |
|
|
|
|
paper: [], |
|
|
|
@ -304,10 +318,11 @@ export default { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
n.notScored = n.questionScore === 0 // 不计分(题目分值=0,则为不计分) |
|
|
|
|
const opts = n.questionAnswerVersionsList |
|
|
|
|
if (type !== 'fill_blank' && type !== 'essay') { // 选择题 |
|
|
|
|
if (!n.userScore) n.userScore = 0 |
|
|
|
|
n.isCorrect = n.userScore && n.userScore === n.questionScore ? 1 : 2 |
|
|
|
|
n.isCorrect = n.notScored ? 5 : (n.userScore && n.userScore === n.questionScore ? 1 : 2) |
|
|
|
|
|
|
|
|
|
// 用户选择结果 |
|
|
|
|
let { userAnswer } = n |
|
|
|
@ -352,13 +367,13 @@ export default { |
|
|
|
|
// 填空题需要区分部分正确还是正确、错误 |
|
|
|
|
let rightLen = 0 |
|
|
|
|
if (n.userAnswerFill) rightLen = n.userAnswerFill.filter(m => m.correct).length // 正确的空的数量 |
|
|
|
|
n.isCorrect = n.userScore && n.questionScore === n.userScore ? 1 : (rightLen ? 3 : 2) |
|
|
|
|
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 = '' |
|
|
|
|
this.handleIsCorrect(n) |
|
|
|
|
} |
|
|
|
|
n.originUserScore = n.reviewScore |
|
|
|
|
n.originUserScore = n.notScored ? '-' : n.reviewScore |
|
|
|
|
n.newComments = n.comments || '' |
|
|
|
|
}) |
|
|
|
|
paper.push(e) |
|
|
|
@ -379,7 +394,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 判断试题的对错 |
|
|
|
|
handleIsCorrect (n) { |
|
|
|
|
n.isCorrect = n.reviewScore === '' ? 4 : (n.reviewScore === n.questionScore ? 1 : n.reviewScore ? 3 : 2) // 简答题没有reviewScore则显示待判分, 有则判断是否跟题目分数相同,完全相同是正确,小于则部分正确,0则错误 |
|
|
|
|
n.isCorrect = n.notScored ? 5 : (n.reviewScore === '' ? 4 : (n.reviewScore === n.questionScore ? 1 : n.reviewScore ? 3 : 2)) // 简答题没有reviewScore则显示待判分, 有则判断是否跟题目分数相同,完全相同是正确,小于则部分正确,0则错误 |
|
|
|
|
}, |
|
|
|
|
scrollToSmooth (position, duration) { |
|
|
|
|
let startTime = Date.now() |
|
|
|
@ -661,7 +676,7 @@ export default { |
|
|
|
|
height: 100%; |
|
|
|
|
|
|
|
|
|
.left { |
|
|
|
|
width: 290px; |
|
|
|
|
width: 320px; |
|
|
|
|
padding: 0 10px; |
|
|
|
|
background-color: #fff; |
|
|
|
|
|
|
|
|
@ -770,6 +785,12 @@ export default { |
|
|
|
|
border-color: #fe9f0a; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.status5 .serial { |
|
|
|
|
color: #fff; |
|
|
|
|
background-color: #d1d1d1; |
|
|
|
|
border-color: #d1d1d1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.score { |
|
|
|
|
height: 22px; |
|
|
|
|
padding: 0 2px; |
|
|
|
@ -782,7 +803,7 @@ export default { |
|
|
|
|
.status-filter { |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: space-between; |
|
|
|
|
padding: 10px; |
|
|
|
|
padding: 10px 0; |
|
|
|
|
border-top: 1px solid #e5e5e5; |
|
|
|
|
|
|
|
|
|
li { |
|
|
|
@ -793,6 +814,7 @@ export default { |
|
|
|
|
color: #333; |
|
|
|
|
cursor: pointer; |
|
|
|
|
border: 1px solid transparent; |
|
|
|
|
white-space: nowrap; |
|
|
|
|
|
|
|
|
|
&:before { |
|
|
|
|
content: ''; |
|
|
|
@ -835,7 +857,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
&:last-child { |
|
|
|
|
&:nth-child(4) { |
|
|
|
|
&.active { |
|
|
|
|
color: #fe9f0a; |
|
|
|
|
border-color: #fe9f0a; |
|
|
|
@ -846,6 +868,17 @@ export default { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
&:last-child { |
|
|
|
|
&.active { |
|
|
|
|
color: #d1d1d1; |
|
|
|
|
border-color: #d1d1d1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
&:before { |
|
|
|
|
background-color: #d1d1d1; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
&.active { |
|
|
|
|
font-weight: 600; |
|
|
|
|
} |
|
|
|
@ -854,7 +887,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.middle { |
|
|
|
|
width: calc(100% - 520px); |
|
|
|
|
width: calc(100% - 550px); |
|
|
|
|
height: calc(100vh - 54px); |
|
|
|
|
padding: 10px; |
|
|
|
|
margin: 0 15px; |
|
|
|
|