|
|
|
@ -43,8 +43,8 @@ |
|
|
|
|
@click="filterStatus(item.id)">{{ item.name }}</li> |
|
|
|
|
</ul> |
|
|
|
|
</div> |
|
|
|
|
<div class="middle"> |
|
|
|
|
<ul v-if="paper" class="ques-wrap" id="quesWrap"> |
|
|
|
|
<div :class="['middle', { none: !paper || !paper.length }]"> |
|
|
|
|
<ul v-if="paper && paper.length" class="ques-wrap" id="quesWrap"> |
|
|
|
|
<li v-for="(item, i) in paper" :key="i"> |
|
|
|
|
<div class="outline"> |
|
|
|
|
{{ arabicToChinese(i + 1) }}、{{ item.outlineName }}(本题共{{ item.questionNum }}小题,共{{ |
|
|
|
@ -130,8 +130,8 @@ |
|
|
|
|
<div v-else-if="ques.userAnswerFill" class="fill-answers"> |
|
|
|
|
<p v-for="(ans, j) in ques.userAnswerFill" :key="j" class="fill-answer"> |
|
|
|
|
填空{{ j + 1 }}:{{ ans.studentAnswer || '未作答' }} |
|
|
|
|
<img v-if="ans.correct" src="@/assets/images/right.svg" alt="" class="icon"> |
|
|
|
|
<img v-else src="@/assets/images/wrong.svg" alt="" class="icon">; |
|
|
|
|
<img :src="require('@/assets/images/' + (ans.correct ? 'right' : 'wrong') + '.svg')" alt="" |
|
|
|
|
class="icon" @click="fillAnswerSwitch(ans, j, ques)"> |
|
|
|
|
</p> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
@ -140,11 +140,14 @@ |
|
|
|
|
<div class="line">题目分值:{{ ques.questionScore }}分</div> |
|
|
|
|
<div class="line"> |
|
|
|
|
考生得分:<el-input class="score-input hide-spin" type="number" placeholder="请输入分数" size="small" |
|
|
|
|
v-model.number="ques.reviewScore" />分  |
|
|
|
|
<el-button v-if="ques.originUserScore !== ques.reviewScore" type="primary" size="mini" |
|
|
|
|
@click="saveScore(ques)">保存分数</el-button> |
|
|
|
|
<el-popover class="m-l-10" placement="bottom" width="400" trigger="click"> |
|
|
|
|
<el-input type="textarea" :rows="3" autosize resize="none" placeholder="请输入" |
|
|
|
|
:disabled="item.questionType === 'fill_blank'" 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" class="m-l-10" type="primary" |
|
|
|
|
size="mini" @click="saveScore(ques)">保存分数</el-button> |
|
|
|
|
<el-popover 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" /> |
|
|
|
|
<div class="m-t-10 text-right"> |
|
|
|
|
<el-button type="primary" size="mini" @click="saveComment(ques)">保存</el-button> |
|
|
|
@ -155,7 +158,7 @@ |
|
|
|
|
</el-popover> |
|
|
|
|
</div> |
|
|
|
|
<div v-if="ques.comments" class="line"> |
|
|
|
|
评语: |
|
|
|
|
<span class="line-label">评语:</span> |
|
|
|
|
<div> |
|
|
|
|
<span>{{ ques.commentSetTime }}</span> |
|
|
|
|
<i class="el-icon-delete-solid del-comment" @click="delComment(ques)"></i> |
|
|
|
@ -168,6 +171,10 @@ |
|
|
|
|
</div> |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
|
<div v-else class="empty"> |
|
|
|
|
<img class="icon" src="@/assets/images/empty.svg" alt=""> |
|
|
|
|
<p>暂无数据</p> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="right"> |
|
|
|
|
<h6>基本信息</h6> |
|
|
|
@ -197,10 +204,9 @@ |
|
|
|
|
<script> |
|
|
|
|
import PdfDia from '@/components/pdf' |
|
|
|
|
import QuesConst from '@/const/ques' |
|
|
|
|
import TestPaperConst from '@/const/testPaper' |
|
|
|
|
import Util from '@/libs/util' |
|
|
|
|
import _ from 'lodash' |
|
|
|
|
import axios from 'axios' |
|
|
|
|
import Decimal from 'decimal.js' |
|
|
|
|
export default { |
|
|
|
|
components: { |
|
|
|
|
PdfDia |
|
|
|
@ -423,6 +429,21 @@ export default { |
|
|
|
|
ques.originUserScore = ques.reviewScore |
|
|
|
|
Util.successMsg('保存成功') |
|
|
|
|
}, |
|
|
|
|
// 填空题的小空对错点击回调 |
|
|
|
|
async fillAnswerSwitch (ans, j, ques) { |
|
|
|
|
ans.correct = !ans.correct |
|
|
|
|
ans.status = ans.correct ? '正确' : '错误' |
|
|
|
|
ques.userAnswerFill[j] = ans |
|
|
|
|
ques.jsonText = JSON.stringify(ques.userAnswerFill) |
|
|
|
|
ques.reviewScore = Decimal(ques.reviewScore)[ans.correct ? 'add' : 'sub'](Decimal(ans.score)).toNumber() |
|
|
|
|
await this.$post(this.api.reviewPaper, [{ |
|
|
|
|
assignmentDetailId: ques.assignmentDetailId, |
|
|
|
|
reviewScore: ques.reviewScore, |
|
|
|
|
jsonText: ques.jsonText |
|
|
|
|
}]) |
|
|
|
|
ques.originUserScore = ques.reviewScore |
|
|
|
|
Util.successMsg('保存成功') |
|
|
|
|
}, |
|
|
|
|
// 保存评语 |
|
|
|
|
async saveComment (ques) { |
|
|
|
|
const res = await this.$post(this.api.setComments, { |
|
|
|
@ -728,6 +749,12 @@ export default { |
|
|
|
|
overflow: auto; |
|
|
|
|
outline: none; |
|
|
|
|
|
|
|
|
|
&.none { |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: center; |
|
|
|
|
align-items: center; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
&>li { |
|
|
|
|
margin-bottom: 15px; |
|
|
|
|
} |
|
|
|
@ -854,6 +881,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.comment { |
|
|
|
|
margin-top: 5px; |
|
|
|
|
font-size: 16px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -873,17 +901,17 @@ export default { |
|
|
|
|
|
|
|
|
|
.icon { |
|
|
|
|
margin-left: 7px; |
|
|
|
|
cursor: pointer; |
|
|
|
|
|
|
|
|
|
&:hover { |
|
|
|
|
opacity: .8; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.score-input { |
|
|
|
|
width: 100px; |
|
|
|
|
margin-right: 5px; |
|
|
|
|
|
|
|
|
|
.el-input__inner { |
|
|
|
|
color: #333; |
|
|
|
|
background-color: #fff; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.fill-input { |
|
|
|
|