|
|
|
@ -32,7 +32,7 @@ |
|
|
|
|
@click="filterStatus(item.id)">{{ item.name }}</li> |
|
|
|
|
</ul> |
|
|
|
|
</div> |
|
|
|
|
<div class="right"> |
|
|
|
|
<div class="right" id="right"> |
|
|
|
|
<div class="text-right"> |
|
|
|
|
<el-button type="primary" @click="exportPage">导出报告</el-button> |
|
|
|
|
</div> |
|
|
|
@ -88,17 +88,24 @@ |
|
|
|
|
<img src="@/assets/img/report4.png" alt=""> |
|
|
|
|
得分情况 |
|
|
|
|
</h6> |
|
|
|
|
<el-table :data="paper" class="table" border stripe header-align="center"> |
|
|
|
|
<el-table :data="outlines" class="table" border stripe header-align="center"> |
|
|
|
|
<el-table-column prop="outlineName" label="大题名称" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="questionNum" label="小题总数" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="targetScore" label="总分" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="targetScore" label="总分" align="center"> |
|
|
|
|
<template slot-scope="scope">{{ scope.row.targetScore }}分</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="userTotalScore" label="得分" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<p v-if="scope.row.questionType === 'essay'" class="text-red">待评分</p> |
|
|
|
|
<p v-else>{{ scope.row.userTotalScore }}</p> |
|
|
|
|
<p v-else-if="essayExist && !scope.row.paperId" class="text-red">{{ scope.row.userTotalScore |
|
|
|
|
}}分(部分试题待判分,成绩待定)</p> |
|
|
|
|
<p v-else>{{ scope.row.userTotalScore }}分</p> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="scoreRatePercentage" label="得分率" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="scoreRatePercentage" label="得分率" align="center"> |
|
|
|
|
<template slot-scope="scope">{{ scope.row.questionType === 'essay' ? '-' : scope.row.scoreRatePercentage |
|
|
|
|
}}</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
@ -146,9 +153,9 @@ |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<div class="m-b-10"> |
|
|
|
|
<div v-if="ques.knowledgePointList && ques.knowledgePointList.length" class="m-b-10"> |
|
|
|
|
<span>【知识点】</span> |
|
|
|
|
<el-tag v-for="(kp, k) in ques.kpList" :key="k" class="m-r-5">{{ kp }}</el-tag> |
|
|
|
|
<el-tag v-for="(kp, k) in ques.knowledgePointList" :key="k" class="m-r-5">{{ kp.name }}</el-tag> |
|
|
|
|
</div> |
|
|
|
|
<div class="flex m-b-10"> |
|
|
|
|
<span>【解析】</span> |
|
|
|
@ -161,16 +168,16 @@ |
|
|
|
|
<div :class="['ques-info', { essay: item.questionType === 'essay' }]"> |
|
|
|
|
<template v-if="item.questionType === 'essay'"> |
|
|
|
|
<div class="line"> |
|
|
|
|
<span>参考答案:</span> |
|
|
|
|
<div v-html="ques.questionAnswerVersionsList[0].referenceAnswer"></div> |
|
|
|
|
<span class="line-label">参考答案:</span> |
|
|
|
|
<div v-html="ques.questionAnswerVersionsList[0].referenceAnswer" class="html-parse"></div> |
|
|
|
|
</div> |
|
|
|
|
<div class="line"> |
|
|
|
|
<span>考生答案:</span> |
|
|
|
|
<div v-if="ques.answerContent" v-html="ques.answerContent"></div> |
|
|
|
|
<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"> |
|
|
|
|
<span>考生上传附件:</span> |
|
|
|
|
<span class="line-label">考生上传附件:</span> |
|
|
|
|
<el-link class="m-r-10" type="primary">{{ ques.attachmentName }}</el-link> |
|
|
|
|
<el-button type="primary" size="mini" round @click="download(ques)">下载</el-button> |
|
|
|
|
</div> |
|
|
|
@ -178,7 +185,7 @@ |
|
|
|
|
<template v-else> |
|
|
|
|
<div class="line">正确答案:{{ ques.quesAnswer }}</div> |
|
|
|
|
<div class="line"> |
|
|
|
|
<span>考生答案:</span> |
|
|
|
|
<span class="line-label">考生答案:</span> |
|
|
|
|
<p v-if="item.questionType !== 'fill_blank'">{{ ques.userAnswerStr }}</p> |
|
|
|
|
<div v-else-if="ques.userAnswerFill" class="fill-answers"> |
|
|
|
|
<p v-for="(ans, j) in ques.userAnswerFill" :key="j" class="fill-answer"> |
|
|
|
@ -192,7 +199,7 @@ |
|
|
|
|
|
|
|
|
|
<div class="line">题目分值:{{ ques.questionScore }}分</div> |
|
|
|
|
<div class="line">考生得分:<el-input class="score-input" size="small" :value="ques.userScore" |
|
|
|
|
disabled />分 |
|
|
|
|
readonly />分 |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
@ -218,6 +225,7 @@ |
|
|
|
|
import QuesConst from '@/const/ques' |
|
|
|
|
import TestPaperConst from '@/const/testPaper' |
|
|
|
|
import Util from '@/libs/util' |
|
|
|
|
import _ from 'lodash' |
|
|
|
|
export default { |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
@ -256,6 +264,7 @@ export default { |
|
|
|
|
name: '待判分' |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
outlines: [], |
|
|
|
|
paper: [], |
|
|
|
|
essayExist: 0, |
|
|
|
|
}; |
|
|
|
@ -267,14 +276,14 @@ export default { |
|
|
|
|
async getData () { |
|
|
|
|
this.loading = true |
|
|
|
|
try { |
|
|
|
|
const { userAnswers: paper, report } = await this.$get(`${this.api.getDetailedExamScores}?reportId=${this.reportId}`) |
|
|
|
|
const { userAnswers: outline, report, paper } = await this.$get(`${this.api.getDetailedExamScores}?reportId=${this.reportId}`) |
|
|
|
|
this.form = report |
|
|
|
|
|
|
|
|
|
// 处理试题信息 |
|
|
|
|
const { questionTypes: types, difficults } = QuesConst |
|
|
|
|
const { numToLetter } = Util |
|
|
|
|
let essayExist = 0 |
|
|
|
|
paper.map(e => { |
|
|
|
|
outline.map(e => { |
|
|
|
|
if (e.questionType === 'essay') essayExist = 1 |
|
|
|
|
e.shrink = false |
|
|
|
|
const type = e.questionType |
|
|
|
@ -287,7 +296,6 @@ export default { |
|
|
|
|
n.difficultTheme = curDiff.theme |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
n.kpList = n.knowledgePointName.split(',') |
|
|
|
|
|
|
|
|
|
const opts = n.questionAnswerVersionsList |
|
|
|
|
if (type !== 'fill_blank' && type !== 'essay') { // 选择题 |
|
|
|
@ -298,7 +306,7 @@ export default { |
|
|
|
|
let { userAnswer } = n |
|
|
|
|
if (userAnswer) { |
|
|
|
|
userAnswer = JSON.parse(userAnswer) |
|
|
|
|
n.userAnswerStr = userAnswer.length ? userAnswer.map(m => numToLetter(+m - 1)).join('') : '未作答' |
|
|
|
|
n.userAnswerStr = userAnswer.length ? (type === 'judgement' ? opts[+userAnswer[0] - 1].optionText : userAnswer.map(m => numToLetter(+m - 1)).join('')) : '未作答' |
|
|
|
|
} else { |
|
|
|
|
userAnswer = [] |
|
|
|
|
} |
|
|
|
@ -307,7 +315,7 @@ export default { |
|
|
|
|
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(type === 'judgement' ? m.optionText : numToLetter(j)) |
|
|
|
|
}) |
|
|
|
|
n.quesAnswer = quesAnswer.join('') |
|
|
|
|
|
|
|
|
@ -345,7 +353,17 @@ export default { |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
this.essayExist = essayExist // 是否存在简答题 |
|
|
|
|
this.paper = paper |
|
|
|
|
this.paper = outline |
|
|
|
|
this.outlines = [ |
|
|
|
|
...outline, |
|
|
|
|
{ |
|
|
|
|
outlineName: '合计', |
|
|
|
|
questionNum: paper.questionCount, |
|
|
|
|
targetScore: paper.score, |
|
|
|
|
userTotalScore: paper.userTotalScore, |
|
|
|
|
scoreRatePercentage: paper.scoreRate |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
let { form } = this |
|
|
|
|
this.info = { |
|
|
|
|
workNumber: form.workNumber, |
|
|
|
@ -368,7 +386,7 @@ export default { |
|
|
|
|
function scroll () { |
|
|
|
|
let now = Date.now() |
|
|
|
|
let progress = Math.min(1, (now - startTime) / duration) |
|
|
|
|
document.querySelector('#quesWrap').scrollTo(0, position * progress) |
|
|
|
|
document.querySelector('#right').scrollTo(0, position * progress) |
|
|
|
|
|
|
|
|
|
if (progress < 1) { |
|
|
|
|
window.requestAnimationFrame(scroll) |
|
|
|
@ -380,7 +398,7 @@ export default { |
|
|
|
|
// 答题卡题目点击滚动 |
|
|
|
|
scrollToQues (e) { |
|
|
|
|
const el = document.querySelector('#ques' + e.id) |
|
|
|
|
el && this.scrollToSmooth(el.offsetTop - document.querySelector('#quesWrap').offsetTop, 200) |
|
|
|
|
el && this.scrollToSmooth(el.offsetTop - document.querySelector('#quesWrap').offsetTop + 200, 200) |
|
|
|
|
}, |
|
|
|
|
// 答题卡筛选 |
|
|
|
|
filterStatus (e) { |
|
|
|
@ -799,6 +817,24 @@ samp { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.html-parse { |
|
|
|
|
table { |
|
|
|
|
display: table; |
|
|
|
|
margin-bottom: 10px; |
|
|
|
|
border-collapse: collapse; |
|
|
|
|
|
|
|
|
|
th, |
|
|
|
|
td { |
|
|
|
|
padding: 5px 10px; |
|
|
|
|
border: 1px solid #DDD; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
img { |
|
|
|
|
max-width: 100%; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.item:not(:last-child) { |
|
|
|
|
padding-bottom: 15px; |
|
|
|
|
margin-bottom: 15px; |
|
|
|
@ -811,6 +847,7 @@ samp { |
|
|
|
|
margin-bottom: 10px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.tag { |
|
|
|
|
margin-left: 10px; |
|
|
|
|
cursor: pointer; |
|
|
|
@ -863,7 +900,7 @@ samp { |
|
|
|
|
|
|
|
|
|
.line { |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
align-items: baseline; |
|
|
|
|
margin-bottom: 8px; |
|
|
|
|
font-size: 13px; |
|
|
|
|
color: #333; |
|
|
|
@ -871,6 +908,14 @@ samp { |
|
|
|
|
&:last-child { |
|
|
|
|
margin-bottom: 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
img { |
|
|
|
|
max-width: 100%; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.line-label { |
|
|
|
|
white-space: nowrap; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.fill-answers { |
|
|
|
|