From 355f39174d693c48ac049e40b5794c8eccd43338 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 17 Oct 2024 16:02:03 +0800 Subject: [PATCH] fix --- public/static/ueditorPlus/ueditor.config.js | 1 + src/pages/myReview/theoryReview/index.vue | 79 +++++++++++++++------ 2 files changed, 57 insertions(+), 23 deletions(-) diff --git a/public/static/ueditorPlus/ueditor.config.js b/public/static/ueditorPlus/ueditor.config.js index a30885f..d67ea6a 100644 --- a/public/static/ueditorPlus/ueditor.config.js +++ b/public/static/ueditorPlus/ueditor.config.js @@ -60,6 +60,7 @@ ".gif", ".bmp" ], + autoFloatEnabled: false, // fontfamily: [], //工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的重新定义 diff --git a/src/pages/myReview/theoryReview/index.vue b/src/pages/myReview/theoryReview/index.vue index 6a4e404..e5e20b7 100644 --- a/src/pages/myReview/theoryReview/index.vue +++ b/src/pages/myReview/theoryReview/index.vue @@ -104,23 +104,29 @@
暂无解析
-
+
-
题目分值:{{ ques.questionScore }}分
+
题目分值:{{ ques.notScored ? '不计分' : ques.questionScore + '分' }}
- 考生得分: - - (如需修改填空题的得分请直接修改考生答案的对错) - - 保存分数 + 考生得分: + @@ -260,6 +270,10 @@ export default { id: 4, name: '待判分' }, + { + id: 5, + name: '不计分' + }, ], info: {}, paper: [], @@ -304,10 +318,11 @@ export default { } } + n.notScored = n.questionScore === 0 // 不计分(题目分值=0,则为不计分) const opts = n.questionAnswerVersionsList if (type !== 'fill_blank' && type !== 'essay') { // 选择题 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 @@ -352,13 +367,13 @@ export default { // 填空题需要区分部分正确还是正确、错误 let rightLen = 0 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') { // 简答题 if (!n.userScore) n.userScore = '' if (isNaN(n.reviewScore)) n.reviewScore = '' this.handleIsCorrect(n) } - n.originUserScore = n.reviewScore + n.originUserScore = n.notScored ? '-' : n.reviewScore n.newComments = n.comments || '' }) paper.push(e) @@ -379,7 +394,7 @@ export default { }, // 判断试题的对错 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) { let startTime = Date.now() @@ -661,7 +676,7 @@ export default { height: 100%; .left { - width: 290px; + width: 320px; padding: 0 10px; background-color: #fff; @@ -770,6 +785,12 @@ export default { border-color: #fe9f0a; } + .status5 .serial { + color: #fff; + background-color: #d1d1d1; + border-color: #d1d1d1; + } + .score { height: 22px; padding: 0 2px; @@ -782,7 +803,7 @@ export default { .status-filter { display: flex; justify-content: space-between; - padding: 10px; + padding: 10px 0; border-top: 1px solid #e5e5e5; li { @@ -793,6 +814,7 @@ export default { color: #333; cursor: pointer; border: 1px solid transparent; + white-space: nowrap; &:before { content: ''; @@ -835,7 +857,7 @@ export default { } } - &:last-child { + &:nth-child(4) { &.active { color: #fe9f0a; border-color: #fe9f0a; @@ -846,6 +868,17 @@ export default { } } + &:last-child { + &.active { + color: #d1d1d1; + border-color: #d1d1d1; + } + + &:before { + background-color: #d1d1d1; + } + } + &.active { font-weight: 600; } @@ -854,7 +887,7 @@ export default { } .middle { - width: calc(100% - 520px); + width: calc(100% - 550px); height: calc(100vh - 54px); padding: 10px; margin: 0 15px;