From 03d4c9fbd83cca0e99d3304d40b15b3813cb5f52 Mon Sep 17 00:00:00 2001 From: caoxiaozhu Date: Mon, 13 Jul 2026 10:31:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AF=84=E6=B5=8B=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=88=86=E6=AD=A5=E5=90=91=E5=AF=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 任务配置与评测规则拆分为两个独立步骤,新增步骤导航条与下一步/返回流程,逐步校验任务配置后再进入规则设置,提交时仅校验规则项。 --- frontend/src/views/eval/EvalCreateView.vue | 276 ++++++++++++++++++--- 1 file changed, 235 insertions(+), 41 deletions(-) diff --git a/frontend/src/views/eval/EvalCreateView.vue b/frontend/src/views/eval/EvalCreateView.vue index 216fd70..648b35a 100644 --- a/frontend/src/views/eval/EvalCreateView.vue +++ b/frontend/src/views/eval/EvalCreateView.vue @@ -16,9 +16,15 @@ type StepExposed = { validate: () => Promise } const router = useRouter() const loading = ref(false) const submitting = ref(false) +const currentStep = ref(0) const taskStepRef = ref() const ruleStepRef = ref() +const WIZARD_STEPS = [ + { title: '任务配置', description: '选择模型、算力与评测数据' }, + { title: '评测规则', description: '选择或创建评测维度' }, +] as const + const trainedModels = ref([]) const evalDatasets = ref([]) const dimensions = ref([]) @@ -131,10 +137,9 @@ async function resolveDimensionId() { async function handleSubmit() { if (loading.value || submitting.value) return - const taskValid = await taskStepRef.value?.validate() const ruleValid = await ruleStepRef.value?.validate() - if (!taskValid || !ruleValid) { - ElMessage.warning('请检查并完善所有必填项') + if (!ruleValid) { + ElMessage.warning('请检查并完善评测规则') return } @@ -161,6 +166,21 @@ async function handleSubmit() { } } +async function handleNext() { + if (loading.value || submitting.value) return + const taskValid = await taskStepRef.value?.validate() + if (!taskValid) { + ElMessage.warning('请检查并完善任务配置') + return + } + currentStep.value = 1 +} + +function handleBack() { + if (submitting.value) return + currentStep.value = 0 +} + function handleCancel() { router.back() } @@ -170,10 +190,38 @@ onMounted(loadData)