删除 spj
Some checks failed
Deploy / deploy (push) Has been cancelled

This commit is contained in:
2025-10-11 23:35:41 +08:00
parent 33aca892f4
commit d7316d4681
4 changed files with 0 additions and 20 deletions

View File

@@ -204,7 +204,6 @@
- `GET /api/admin/versions` - 版本信息 - `GET /api/admin/versions` - 版本信息
### 6. 题目管理相关admin ### 6. 题目管理相关admin
- `POST /api/admin/compile_spj` - 编译Special Judge
- `POST /api/admin/export_problem` - 导出题目 - `POST /api/admin/export_problem` - 导出题目
- `POST /api/admin/import_problem` - 导入题目 - `POST /api/admin/import_problem` - 导入题目
- `POST /api/admin/import_fps` - 导入FPS格式题目 - `POST /api/admin/import_fps` - 导入FPS格式题目
@@ -278,7 +277,6 @@
- **版本信息**: versions显示系统版本 - **版本信息**: versions显示系统版本
- **FPS导入**: import_fps特定格式题目导入 - **FPS导入**: import_fps特定格式题目导入
- **文件上传**: upload_file目前只有图片上传 - **文件上传**: upload_file目前只有图片上传
- **Special Judge编译**: compile_spj高级题目功能
### 4. 可选功能 ### 4. 可选功能
- **生成用户**: generate_user批量生成测试用户 - **生成用户**: generate_user批量生成测试用户

View File

@@ -134,7 +134,6 @@ export async function uploadImage(file: File): Promise<string> {
export function uploadTestcases(file: File) { export function uploadTestcases(file: File) {
const form = new window.FormData() const form = new window.FormData()
form.append("file", file) form.append("file", file)
form.append("spj", "false")
return http.post<TestcaseUploadedReturns>("admin/test_case", form, { return http.post<TestcaseUploadedReturns>("admin/test_case", form, {
headers: { "content-type": "multipart/form-data" }, headers: { "content-type": "multipart/form-data" },
}) })

View File

@@ -61,10 +61,6 @@ const problem = useLocalStorage<BlankProblem>(STORAGE_KEY.ADMIN_PROBLEM, {
{ input: "", output: "" }, { input: "", output: "" },
{ input: "", output: "" }, { input: "", output: "" },
], ],
spj: false,
spj_language: "",
spj_code: "",
spj_compile_ok: false,
test_case_id: "", test_case_id: "",
test_case_score: [], test_case_score: [],
rule_type: "ACM", rule_type: "ACM",
@@ -142,10 +138,6 @@ async function getProblemDetail() {
problem.value.template = data.template problem.value.template = data.template
problem.value.samples = data.samples problem.value.samples = data.samples
problem.value.samples = data.samples problem.value.samples = data.samples
problem.value.spj = data.spj
problem.value.spj_language = data.spj_language
problem.value.spj_code = data.spj_code
problem.value.spj_compile_ok = data.spj_compile_ok
problem.value.test_case_id = data.test_case_id problem.value.test_case_id = data.test_case_id
problem.value.test_case_score = data.test_case_score problem.value.test_case_score = data.test_case_score
problem.value.rule_type = data.rule_type problem.value.rule_type = data.rule_type
@@ -225,9 +217,6 @@ async function handleUploadTestcases({ file }: UploadCustomRequestOptions) {
const testcases = res.data.info const testcases = res.data.info
for (let file of testcases) { for (let file of testcases) {
file.score = (100 / testcases.length).toFixed(0) file.score = (100 / testcases.length).toFixed(0)
if (!file.output_name && problem.value.spj) {
file.output_name = "-"
}
} }
problem.value.test_case_score = testcases problem.value.test_case_score = testcases
problem.value.test_case_id = res.data.id problem.value.test_case_id = res.data.id

View File

@@ -81,7 +81,6 @@ export interface Tag {
export interface TestcaseUploadedReturns { export interface TestcaseUploadedReturns {
id: string id: string
info: Testcase[] info: Testcase[]
spj: boolean
} }
export interface Testcase { export interface Testcase {
@@ -115,8 +114,6 @@ export interface Problem {
output: string output: string
io_mode: string io_mode: string
} }
spj: boolean
spj_language: string
rule_type: string rule_type: string
difficulty: "Low" | "Mid" | "High" difficulty: "Low" | "Mid" | "High"
source: string source: string
@@ -135,9 +132,6 @@ export interface Problem {
export type AdminProblem = Problem & AlterProblem export type AdminProblem = Problem & AlterProblem
interface AlterProblem { interface AlterProblem {
spj_language: string
spj_code: string
spj_compile_ok: boolean
test_case_id: string test_case_id: string
test_case_score: Testcase[] test_case_score: Testcase[]
contest_id?: string contest_id?: string