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