fix
Some checks failed
Deploy / deploy (build, debian, 22) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822) (push) Has been cancelled

This commit is contained in:
2026-03-18 20:07:00 +08:00
parent 0636ad6f57
commit a7cfa66952

View File

@@ -158,7 +158,7 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
cursor: pointer; cursor: pointer;
background: #fff8f8; background: #fffaf5;
" "
@click="showUnrated = !showUnrated" @click="showUnrated = !showUnrated"
> >
@@ -167,12 +167,12 @@
style=" style="
width: 7px; width: 7px;
height: 7px; height: 7px;
background: #d03050; background: #e07800;
border-radius: 50%; border-radius: 50%;
display: inline-block; display: inline-block;
" "
></span> ></span>
<span style="font-weight: 600; color: #d03050; font-size: 12px" <span style="font-weight: 600; color: #e07800; font-size: 12px"
>未打分{{ stats.unrated_count }}</span >未打分{{ stats.unrated_count }}</span
> >
<span style="font-size: 11px; color: #aaa" <span style="font-size: 11px; color: #aaa"
@@ -191,7 +191,7 @@
v-if="showUnrated" v-if="showUnrated"
style=" style="
padding: 10px 14px; padding: 10px 14px;
background: #fff8f8; background: #fffaf5;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 5px; gap: 5px;
@@ -202,7 +202,7 @@
:key="u.username" :key="u.username"
size="small" size="small"
:bordered="true" :bordered="true"
style="border-color: #ffd0d0; background: #fff" style="border-color: #ffd0a0; background: #fff"
>{{ displayName(u.username, u.classname) }}</n-tag >{{ displayName(u.username, u.classname) }}</n-tag
> >
<span <span
@@ -296,15 +296,15 @@
<div <div
v-for="(sub, i) in stats.top_submissions" v-for="(sub, i) in stats.top_submissions"
:key="sub.submission_id" :key="sub.submission_id"
style=" :style="{
display: flex; display: 'flex',
align-items: center; alignItems: 'center',
gap: 10px; gap: '10px',
padding: 6px 10px; padding: '6px 10px',
background: #f8f8f8; background: rankBg(i),
border-radius: 6px; borderRadius: '6px',
cursor: pointer; cursor: 'pointer',
" }"
@click="viewSubmission(sub.submission_id)" @click="viewSubmission(sub.submission_id)"
> >
<div <div
@@ -406,8 +406,8 @@ const router = useRouter()
const stats = ref<TaskStatsOut | null>(null) const stats = ref<TaskStatsOut | null>(null)
const loading = ref(false) const loading = ref(false)
const selectedClass = ref<string | null>(null) const selectedClass = ref<string | null>(null)
const showUnsubmitted = ref(true) const showUnsubmitted = ref(false)
const showUnrated = ref(true) const showUnrated = ref(false)
async function load(classname?: string) { async function load(classname?: string) {
loading.value = true loading.value = true
@@ -434,7 +434,11 @@ function viewSubmission(id: string) {
} }
function rankColor(i: number) { function rankColor(i: number) {
return (["#f0a020", "#aaa", "#cd7f32", "#ddd", "#ddd"] as const)[i] ?? "#ddd" return (["#f0a020", "#909090", "#cd7f32", "#8899aa", "#7a8fa0"] as const)[i] ?? "#aaa"
}
function rankBg(i: number) {
return (["#fffbef", "#f8f8f8", "#fdf5ee", "#f2f5f8", "#eef2f5"] as const)[i] ?? "#f8f8f8"
} }
function bucketPct(value: number) { function bucketPct(value: number) {
@@ -463,18 +467,11 @@ const countBuckets = computed(() => {
const d = stats.value.submission_count_distribution const d = stats.value.submission_count_distribution
return [ return [
{ {
label: "仅 1 次", label: "4+",
value: d.count_1, value: d.count_4_plus,
color: "#888", color: "#f0a020",
bg: "#fafafa", bg: "#fffbf0",
borderColor: "#e0e0e0", borderColor: "#ffe0a0",
},
{
label: "2 次",
value: d.count_2,
color: "#2080f0",
bg: "#f0f7ff",
borderColor: "#d0e8ff",
}, },
{ {
label: "3 次", label: "3 次",
@@ -484,11 +481,18 @@ const countBuckets = computed(() => {
borderColor: "#c8e8d0", borderColor: "#c8e8d0",
}, },
{ {
label: "4+", label: "2 次",
value: d.count_4_plus, value: d.count_2,
color: "#f0a020", color: "#2080f0",
bg: "#fffbf0", bg: "#f0f7ff",
borderColor: "#ffe0a0", borderColor: "#d0e8ff",
},
{
label: "仅 1 次",
value: d.count_1,
color: "#888",
bg: "#fafafa",
borderColor: "#e0e0e0",
}, },
] ]
}) })