72% 的提交一次就通过,每次通过之后学生都要回首页或再问一遍题号去找下一道。 - 结果面板在通过时显示 LessonNext:取 /me/class-activity(老师布置的优先,否则推断), 给出排在当前题后面、还没通过的第一道,后面都做完了再从头找;全做完了显示「都做完了」 并指向题单。当前题不在列表里、比赛、题单入口都不显示 - 评价弹窗关掉后重新打开结果面板:点弹窗时面板会被当成点了外面收起来,「下一题」就在面板里 - 换题(同一组件只换路由参数,有了题号直达和下一题之后成了常规操作)时收掉上一道题的 结果面板、语法错误、还在跟的提交(新增 useSubmissionMonitor.reset),并取消通过后 那两个 1.5 秒的定时器——否则会给还没做的新题弹评价,上一道判完时还会把新题标成已解决 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a6bf845e06
commit
a63bf6ea07
4 files changed
+141
-3
No files matched your search
@@ -17,6 +17,7 @@ import { useProblemStore } from "oj/store/problem"
|
||||
import PythonErrorExplain from "./PythonErrorExplain.vue"
|
||||
import RuntimeErrorExplain from "./RuntimeErrorExplain.vue"
|
||||
import WrongAnswerExplain from "./WrongAnswerExplain.vue"
|
||||
import LessonNext from "./LessonNext.vue"
|
||||
import { useAIStream } from "shared/composables/aiStream"
|
||||
import { submitHintFeedback } from "oj/api"
|
||||
import { MdPreview } from "md-editor-v3"
|
||||
@@ -121,6 +122,18 @@ const sampleCheck = computed(() => {
|
||||
return submission.statisticInfo?.sample_check ?? null
|
||||
})
|
||||
|
||||
/**
|
||||
* 通过之后给「这节课的下一题」。比赛有自己的题目列表;从题单入口进来的,通过后
|
||||
* 1.5 秒会自动跳回题单(SubmitCode 的 goToProblemSetDelayed),这两种都不给
|
||||
*/
|
||||
const route = useRoute()
|
||||
const showLessonNext = computed(
|
||||
() =>
|
||||
props.submission?.result === SubmissionStatus.accepted &&
|
||||
problemStore.problem?.contestId == null &&
|
||||
!route.params.problemSetId,
|
||||
)
|
||||
|
||||
const msg = computed(() => {
|
||||
if (!props.submission) return ""
|
||||
// 走 PythonErrorExplain / RuntimeErrorExplain 那两张中文卡片
|
||||
@@ -288,6 +301,12 @@ const columns: DataTableColumn<JudgeCaseResult>[] = [
|
||||
/>
|
||||
</template>
|
||||
</n-alert>
|
||||
<!-- key 用提交 id:同一道题再交一次、又通过了,要重新拉一遍「还剩几道」 -->
|
||||
<LessonNext
|
||||
v-if="showLessonNext && problemStore.problem"
|
||||
:key="submission.id"
|
||||
:problem-display-id="problemStore.problem._id"
|
||||
/>
|
||||
<n-flex
|
||||
vertical
|
||||
v-if="
|
||||
|
||||
Reference in new issue
Block a user