- 学生名字一律只显示名字(老号 ks232张三 显示成 张三),顶栏、首页问候、悬停提示、请假名单、比赛成绩表都一样 - 全服 / 年级排名、全部提交、几个班同时举手时,名字后面淡写班级;提交列表的名字列窄,只写班号(陈长 258) - AI 班级分析点名「要多关心的同学」时不再带 ks 前缀 - 建号查重补漏:同班同名也比真名(加过数字的张三2、编号制老号);名字自己带数字(王芳1)也认得出被占; 导入时后端再拦一次同班同名,建号页要等查重结果对上当前名单才能点 - 登录名单换成新接口 /classes/:c/members(名字按界面规则剥,换过班的老号不再露出全名), 旧接口原样留给上线时还开着旧登录页的机房电脑 - 后台手写老格式 ks232张三 新建用户、没选班时按前缀补班级;PUT /me/profile 只带真名时不再 500 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
221d264701
commit
2bda05a978
32 files changed
+229
-111
No files matched your search
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { displayName } from '@oj2/contract'
|
||||
import type { ContestClassView, ContestScoreCell, ContestScoreRow } from '@oj2/contract'
|
||||
import { useThemeVars } from 'naive-ui'
|
||||
import { updateACMHelperChecked } from 'admin/api'
|
||||
@@ -225,12 +226,13 @@ onKeyStroke(['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'], (event) => {
|
||||
|
||||
function exportGrades() {
|
||||
const title = contestStore.contest?.title ?? '比赛'
|
||||
const head = ['用户名', '班级', '做对', '名次', '用时', ...problems.value.map((p) => `第${p._id}题 ${p.title}`)]
|
||||
const head = ['名字', '班级', '做对', '名次', '用时', ...problems.value.map((p) => `第${p._id}题 ${p.title}`)]
|
||||
const lines = [head]
|
||||
const byUsername = [...rows.value].sort((a, b) => a.username.localeCompare(b.username, 'zh-CN'))
|
||||
for (const row of byUsername) {
|
||||
// 按名字的拼音排:老号 ks 开头、新号是中文名,按用户名排两种号会各排各的
|
||||
const byName = [...rows.value].sort((a, b) => displayName(a.username).localeCompare(displayName(b.username), 'zh-CN'))
|
||||
for (const row of byName) {
|
||||
lines.push([
|
||||
row.username,
|
||||
displayName(row.username),
|
||||
row.className ? classLabel(row.className) : '',
|
||||
String(row.solved),
|
||||
String(row.rank ?? ''),
|
||||
@@ -242,7 +244,14 @@ function exportGrades() {
|
||||
])
|
||||
}
|
||||
for (const user of absent.value) {
|
||||
lines.push([user.username, user.className ? classLabel(user.className) : '', user.leave ? '请假' : '没考', '', '', ...problems.value.map(() => '')])
|
||||
lines.push([
|
||||
displayName(user.username),
|
||||
user.className ? classLabel(user.className) : '',
|
||||
user.leave ? '请假' : '没考',
|
||||
'',
|
||||
'',
|
||||
...problems.value.map(() => ''),
|
||||
])
|
||||
}
|
||||
const csv = lines.map((line) => line.map((value) => `"${value.replaceAll('"', '""')}"`).join(',')).join('\r\n')
|
||||
// 带 BOM,Excel 双击打开中文才不乱码
|
||||
@@ -430,7 +439,7 @@ const gradeColumns = computed(() => `24px 124px 40px 36px repeat(${problems.valu
|
||||
no: cellOf(row, p.id) && !cellOf(row, p.id)!.isAc,
|
||||
sel: selected?.userId === row.userId && selected.problemId === p.id,
|
||||
}"
|
||||
:title="`${row.username} · 第 ${p._id} 题`"
|
||||
:title="`${displayName(row.username)} · 第 ${p._id} 题`"
|
||||
@click="pick(row, p.id)"
|
||||
>
|
||||
<template v-if="cellOf(row, p.id)?.isAc">✓</template>
|
||||
|
||||
Reference in new issue
Block a user