|
|
@ -4,8 +4,8 @@ |
|
|
|
<p class="paper-name">{{ paperName }}</p> |
|
|
|
<p class="paper-name">{{ paperName }}</p> |
|
|
|
|
|
|
|
|
|
|
|
<div class="actions"> |
|
|
|
<div class="actions"> |
|
|
|
<el-button v-if="curIndex > 0" class="btn" @click="prev">上一个</el-button> |
|
|
|
<el-button v-if="showPrev" class="btn" @click="switchRecord(0)">上一个</el-button> |
|
|
|
<el-button v-if="recordTotal - 1 > curIndex" class="btn" @click="next">下一个</el-button> |
|
|
|
<el-button v-if="showNext" class="btn" @click="switchRecord(1)">下一个</el-button> |
|
|
|
<el-button class="btn" @click="saveAll">一键保存分数</el-button> |
|
|
|
<el-button class="btn" @click="saveAll">一键保存分数</el-button> |
|
|
|
<img class="exit" src="@/assets/images/exit.svg" alt="" @click="close"> |
|
|
|
<img class="exit" src="@/assets/images/exit.svg" alt="" @click="close"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -31,7 +31,7 @@ |
|
|
|
<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, item)"> |
|
|
|
@click="scrollToQues(ques, item)"> |
|
|
|
<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.originUserScore }}</p> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
@ -140,11 +140,12 @@ |
|
|
|
<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.userScore" />分  |
|
|
|
v-model.number="ques.reviewScore" />分  |
|
|
|
<el-button type="primary" size="mini" @click="saveScore(ques)">保存分数</el-button> |
|
|
|
<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-popover class="m-l-10" placement="bottom" width="400" trigger="click"> |
|
|
|
<el-input type="textarea" :rows="3" autosize resize="none" placeholder="请输入" |
|
|
|
<el-input type="textarea" :rows="3" autosize resize="none" placeholder="请输入" |
|
|
|
v-model="ques.comments" /> |
|
|
|
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> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -153,12 +154,13 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-popover> |
|
|
|
</el-popover> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="line"> |
|
|
|
<div v-if="ques.comments" class="line"> |
|
|
|
评语: |
|
|
|
评语: |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<span>2024-12-12</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> |
|
|
|
<div class="comment">xxx</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="comment" v-html="ques.comments"></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -207,7 +209,7 @@ export default { |
|
|
|
return { |
|
|
|
return { |
|
|
|
numToLetter: Util.numToLetter, |
|
|
|
numToLetter: Util.numToLetter, |
|
|
|
arabicToChinese: Util.arabicToChinese, |
|
|
|
arabicToChinese: Util.arabicToChinese, |
|
|
|
reportId: '', |
|
|
|
reportId: this.$route.query.id, |
|
|
|
competitionId: this.$route.query.c, |
|
|
|
competitionId: this.$route.query.c, |
|
|
|
stageId: this.$route.query.s, |
|
|
|
stageId: this.$route.query.s, |
|
|
|
showUserInfo: +this.$route.query.u, // 是否展示学生信息 |
|
|
|
showUserInfo: +this.$route.query.u, // 是否展示学生信息 |
|
|
@ -253,28 +255,19 @@ export default { |
|
|
|
], |
|
|
|
], |
|
|
|
info: {}, |
|
|
|
info: {}, |
|
|
|
paper: [], |
|
|
|
paper: [], |
|
|
|
records: [], |
|
|
|
showNext: true, |
|
|
|
|
|
|
|
showPrev: true, |
|
|
|
page: 1, |
|
|
|
page: 1, |
|
|
|
recordTotal: 0, |
|
|
|
recordTotal: 0, |
|
|
|
previewImgVisible: false, |
|
|
|
previewImgVisible: false, |
|
|
|
previewImg: '', |
|
|
|
previewImg: '', |
|
|
|
pdfVisible: false, |
|
|
|
pdfVisible: false, |
|
|
|
pdfSrc: '', |
|
|
|
pdfSrc: '', |
|
|
|
exporting: false, |
|
|
|
submiting: false, |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
|
|
|
|
$route: { |
|
|
|
|
|
|
|
handler () { |
|
|
|
|
|
|
|
this.curIndex = +this.$route.query.i |
|
|
|
|
|
|
|
this.reportId = this.$route.query.id |
|
|
|
|
|
|
|
this.getData() |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
immediate: true |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
mounted () { |
|
|
|
mounted () { |
|
|
|
this.getRecords() |
|
|
|
this.getData() |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
async getData () { |
|
|
|
async getData () { |
|
|
@ -300,7 +293,6 @@ export default { |
|
|
|
n.difficultTheme = curDiff.theme |
|
|
|
n.difficultTheme = curDiff.theme |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!n.comments) n.comments = '' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const opts = n.questionAnswerVersionsList |
|
|
|
const opts = n.questionAnswerVersionsList |
|
|
|
if (type !== 'fill_blank' && type !== 'essay') { // 选择题 |
|
|
|
if (type !== 'fill_blank' && type !== 'essay') { // 选择题 |
|
|
@ -353,8 +345,11 @@ export default { |
|
|
|
n.isCorrect = n.userScore && n.questionScore === n.userScore ? 1 : (rightLen ? 3 : 2) |
|
|
|
n.isCorrect = n.userScore && n.questionScore === n.userScore ? 1 : (rightLen ? 3 : 2) |
|
|
|
} else if (type === 'essay') { // 简答题 |
|
|
|
} else if (type === 'essay') { // 简答题 |
|
|
|
if (!n.userScore) n.userScore = '' |
|
|
|
if (!n.userScore) n.userScore = '' |
|
|
|
|
|
|
|
if (!n.reviewScore) n.reviewScore = '' |
|
|
|
n.isCorrect = 4 // 简答题显示待判分 |
|
|
|
n.isCorrect = 4 // 简答题显示待判分 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
n.originUserScore = n.reviewScore |
|
|
|
|
|
|
|
n.newComments = n.comments || '' |
|
|
|
}) |
|
|
|
}) |
|
|
|
paper.push(e) |
|
|
|
paper.push(e) |
|
|
|
} |
|
|
|
} |
|
|
@ -367,19 +362,6 @@ export default { |
|
|
|
this.loading = false |
|
|
|
this.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 查询批阅记录列表,用以上一页下一页切换 |
|
|
|
|
|
|
|
async getRecords () { |
|
|
|
|
|
|
|
this.page = Math.ceil(this.curIndex / 10) || 1 |
|
|
|
|
|
|
|
const { page } = await this.$post(this.api.myReviewTaskByReviewList, { |
|
|
|
|
|
|
|
pageNum: this.page, |
|
|
|
|
|
|
|
pageSize: 10, |
|
|
|
|
|
|
|
competitionId: this.competitionId, |
|
|
|
|
|
|
|
stageId: this.stageId, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
const list = page.records |
|
|
|
|
|
|
|
this.records = list |
|
|
|
|
|
|
|
this.recordTotal = page.total |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
scrollToSmooth (position, duration) { |
|
|
|
scrollToSmooth (position, duration) { |
|
|
|
let startTime = Date.now() |
|
|
|
let startTime = Date.now() |
|
|
|
|
|
|
|
|
|
|
@ -431,69 +413,77 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 保存分数 |
|
|
|
// 保存分数 |
|
|
|
async saveScore (ques) { |
|
|
|
async saveScore (ques) { |
|
|
|
|
|
|
|
if (ques.reviewScore === '') return Util.warningMsg('请输入考生得分!') |
|
|
|
|
|
|
|
if (ques.questionScore < ques.reviewScore) return Util.warningMsg('考生得分不得大于题目分值!') |
|
|
|
|
|
|
|
|
|
|
|
await this.$post(this.api.reviewPaper, [{ |
|
|
|
await this.$post(this.api.reviewPaper, [{ |
|
|
|
assignmentDetailId: ques.assignmentDetailId, |
|
|
|
assignmentDetailId: ques.assignmentDetailId, |
|
|
|
score: ques.userScore, |
|
|
|
reviewScore: ques.reviewScore, |
|
|
|
}]) |
|
|
|
}]) |
|
|
|
|
|
|
|
ques.originUserScore = ques.reviewScore |
|
|
|
Util.successMsg('保存成功') |
|
|
|
Util.successMsg('保存成功') |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 保存评语 |
|
|
|
// 保存评语 |
|
|
|
async saveComment (ques) { |
|
|
|
async saveComment (ques) { |
|
|
|
await this.$post(this.api.setComments, { |
|
|
|
const res = await this.$post(this.api.setComments, { |
|
|
|
assignmentDetailId: ques.assignmentDetailId, |
|
|
|
assignmentDetailId: ques.assignmentDetailId, |
|
|
|
comments: ques.comments, |
|
|
|
comments: ques.newComments, |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
this.$set(ques, 'commentSetTime', res.commentSetTime) |
|
|
|
|
|
|
|
this.$set(ques, 'comments', ques.newComments) |
|
|
|
Util.successMsg('保存成功') |
|
|
|
Util.successMsg('保存成功') |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 删除评语 |
|
|
|
// 删除评语 |
|
|
|
async delComment (ques) { |
|
|
|
async delComment (ques) { |
|
|
|
await this.$post(this.api.reviewPaper, { |
|
|
|
await this.$confirm(`确定要删除该评语吗?`, '提示', { |
|
|
|
assignmentDetailId: ques.assignmentDetailId, |
|
|
|
confirmButtonText: '确定', |
|
|
|
score: ques.userScore, |
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
|
|
type: 'warning', |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
await this.$post(`${this.api.deleteComments}?assignmentDetailId=${ques.assignmentDetailId}`) |
|
|
|
|
|
|
|
ques.comments = '' |
|
|
|
Util.successMsg('删除成功') |
|
|
|
Util.successMsg('删除成功') |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 上一个 |
|
|
|
// 上一个 |
|
|
|
async prev () { |
|
|
|
async prev () { |
|
|
|
this.exporting = true |
|
|
|
|
|
|
|
const res = await axios.get(`${this.api.exportExamPaperReport}?reportId=${this.reportId}`, { |
|
|
|
|
|
|
|
headers: { |
|
|
|
|
|
|
|
token: this.token |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
responseType: 'blob' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
const name = res.headers['content-disposition'] |
|
|
|
|
|
|
|
Util.downloadFileDirect(name ? decodeURI(name) : '标准成绩报告.docx', new Blob([res.data])) |
|
|
|
|
|
|
|
this.exporting = false |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
// 下一个 |
|
|
|
// 下一个 |
|
|
|
async next () { |
|
|
|
async switchRecord (isNext) { |
|
|
|
const i = this.curIndex + 1 |
|
|
|
const res = await this.$post(this.api.getTheLabReportIdUpAndDown, { |
|
|
|
const newPage = Math.ceil(i / 10) || 1 |
|
|
|
competitionId: this.competitionId, |
|
|
|
// debugger |
|
|
|
stageId: this.stageId, |
|
|
|
if (newPage > this.page) { |
|
|
|
currentReportId: this.reportId |
|
|
|
await this.getRecords() |
|
|
|
}) |
|
|
|
} |
|
|
|
const id = res[isNext ? 'nextReportId' : 'previousReportId'] |
|
|
|
if (this.records[i % 10 - 1]) { |
|
|
|
this[isNext ? 'showNext' : 'showPrev'] = !!id |
|
|
|
let reportId = this.records[i % 10 - 1].reportId |
|
|
|
if (id) { |
|
|
|
this.$router.push(`/theoryReview?id=${reportId}&u=${this.showUserInfo}&c=${this.competitionId}&s=${this.stageId}&i=${i}`) |
|
|
|
this.reportId = id |
|
|
|
|
|
|
|
this.$router.push(`/theoryReview?id=${id}&u=${this.showUserInfo}&c=${this.competitionId}&s=${this.stageId}`) |
|
|
|
|
|
|
|
this.getData() |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 一键保存分数 |
|
|
|
// 一键保存分数 |
|
|
|
async saveAll () { |
|
|
|
async saveAll () { |
|
|
|
|
|
|
|
if (this.submiting) return false |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
this.submiting = true |
|
|
|
const { paper } = this |
|
|
|
const { paper } = this |
|
|
|
const params = [] |
|
|
|
const params = [] |
|
|
|
paper.forEach(e => { |
|
|
|
paper.forEach(e => { |
|
|
|
e.userAnswerList.forEach(n => { |
|
|
|
e.userAnswerList.forEach(n => { |
|
|
|
n.userScore !== '' && params.push({ |
|
|
|
n.reviewScore !== '' && params.push({ |
|
|
|
assignmentDetailId: n.assignmentDetailId, |
|
|
|
assignmentDetailId: n.assignmentDetailId, |
|
|
|
score: n.userScore, |
|
|
|
reviewScore: n.reviewScore, |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
await this.$post(this.api.reviewPaper, params) |
|
|
|
await this.$post(this.api.reviewPaper, params) |
|
|
|
Util.successMsg('保存成功') |
|
|
|
Util.successMsg('保存成功') |
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
this.submiting = false |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
close () { |
|
|
|
close () { |
|
|
|
window.close() |
|
|
|
window.close() |
|
|
|