diff --git a/src/admin/problem/detail.vue b/src/admin/problem/detail.vue index d575e91..f469de8 100644 --- a/src/admin/problem/detail.vue +++ b/src/admin/problem/detail.vue @@ -8,7 +8,7 @@ import { } from "utils/constants" import download from "utils/download" import { unique } from "utils/functions" -import { BlankProblem, LANGUAGE, Tag, Testcase } from "utils/types" +import type { BlankProblem, LANGUAGE, Tag, Testcase } from "utils/types" import { createContestProblem, createProblem, @@ -416,6 +416,14 @@ async function generateMermaid() { problem.value.mermaid_code = res.data.flowchart } +const showGeneratorModal = ref(false) + +function handleTestcasesGenerated(testCaseId: string, testCaseScore: Testcase[]) { + problem.value.test_case_id = testCaseId + problem.value.test_case_score = testCaseScore + showGeneratorModal.value = false +} + onMounted(() => { getTagList() getProblemDetail() @@ -634,6 +642,36 @@ watch( +

测试用例区域

+ + + + 生成测试用例 + + + 上传测试用例 + + + + + + + + +

流程图区域

@@ -707,15 +745,6 @@ watch( 【测试用例】最好要有10个,要考虑边界情况,且不要跟【测试样例】一模一样 -
- - 上传测试用例 - -
提交