diff --git a/src/App.vue b/src/App.vue
index 636b06c..3b0aa83 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -27,9 +27,9 @@ hljs.registerLanguage("go", go)
:date-locale="dateZhCN"
:hljs="hljs"
>
-
+
-
+
diff --git a/src/components.d.ts b/src/components.d.ts
index d49b76c..0fbb508 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -32,6 +32,7 @@ declare module '@vue/runtime-core' {
NLayoutContent: typeof import('naive-ui')['NLayoutContent']
NLayoutHeader: typeof import('naive-ui')['NLayoutHeader']
NMenu: typeof import('naive-ui')['NMenu']
+ NMessageProvider: typeof import('naive-ui')['NMessageProvider']
NModal: typeof import('naive-ui')['NModal']
NNotificationProvider: typeof import('naive-ui')['NNotificationProvider']
NPagination: typeof import('naive-ui')['NPagination']
diff --git a/src/oj/api.ts b/src/oj/api.ts
index 69f3602..c459318 100644
--- a/src/oj/api.ts
+++ b/src/oj/api.ts
@@ -117,6 +117,9 @@ export function checkContestPassword(contestID: string, password: string) {
})
}
-export function getContestProblem(contestID: string) {
- return http.get("contest/problem", { params: { contest_id: contestID } })
+export async function getContestProblem(contestID: string) {
+ const res = await http.get("contest/problem", {
+ params: { contest_id: contestID },
+ })
+ return res.data.map(filterResult)
}
diff --git a/src/oj/contest/detail.vue b/src/oj/contest/detail.vue
index f642c83..0072462 100644
--- a/src/oj/contest/detail.vue
+++ b/src/oj/contest/detail.vue
@@ -1,7 +1,7 @@
@@ -104,27 +102,42 @@ function rowProps(row: Problem) {
-
+
确认
-
+
- 比赛题目
- 提交信息
- 比赛排名
- 管理员助手
+
+ 比赛题目
+
+
+ 提交信息
+
+
+ 比赛排名
+
+
+ 管理员助手
+
-
+
+
-
diff --git a/src/oj/contest/list.vue b/src/oj/contest/list.vue
index 35f37aa..e8b869a 100644
--- a/src/oj/contest/list.vue
+++ b/src/oj/contest/list.vue
@@ -30,6 +30,17 @@ const options: SelectOption[] = [
]
const columns: DataTableColumn[] = [
+ {
+ title: "状态",
+ key: "status",
+ width: 100,
+ render: (row) =>
+ h(
+ NTag,
+ { type: CONTEST_STATUS[row.status]["type"] },
+ () => CONTEST_STATUS[row.status]["name"]
+ ),
+ },
{
title: "比赛",
key: "title",
@@ -48,17 +59,6 @@ const columns: DataTableColumn[] = [
width: 180,
render: (row) => duration(row.start_time, row.end_time),
},
- {
- title: "状态",
- key: "status",
- width: 100,
- render: (row) =>
- h(
- NTag,
- { type: CONTEST_STATUS[row.status]["type"] },
- () => CONTEST_STATUS[row.status]["name"]
- ),
- },
]
async function listContests() {
@@ -129,7 +129,7 @@ function rowProps(row: Contest) {
diff --git a/src/oj/contest/pages/helper.vue b/src/oj/contest/pages/helper.vue
new file mode 100644
index 0000000..b0b0c66
--- /dev/null
+++ b/src/oj/contest/pages/helper.vue
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/src/oj/contest/pages/problems.vue b/src/oj/contest/pages/problems.vue
new file mode 100644
index 0000000..ecc6192
--- /dev/null
+++ b/src/oj/contest/pages/problems.vue
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
diff --git a/src/oj/contest/pages/rank.vue b/src/oj/contest/pages/rank.vue
new file mode 100644
index 0000000..b0b0c66
--- /dev/null
+++ b/src/oj/contest/pages/rank.vue
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/src/oj/contest/pages/submissions.vue b/src/oj/contest/pages/submissions.vue
new file mode 100644
index 0000000..b0b0c66
--- /dev/null
+++ b/src/oj/contest/pages/submissions.vue
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/src/oj/problem/components/ProblemInfo.vue b/src/oj/problem/components/ProblemInfo.vue
index fddf8ee..ffadbb4 100644
--- a/src/oj/problem/components/ProblemInfo.vue
+++ b/src/oj/problem/components/ProblemInfo.vue
@@ -14,11 +14,10 @@ const data = computed(() => {
const status = props.problem.statistic_info
const labels = []
for (let i in status) {
- if (status[i] === 0) {
- delete status[i]
+ if (status[i] !== 0) {
+ // @ts-ignore
+ labels.push(JUDGE_STATUS[i]["name"])
}
- // @ts-ignore
- labels.push(JUDGE_STATUS[i]["name"])
}
return {
labels,
diff --git a/src/oj/problem/components/ProblemStatus.vue b/src/oj/problem/components/ProblemStatus.vue
new file mode 100644
index 0000000..8fabf0a
--- /dev/null
+++ b/src/oj/problem/components/ProblemStatus.vue
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/oj/problem/list.vue b/src/oj/problem/list.vue
index cd710f8..ba29a8a 100644
--- a/src/oj/problem/list.vue
+++ b/src/oj/problem/list.vue
@@ -1,12 +1,13 @@