|
@@ -69,7 +69,7 @@
|
|
'board-question',
|
|
'board-question',
|
|
{
|
|
{
|
|
'is-current': isCurrentQuestion(question),
|
|
'is-current': isCurrentQuestion(question),
|
|
- 'is-disabled': !question.selfMark,
|
|
|
|
|
|
+ 'is-disabled': isDisabledQuestion(question),
|
|
},
|
|
},
|
|
]"
|
|
]"
|
|
tabindex="0"
|
|
tabindex="0"
|
|
@@ -104,8 +104,12 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 设置高度 避免动画跳动 -->
|
|
<!-- 设置高度 避免动画跳动 -->
|
|
- <div class="question-score">
|
|
|
|
|
|
+ <div
|
|
|
|
+ :class="['question-score', { 'is-problem': question.problem }]"
|
|
|
|
+ >
|
|
|
|
+ <span v-if="question.problem"> 问题卷 </span>
|
|
<span
|
|
<span
|
|
|
|
+ v-else
|
|
:key="markStore.currentTask?.markResult?.scoreList[index] || 0"
|
|
:key="markStore.currentTask?.markResult?.scoreList[index] || 0"
|
|
>
|
|
>
|
|
<!-- 特殊的空格符号 -->
|
|
<!-- 特殊的空格符号 -->
|
|
@@ -146,19 +150,25 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="board-footer">
|
|
<div class="board-footer">
|
|
- <div>
|
|
|
|
- <qm-button
|
|
|
|
- v-if="!questionScoreDisabled"
|
|
|
|
- class="board-goback"
|
|
|
|
- :clickTimeout="300"
|
|
|
|
- @click="clearLatestMarkOfCurrentQuetion"
|
|
|
|
- >
|
|
|
|
- <template #icon>
|
|
|
|
- <img src="@/assets/icons/icon-goback.svg" />
|
|
|
|
- </template>
|
|
|
|
- 回退
|
|
|
|
- </qm-button>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <qm-button
|
|
|
|
+ v-if="!questionScoreDisabled"
|
|
|
|
+ class="board-goback"
|
|
|
|
+ :clickTimeout="300"
|
|
|
|
+ @click="clearLatestMarkOfCurrentQuetion"
|
|
|
|
+ >
|
|
|
|
+ <template #icon>
|
|
|
|
+ <img src="@/assets/icons/icon-goback.svg" />
|
|
|
|
+ </template>
|
|
|
|
+ 回退
|
|
|
|
+ </qm-button>
|
|
|
|
+
|
|
|
|
+ <qm-button
|
|
|
|
+ v-if="markStore.currentQuestion.problem"
|
|
|
|
+ class="board-clear"
|
|
|
|
+ @click="cancelProblem"
|
|
|
|
+ >
|
|
|
|
+ 取消问题卷
|
|
|
|
+ </qm-button>
|
|
|
|
|
|
<qm-button
|
|
<qm-button
|
|
class="board-clear"
|
|
class="board-clear"
|
|
@@ -256,11 +266,14 @@ EventBus.on("draw-change", (list: any) => {
|
|
// 切换题目是清空上一题的分数
|
|
// 切换题目是清空上一题的分数
|
|
watch(
|
|
watch(
|
|
() => markStore.currentQuestion,
|
|
() => markStore.currentQuestion,
|
|
- () => {
|
|
|
|
|
|
+ (val) => {
|
|
|
|
+ console.log("currentQuestion:", val);
|
|
markStore.currentScore = undefined;
|
|
markStore.currentScore = undefined;
|
|
|
|
+ if (!val) return;
|
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
- if (!props.isCheckAnswer) chooseScore(questionScoreSteps[1]);
|
|
|
|
|
|
+ if (!props.isCheckAnswer && !val.problem)
|
|
|
|
+ chooseScore(questionScoreSteps[1]);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
);
|
|
);
|
|
@@ -330,10 +343,16 @@ function isCurrentQuestion(question: Question) {
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+function isDisabledQuestion(question: Question) {
|
|
|
|
+ return !question.selfMark;
|
|
|
|
+}
|
|
|
|
+
|
|
function isCurrentScore(score: number) {
|
|
function isCurrentScore(score: number) {
|
|
return markStore.currentScore === score;
|
|
return markStore.currentScore === score;
|
|
}
|
|
}
|
|
function chooseScore(score: number) {
|
|
function chooseScore(score: number) {
|
|
|
|
+ if (markStore.currentQuestion.problem) return;
|
|
|
|
+
|
|
if (markStore.currentScore === score) {
|
|
if (markStore.currentScore === score) {
|
|
markStore.currentScore = undefined;
|
|
markStore.currentScore = undefined;
|
|
} else {
|
|
} else {
|
|
@@ -343,6 +362,25 @@ function chooseScore(score: number) {
|
|
markStore.currentSpecialTagType = undefined;
|
|
markStore.currentSpecialTagType = undefined;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+function cancelProblem() {
|
|
|
|
+ if (!markStore.currentQuestion) return;
|
|
|
|
+
|
|
|
|
+ markStore.currentQuestion.problem = false;
|
|
|
|
+ markStore.currentQuestion.problemType = "";
|
|
|
|
+ markStore.currentQuestion.problemRemark = "";
|
|
|
|
+
|
|
|
|
+ console.log("cancelProblem currentQuestion:", markStore.currentQuestion);
|
|
|
|
+
|
|
|
|
+ // const markResult = markStore.currentTask.markResult;
|
|
|
|
+ // markResult.questionList.forEach((item) => {
|
|
|
|
+ // if (item.questionId === markStore.currentQuestion.questionId) {
|
|
|
|
+ // item.problem = false;
|
|
|
|
+ // item.problemType = "";
|
|
|
|
+ // item.problemRemark = "";
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
|
|
+}
|
|
|
|
+
|
|
let keyPressTimestamp = 0;
|
|
let keyPressTimestamp = 0;
|
|
let keys: string[] = [];
|
|
let keys: string[] = [];
|
|
function numberKeyListener(event: KeyboardEvent) {
|
|
function numberKeyListener(event: KeyboardEvent) {
|