|
|
@ -17,7 +17,8 @@ |
|
|
|
item.targetScore }}分)</h6> |
|
|
|
item.targetScore }}分)</h6> |
|
|
|
<ul class="serials"> |
|
|
|
<ul class="serials"> |
|
|
|
<template v-for="(ques, j) in item.userAnswerList"> |
|
|
|
<template v-for="(ques, j) in item.userAnswerList"> |
|
|
|
<li v-if="!sheetStatus || sheetStatus === ques.isCorrect" :key="j" :class="'status' + ques.isCorrect"> |
|
|
|
<li v-if="!sheetStatus || sheetStatus === ques.isCorrect" :key="j" :class="'status' + ques.isCorrect" |
|
|
|
|
|
|
|
@click="scrollToQues(ques)"> |
|
|
|
<p :class="['serial', { answered: ques.answered, partAnswer: ques.partAnswer }]">{{ j + 1 }}</p> |
|
|
|
<p :class="['serial', { answered: ques.answered, partAnswer: ques.partAnswer }]">{{ j + 1 }}</p> |
|
|
|
<p class="score">{{ ques.userScore }}</p> |
|
|
|
<p class="score">{{ ques.userScore }}</p> |
|
|
|
</li> |
|
|
|
</li> |
|
|
@ -101,7 +102,7 @@ |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<ul v-if="paper" class="ques-wrap"> |
|
|
|
<ul v-if="paper" class="ques-wrap" id="quesWrap"> |
|
|
|
<li v-for="(item, i) in paper" :key="i"> |
|
|
|
<li v-for="(item, i) in paper" :key="i"> |
|
|
|
<div class="outline"> |
|
|
|
<div class="outline"> |
|
|
|
{{ arabicToChinese(i + 1) }}、{{ item.questionTypeName }}(本题共{{ item.questionNum }}小题,共{{ |
|
|
|
{{ arabicToChinese(i + 1) }}、{{ item.questionTypeName }}(本题共{{ item.questionNum }}小题,共{{ |
|
|
@ -110,7 +111,7 @@ |
|
|
|
@click="item.shrink = !item.shrink"> |
|
|
|
@click="item.shrink = !item.shrink"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div :class="['ques', { hide: item.shrink }]"> |
|
|
|
<div :class="['ques', { hide: item.shrink }]"> |
|
|
|
<div v-for="(ques, j) in item.userAnswerList" :key="j" class="item"> |
|
|
|
<div v-for="(ques, j) in item.userAnswerList" :key="j" class="item" :id="'ques' + ques.id"> |
|
|
|
<div class="stem-wrap"> |
|
|
|
<div class="stem-wrap"> |
|
|
|
<div class="labels"> |
|
|
|
<div class="labels"> |
|
|
|
<span class="label">{{ j + 1 }} / {{ item.questionNum }}</span> |
|
|
|
<span class="label">{{ j + 1 }} / {{ item.questionNum }}</span> |
|
|
@ -126,9 +127,10 @@ |
|
|
|
v-if="item.questionType !== 'fill_blank' && item.questionType !== 'essay' && ques.questionAnswerVersionsList" |
|
|
|
v-if="item.questionType !== 'fill_blank' && item.questionType !== 'essay' && ques.questionAnswerVersionsList" |
|
|
|
class="m-b-10"> |
|
|
|
class="m-b-10"> |
|
|
|
<div v-for="(opt, j) in ques.questionAnswerVersionsList" :key="j" class="opt"> |
|
|
|
<div v-for="(opt, j) in ques.questionAnswerVersionsList" :key="j" class="opt"> |
|
|
|
<el-checkbox v-if="item.questionType === 'multiple_choice'" v-model="opt.answerIsCorrect" |
|
|
|
<img v-if="opt.optCorrect === 1" src="@/assets/img/right.svg" alt="" class="icon"> |
|
|
|
:true-label="1"></el-checkbox> |
|
|
|
<img v-else-if="!opt.optCorrect" src="@/assets/img/wrong.svg" alt="" class="icon"> |
|
|
|
<el-radio v-else v-model="opt.answerIsCorrect" :true-label="1" :label="1" disabled></el-radio> |
|
|
|
<span v-else class="icon not-ans"></span> |
|
|
|
|
|
|
|
|
|
|
|
<span>{{ numToLetter(j) }}. </span> |
|
|
|
<span>{{ numToLetter(j) }}. </span> |
|
|
|
<div class="text" v-html="opt.optionText"></div> |
|
|
|
<div class="text" v-html="opt.optionText"></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -164,7 +166,8 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="line"> |
|
|
|
<div class="line"> |
|
|
|
<span>考生答案:</span> |
|
|
|
<span>考生答案:</span> |
|
|
|
<div v-html="ques.answerContent"></div> |
|
|
|
<div v-if="ques.answerContent" v-html="ques.answerContent"></div> |
|
|
|
|
|
|
|
<div v-else>未作答</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-if="ques.attachmentUrl" class="line"> |
|
|
|
<div v-if="ques.attachmentUrl" class="line"> |
|
|
|
<span>考生上传附件:</span> |
|
|
|
<span>考生上传附件:</span> |
|
|
@ -179,7 +182,7 @@ |
|
|
|
<p v-if="item.questionType !== 'fill_blank'">{{ ques.userAnswerStr }}</p> |
|
|
|
<p v-if="item.questionType !== 'fill_blank'">{{ ques.userAnswerStr }}</p> |
|
|
|
<div v-else-if="ques.userAnswerFill" class="fill-answers"> |
|
|
|
<div v-else-if="ques.userAnswerFill" class="fill-answers"> |
|
|
|
<p v-for="(ans, j) in ques.userAnswerFill" :key="j" class="fill-answer"> |
|
|
|
<p v-for="(ans, j) in ques.userAnswerFill" :key="j" class="fill-answer"> |
|
|
|
填空{{ j + 1 }}:{{ ans.studentAnswer }} |
|
|
|
填空{{ j + 1 }}:{{ ans.studentAnswer || '未作答' }} |
|
|
|
<img v-if="ans.correct" src="@/assets/img/right.svg" alt="" class="icon"> |
|
|
|
<img v-if="ans.correct" src="@/assets/img/right.svg" alt="" class="icon"> |
|
|
|
<img v-else src="@/assets/img/wrong.svg" alt="" class="icon">; |
|
|
|
<img v-else src="@/assets/img/wrong.svg" alt="" class="icon">; |
|
|
|
</p> |
|
|
|
</p> |
|
|
@ -288,17 +291,26 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
const opts = n.questionAnswerVersionsList |
|
|
|
const opts = n.questionAnswerVersionsList |
|
|
|
if (type !== 'fill_blank' && type !== 'essay') { // 选择题 |
|
|
|
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.userScore && n.userScore === n.questionScore ? 1 : 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 用户选择结果 |
|
|
|
|
|
|
|
let { userAnswer } = n |
|
|
|
|
|
|
|
if (userAnswer) { |
|
|
|
|
|
|
|
userAnswer = JSON.parse(userAnswer) |
|
|
|
|
|
|
|
n.userAnswerStr = userAnswer.length ? userAnswer.map(m => numToLetter(+m - 1)).join('') : '未作答' |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
userAnswer = [] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const quesAnswer = [] |
|
|
|
const quesAnswer = [] |
|
|
|
opts && opts.map((m, j) => { |
|
|
|
opts && opts.map((m, j) => { |
|
|
|
|
|
|
|
const selected = userAnswer.includes(m.optionNumber) |
|
|
|
|
|
|
|
m.optCorrect = m.answerIsCorrect ? (selected ? 1 : -1) : (selected ? 0 : -1) // 用户选择的结果跟正确答案是否匹配(1正确,0错误,-1未选择) |
|
|
|
m.answerIsCorrect && quesAnswer.push(numToLetter(j)) |
|
|
|
m.answerIsCorrect && quesAnswer.push(numToLetter(j)) |
|
|
|
}) |
|
|
|
}) |
|
|
|
n.quesAnswer = quesAnswer.join('') |
|
|
|
n.quesAnswer = quesAnswer.join('') |
|
|
|
let { userAnswer } = n |
|
|
|
|
|
|
|
if (userAnswer) { |
|
|
|
|
|
|
|
userAnswer = JSON.parse(userAnswer) |
|
|
|
|
|
|
|
n.userAnswerStr = userAnswer.map(m => numToLetter(+m - 1)).join('') |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (type === 'fill_blank') { // 填空题 |
|
|
|
} else if (type === 'fill_blank') { // 填空题 |
|
|
|
// 学生做的填空题答案及分数 |
|
|
|
// 学生做的填空题答案及分数 |
|
|
|
let { jsonText } = n |
|
|
|
let { jsonText } = n |
|
|
@ -321,6 +333,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!n.userScore) n.userScore = 0 |
|
|
|
// 填空题需要区分部分正确还是正确、错误 |
|
|
|
// 填空题需要区分部分正确还是正确、错误 |
|
|
|
let rightLen = 0 |
|
|
|
let rightLen = 0 |
|
|
|
if (n.userAnswerFill) rightLen = n.userAnswerFill.filter(m => m.correct).length // 正确的空的数量 |
|
|
|
if (n.userAnswerFill) rightLen = n.userAnswerFill.filter(m => m.correct).length // 正确的空的数量 |
|
|
@ -349,6 +362,26 @@ export default { |
|
|
|
this.loading = false |
|
|
|
this.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
scrollToSmooth (position, duration) { |
|
|
|
|
|
|
|
let startTime = Date.now() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function scroll () { |
|
|
|
|
|
|
|
let now = Date.now() |
|
|
|
|
|
|
|
let progress = Math.min(1, (now - startTime) / duration) |
|
|
|
|
|
|
|
document.querySelector('#quesWrap').scrollTo(0, position * progress) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (progress < 1) { |
|
|
|
|
|
|
|
window.requestAnimationFrame(scroll) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
window.requestAnimationFrame(scroll) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 答题卡题目点击滚动 |
|
|
|
|
|
|
|
scrollToQues (e) { |
|
|
|
|
|
|
|
const el = document.querySelector('#ques' + e.id) |
|
|
|
|
|
|
|
el && this.scrollToSmooth(el.offsetTop - document.querySelector('#quesWrap').offsetTop, 200) |
|
|
|
|
|
|
|
}, |
|
|
|
// 答题卡筛选 |
|
|
|
// 答题卡筛选 |
|
|
|
filterStatus (e) { |
|
|
|
filterStatus (e) { |
|
|
|
this.sheetStatus = this.sheetStatus === e ? '' : e |
|
|
|
this.sheetStatus = this.sheetStatus === e ? '' : e |
|
|
@ -446,7 +479,7 @@ samp { |
|
|
|
font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, 'microsoft yahei', arial, STHeiTi, sans-serif; |
|
|
|
font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, 'microsoft yahei', arial, STHeiTi, sans-serif; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.report { |
|
|
|
/deep/.report { |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
|
|
|
|
|
|
|
|
.r-title { |
|
|
|
.r-title { |
|
|
@ -550,7 +583,7 @@ samp { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/deep/ .table th { |
|
|
|
.table th { |
|
|
|
background-color: #e5dfff !important; |
|
|
|
background-color: #e5dfff !important; |
|
|
|
|
|
|
|
|
|
|
|
.cell { |
|
|
|
.cell { |
|
|
@ -603,6 +636,11 @@ samp { |
|
|
|
margin: 7px 9px; |
|
|
|
margin: 7px 9px; |
|
|
|
font-size: 13px; |
|
|
|
font-size: 13px; |
|
|
|
text-align: center; |
|
|
|
text-align: center; |
|
|
|
|
|
|
|
cursor: pointer; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
&:hover { |
|
|
|
|
|
|
|
opacity: .9; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.serial { |
|
|
|
.serial { |
|
|
@ -723,6 +761,7 @@ samp { |
|
|
|
padding: 10px; |
|
|
|
padding: 10px; |
|
|
|
background-color: #fff; |
|
|
|
background-color: #fff; |
|
|
|
overflow: auto; |
|
|
|
overflow: auto; |
|
|
|
|
|
|
|
outline: none; |
|
|
|
|
|
|
|
|
|
|
|
&>li { |
|
|
|
&>li { |
|
|
|
margin-bottom: 15px; |
|
|
|
margin-bottom: 15px; |
|
|
@ -873,24 +912,26 @@ samp { |
|
|
|
.opt { |
|
|
|
.opt { |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
flex-wrap: wrap; |
|
|
|
flex-wrap: wrap; |
|
|
|
align-items: baseline; |
|
|
|
align-items: flex-start; |
|
|
|
padding-left: 10px; |
|
|
|
padding-left: 10px; |
|
|
|
margin-bottom: 5px; |
|
|
|
margin-bottom: 5px; |
|
|
|
font-size: 14px; |
|
|
|
font-size: 14px; |
|
|
|
color: #707070; |
|
|
|
color: #707070; |
|
|
|
line-height: 1.6; |
|
|
|
line-height: 1.6; |
|
|
|
|
|
|
|
|
|
|
|
.el-radio, |
|
|
|
&>.icon { |
|
|
|
.el-checkbox { |
|
|
|
margin-right: 12px; |
|
|
|
margin-right: 15px; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.el-radio__label { |
|
|
|
.not-ans { |
|
|
|
display: none; |
|
|
|
width: 18px; |
|
|
|
|
|
|
|
height: 18px; |
|
|
|
|
|
|
|
border: 1px solid #ccc; |
|
|
|
|
|
|
|
border-radius: 50%; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.text { |
|
|
|
.text { |
|
|
|
max-width: calc(100% - 48px); |
|
|
|
max-width: calc(100% - 55px); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|