|
@@ -412,6 +412,24 @@ function submitListener(e: KeyboardEvent) {
|
|
submit();
|
|
submit();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+function aiAbnormalHandle() {
|
|
|
|
+ if (!props.isCheckAnswer || !markStore.currentTask) return;
|
|
|
|
+
|
|
|
|
+ let firstAbnormalQuestion: Question | null = null;
|
|
|
|
+ markStore.currentTask.questionList.forEach((question) => {
|
|
|
|
+ if (question.problem || isArbitrated(question) || !question.selfMark)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ if (question.markerScore === -1) {
|
|
|
|
+ clearAllMarksOfCurrentQuetion(question);
|
|
|
|
+ if (!firstAbnormalQuestion) firstAbnormalQuestion = question;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ if (firstAbnormalQuestion) chooseQuestion(firstAbnormalQuestion);
|
|
|
|
+}
|
|
|
|
+
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
document.addEventListener("keydown", numberKeyListener);
|
|
document.addEventListener("keydown", numberKeyListener);
|
|
document.addEventListener("keydown", submitListener);
|
|
document.addEventListener("keydown", submitListener);
|
|
@@ -421,6 +439,13 @@ onUnmounted(() => {
|
|
document.removeEventListener("keydown", submitListener);
|
|
document.removeEventListener("keydown", submitListener);
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+watch(
|
|
|
|
+ () => markStore.currentTask,
|
|
|
|
+ () => {
|
|
|
|
+ aiAbnormalHandle();
|
|
|
|
+ }
|
|
|
|
+);
|
|
|
|
+
|
|
watch(
|
|
watch(
|
|
() => markStore.isScoreBoardCollapsed,
|
|
() => markStore.isScoreBoardCollapsed,
|
|
() => {
|
|
() => {
|
|
@@ -464,27 +489,28 @@ function clearLatestMarkOfCurrentQuetion() {
|
|
.reduce((acc, v) => (acc += Math.round(v * 1000)), 0) / 1000;
|
|
.reduce((acc, v) => (acc += Math.round(v * 1000)), 0) / 1000;
|
|
}
|
|
}
|
|
|
|
|
|
-function clearAllMarksOfCurrentQuetion() {
|
|
|
|
|
|
+function clearAllMarksOfCurrentQuetion(cQuestion: Question | undefined) {
|
|
|
|
+ const currentQuestion = cQuestion || markStore.currentQuestion;
|
|
// 只要清除分数,就当做修改了
|
|
// 只要清除分数,就当做修改了
|
|
hasModifyScore.value = true;
|
|
hasModifyScore.value = true;
|
|
|
|
|
|
- if (!markStore.currentTask?.markResult || !markStore.currentQuestion) return;
|
|
|
|
|
|
+ if (!markStore.currentTask?.markResult || !currentQuestion) return;
|
|
|
|
|
|
- const qno = `${markStore.currentQuestion.mainNumber}_${markStore.currentQuestion.subNumber}`;
|
|
|
|
|
|
+ const qno = `${currentQuestion.mainNumber}_${currentQuestion.subNumber}`;
|
|
markStore.currentTaskModifyQuestion[qno] = true;
|
|
markStore.currentTaskModifyQuestion[qno] = true;
|
|
|
|
|
|
const markResult = markStore.currentTask.markResult;
|
|
const markResult = markStore.currentTask.markResult;
|
|
markStore.removeScoreTracks = markResult.markerTrackList.filter(
|
|
markStore.removeScoreTracks = markResult.markerTrackList.filter(
|
|
(q) =>
|
|
(q) =>
|
|
- q.mainNumber === markStore.currentQuestion?.mainNumber &&
|
|
|
|
- q.subNumber === markStore.currentQuestion?.subNumber
|
|
|
|
|
|
+ q.mainNumber === currentQuestion?.mainNumber &&
|
|
|
|
+ q.subNumber === currentQuestion?.subNumber
|
|
);
|
|
);
|
|
markResult.markerTrackList = markResult.markerTrackList.filter(
|
|
markResult.markerTrackList = markResult.markerTrackList.filter(
|
|
(q) =>
|
|
(q) =>
|
|
- q.mainNumber !== markStore.currentQuestion?.mainNumber ||
|
|
|
|
- q.subNumber !== markStore.currentQuestion?.subNumber
|
|
|
|
|
|
+ q.mainNumber !== currentQuestion?.mainNumber ||
|
|
|
|
+ q.subNumber !== currentQuestion?.subNumber
|
|
);
|
|
);
|
|
- const { __index } = markStore.currentQuestion;
|
|
|
|
|
|
+ const { __index } = currentQuestion;
|
|
markResult.scoreList[__index] = null;
|
|
markResult.scoreList[__index] = null;
|
|
}
|
|
}
|
|
|
|
|