add problem author

This commit is contained in:
2024-12-23 20:26:46 +08:00
parent 2d23e5ceb7
commit 06f9ca7194
6 changed files with 82 additions and 70 deletions

View File

@@ -233,12 +233,14 @@ declare global {
const usePreferredDark: typeof import('@vueuse/core')['usePreferredDark']
const usePreferredLanguages: typeof import('@vueuse/core')['usePreferredLanguages']
const usePreferredReducedMotion: typeof import('@vueuse/core')['usePreferredReducedMotion']
const usePreferredReducedTransparency: typeof import('@vueuse/core')['usePreferredReducedTransparency']
const usePrevious: typeof import('@vueuse/core')['usePrevious']
const useRafFn: typeof import('@vueuse/core')['useRafFn']
const useRefHistory: typeof import('@vueuse/core')['useRefHistory']
const useResizeObserver: typeof import('@vueuse/core')['useResizeObserver']
const useRoute: typeof import('vue-router')['useRoute']
const useRouter: typeof import('vue-router')['useRouter']
const useSSRWidth: typeof import('@vueuse/core')['useSSRWidth']
const useScreenOrientation: typeof import('@vueuse/core')['useScreenOrientation']
const useScreenSafeArea: typeof import('@vueuse/core')['useScreenSafeArea']
const useScriptTag: typeof import('@vueuse/core')['useScriptTag']

View File

@@ -18,6 +18,7 @@ function filterResult(result: Problem) {
submission: result.submission_number,
rate: getACRate(result.accepted_number, result.submission_number),
status: "",
author: result.created_by.username,
}
if (result.my_status === null || result.my_status === undefined) {
newResult.status = "not_test"

View File

@@ -181,6 +181,14 @@ const baseColumns: DataTableColumn<ProblemFiltered>[] = [
render: (row) =>
h(NSpace, () => row.tags.map((t) => h(NTag, { key: t }, () => t))),
},
{
title: renderTableTitle(
"出题者",
"streamline-emojis:smiling-face-with-sunglasses",
),
key: "author",
width: 130,
},
{
title: renderTableTitle("提交数", "streamline-emojis:clinking-beer-mugs"),
key: "submission",

View File

@@ -159,6 +159,7 @@ export interface ProblemFiltered {
submission: number
rate: string
status: "not_test" | "passed" | "failed"
author: string
}
export interface AdminProblemFiltered {