From 6bc927402ecc1d7e9fc5f2dbe73d08e4e385055b Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Tue, 29 Sep 2026 23:31:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8F=90=E4=BA=A4=E5=88=97=E8=A1=A8):=20?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=B8=8A=E7=9A=84=E3=80=8C1/1=E3=80=8D?= =?UTF-8?q?=E8=A2=AB=E5=AD=A6=E7=94=9F=E5=BD=93=E6=88=90=E4=BA=A4=E4=BA=86?= =?UTF-8?q?=E5=87=A0=E6=AC=A1=EF=BC=8C=E6=8D=A2=E6=88=90=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=BC=96=E7=A8=8B=E8=AF=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- apps/web/src/oj/submission/list.vue | 32 ++++++++++++----------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/apps/web/src/oj/submission/list.vue b/apps/web/src/oj/submission/list.vue index b141ce6..069bd5d 100644 --- a/apps/web/src/oj/submission/list.vue +++ b/apps/web/src/oj/submission/list.vue @@ -17,7 +17,7 @@ import { useBreakpoints } from "shared/composables/breakpoints" import { usePagination } from "shared/composables/pagination" import { useConfigStore } from "shared/store/config" import { useUserStore } from "shared/store/user" -import { SubmissionStatus } from "utils/constants" +import { LANGUAGE_SHOW_VALUE, SubmissionStatus } from "utils/constants" import { parseTime } from "utils/functions" import type { ClassLesson, @@ -625,10 +625,12 @@ async function retryFlowchart(id: string) { lastPoll = 0 } -function caseText(row: SubmissionListItem) { - const summary = row.caseSummary - if (!summary) return null - return { text: `${summary.passed}/${summary.total}`, full: summary.passed >= summary.total } +/** + * 列表上写语言,不写「通过 1/1」:学生把那个数当成了交了几次。 + * 差几个测试点在右栏状态下面有整句「通过 x/y 个测试点」 + */ +function languageText(row: SubmissionListItem) { + return LANGUAGE_SHOW_VALUE[row.language] ?? row.language } /** 学生看别人的那几行:名字淡一档、带一把锁(自己的看不了是题单那道闸,另说) */ @@ -915,16 +917,7 @@ function dayBreak(index: number) { 题单 - - - {{ caseText(row)!.text }} - - + {{ languageText(row) }} @@ -947,7 +940,7 @@ function dayBreak(index: number) { {{ submissionClockText(row.createTime) }} {{ row.problemDisplayId }} {{ row.problemTitle }}
- {{ caseText(row)!.text }} + {{ languageText(row) }} @@ -1407,12 +1400,13 @@ function dayBreak(index: number) { background: v-bind("tone('info').background"); } -.c-case { - width: 34px; +.c-lang { + width: 48px; flex: none; text-align: right; font-size: 12px; - font-variant-numeric: tabular-nums; + white-space: nowrap; + color: v-bind("theme.textColor3"); } .c-state {