fix(比赛): 后台「审核」按钮从来不显示,老师进不去 ACM 审核页

判的是 `props.contest.rule_type === "ACM"`,而 rule_type 是阶段 0 砍掉
OI 模式时删掉的字段 —— 后端和契约里都不存在,`undefined === "ACM"`
恒为 false。路由、页面、接口都在(实测 acm-helper 返回 200),只有这个
入口按钮被自己判没了。

比赛只有 ACM 模式,条件直接去掉。

这条本来就在 vue-tsc 的既有错误里(TS2339: Property 'rule_type' does
not exist),只是之前没人跑,所以没人看见。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-25 13:43:45 -06:00
parent ae71055818
commit b5edd6faf5

View File

@@ -42,21 +42,13 @@ async function clone() {
message.error("复制失败")
}
}
const isACM = computed(() => props.contest.rule_type === "ACM")
</script>
<template>
<n-flex>
<n-button size="small" type="primary" secondary @click="goEditProblems">
题目
</n-button>
<n-button
v-if="isACM"
size="small"
type="warning"
secondary
@click="goACMHelper"
>
<n-button size="small" type="warning" secondary @click="goACMHelper">
审核
</n-button>
<n-button size="small" type="info" secondary @click="goEdit">