yujialong 1 month ago
parent 0ebd2b0f89
commit 355f39174d
  1. 1
      public/static/ueditorPlus/ueditor.config.js
  2. 59
      src/pages/myReview/theoryReview/index.vue

@ -60,6 +60,7 @@
".gif", ".gif",
".bmp" ".bmp"
], ],
autoFloatEnabled: false,
// fontfamily: [], // fontfamily: [],
//工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的重新定义 //工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的重新定义

@ -104,23 +104,29 @@
<div v-else>暂无解析</div> <div v-else>暂无解析</div>
</div> </div>
<div :class="['ques-info', { essay: item.questionType === 'essay' && ques.reviewScore === '' }]"> <div
:class="['ques-info', { essay: item.questionType === 'essay' && ques.reviewScore === '' && !ques.notScored }]">
<template v-if="item.questionType === 'essay'"> <template v-if="item.questionType === 'essay'">
<div class="line"> <div class="line">
<span class="line-label">参考答案</span> <span class="line-label">参考答案</span>
<div v-html="ques.questionAnswerVersionsList[0].referenceAnswer" class="html-parse"></div> <div v-if="ques.questionAnswerVersionsList[0].referenceAnswer"
v-html="ques.questionAnswerVersionsList[0].referenceAnswer" class="html-parse"></div>
<span v-else>暂无参考答案</span>
</div> </div>
<div class="line"> <div class="line">
<span class="line-label">考生答案</span> <span class="line-label">考生答案</span>
<div v-if="ques.answerContent" v-html="ques.answerContent" class="html-parse"></div> <div v-if="ques.answerContent" v-html="ques.answerContent" class="html-parse"></div>
<div v-else>未作答</div> <div v-else>未作答</div>
</div> </div>
<div v-if="ques.attachmentUrl" class="line"> <div v-if="ques.allowAttachment" class="line">
<span class="line-label">考生上传附件</span> <span class="line-label">考生上传附件</span>
<template v-if="ques.attachmentUrl">
<el-link class="m-r-10" type="primary" @click="preview(ques.attachmentUrl)">{{ <el-link class="m-r-10" type="primary" @click="preview(ques.attachmentUrl)">{{
ques.attachmentName }}</el-link> ques.attachmentName }}</el-link>
<el-button type="primary" size="mini" round <el-button type="primary" size="mini" round
@click="download(ques.attachmentName, ques.attachmentUrl)">下载</el-button> @click="download(ques.attachmentName, ques.attachmentUrl)">下载</el-button>
</template>
<span v-else>未上传</span>
</div> </div>
</template> </template>
<template v-else> <template v-else>
@ -135,18 +141,22 @@
class="icon" @click="fillAnswerSwitch(ans, j, ques)"> class="icon" @click="fillAnswerSwitch(ans, j, ques)">
</p> </p>
</div> </div>
<span v-else>未作答</span>
</div> </div>
</template> </template>
<div class="line">题目分值{{ ques.questionScore }}</div> <div class="line">题目分值{{ ques.notScored ? '不计分' : ques.questionScore + '分' }}</div>
<div class="line"> <div class="line">
考生得分<el-input class="score-input hide-spin" type="number" placeholder="请输入分数" size="small" 考生得分<template v-if="ques.notScored">不计分</template>
<template v-else>
<el-input class="score-input hide-spin" type="number" placeholder="请输入分数" size="small"
:disabled="item.questionType === 'fill_blank' || readonly" v-model.number="ques.reviewScore" /> :disabled="item.questionType === 'fill_blank' || readonly" v-model.number="ques.reviewScore" />
<span class="m-r-10"></span> <span class="m-r-10"></span>
<span v-if="item.questionType === 'fill_blank'">(如需修改填空题的得分请直接修改考生答案的对错)</span> <span v-if="item.questionType === 'fill_blank'">(如需修改填空题的得分请直接修改考生答案的对错)</span>
<el-button v-if="ques.originUserScore !== ques.reviewScore && !readonly" class="m-l-10" <el-button v-if="ques.originUserScore !== ques.reviewScore && !readonly" class="m-l-10"
type="primary" size="mini" @click="saveScore(ques)">保存分数</el-button> type="primary" size="mini" @click="saveScore(ques)">保存分数</el-button>
</template>
<el-popover v-if="!readonly" class="m-l-20" placement="bottom" width="400" trigger="click"> <el-popover v-if="!readonly" class="m-l-20" placement="bottom" width="400" trigger="click">
<el-input type="textarea" :rows="3" :autosize="{ minRows: 3 }" resize="none" placeholder="请输入" <el-input type="textarea" :rows="3" :autosize="{ minRows: 3 }" resize="none" placeholder="请输入"
v-model="ques.newComments" /> v-model="ques.newComments" />
@ -260,6 +270,10 @@ export default {
id: 4, id: 4,
name: '待判分' name: '待判分'
}, },
{
id: 5,
name: '不计分'
},
], ],
info: {}, info: {},
paper: [], paper: [],
@ -304,10 +318,11 @@ export default {
} }
} }
n.notScored = n.questionScore === 0 // =0
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 if (!n.userScore) n.userScore = 0
n.isCorrect = n.userScore && n.userScore === n.questionScore ? 1 : 2 n.isCorrect = n.notScored ? 5 : (n.userScore && n.userScore === n.questionScore ? 1 : 2)
// //
let { userAnswer } = n let { userAnswer } = n
@ -352,13 +367,13 @@ export default {
// //
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 //
n.isCorrect = n.userScore && n.questionScore === n.userScore ? 1 : (rightLen ? 3 : 2) n.isCorrect = n.notScored ? 5 : (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 (isNaN(n.reviewScore)) n.reviewScore = '' if (isNaN(n.reviewScore)) n.reviewScore = ''
this.handleIsCorrect(n) this.handleIsCorrect(n)
} }
n.originUserScore = n.reviewScore n.originUserScore = n.notScored ? '-' : n.reviewScore
n.newComments = n.comments || '' n.newComments = n.comments || ''
}) })
paper.push(e) paper.push(e)
@ -379,7 +394,7 @@ export default {
}, },
// //
handleIsCorrect (n) { handleIsCorrect (n) {
n.isCorrect = n.reviewScore === '' ? 4 : (n.reviewScore === n.questionScore ? 1 : n.reviewScore ? 3 : 2) // reviewScore 0 n.isCorrect = n.notScored ? 5 : (n.reviewScore === '' ? 4 : (n.reviewScore === n.questionScore ? 1 : n.reviewScore ? 3 : 2)) // reviewScore 0
}, },
scrollToSmooth (position, duration) { scrollToSmooth (position, duration) {
let startTime = Date.now() let startTime = Date.now()
@ -661,7 +676,7 @@ export default {
height: 100%; height: 100%;
.left { .left {
width: 290px; width: 320px;
padding: 0 10px; padding: 0 10px;
background-color: #fff; background-color: #fff;
@ -770,6 +785,12 @@ export default {
border-color: #fe9f0a; border-color: #fe9f0a;
} }
.status5 .serial {
color: #fff;
background-color: #d1d1d1;
border-color: #d1d1d1;
}
.score { .score {
height: 22px; height: 22px;
padding: 0 2px; padding: 0 2px;
@ -782,7 +803,7 @@ export default {
.status-filter { .status-filter {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 10px; padding: 10px 0;
border-top: 1px solid #e5e5e5; border-top: 1px solid #e5e5e5;
li { li {
@ -793,6 +814,7 @@ export default {
color: #333; color: #333;
cursor: pointer; cursor: pointer;
border: 1px solid transparent; border: 1px solid transparent;
white-space: nowrap;
&:before { &:before {
content: ''; content: '';
@ -835,7 +857,7 @@ export default {
} }
} }
&:last-child { &:nth-child(4) {
&.active { &.active {
color: #fe9f0a; color: #fe9f0a;
border-color: #fe9f0a; border-color: #fe9f0a;
@ -846,6 +868,17 @@ export default {
} }
} }
&:last-child {
&.active {
color: #d1d1d1;
border-color: #d1d1d1;
}
&:before {
background-color: #d1d1d1;
}
}
&.active { &.active {
font-weight: 600; font-weight: 600;
} }
@ -854,7 +887,7 @@ export default {
} }
.middle { .middle {
width: calc(100% - 520px); width: calc(100% - 550px);
height: calc(100vh - 54px); height: calc(100vh - 54px);
padding: 10px; padding: 10px;
margin: 0 15px; margin: 0 15px;

Loading…
Cancel
Save