From 063e7d2f659dbdb9253234781f352754756bd9b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E6=A2=93=E5=BD=AD?= Date: Tue, 13 Oct 2026 15:56:08 +0800 Subject: [PATCH] =?UTF-8?q?=E2=80=9C=E9=80=89=E6=8B=A9=E6=8A=A5=E5=90=8D?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E2=80=9D=E8=BF=9B=E5=85=A5=E6=97=B6=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E9=80=89=E6=8B=A9=E7=AC=AC=E4=B8=80=E4=B8=AA=E9=98=9F?= =?UTF-8?q?=E4=BC=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/user/registration/index.vue | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/views/user/registration/index.vue b/src/views/user/registration/index.vue index ef6ea00..1929787 100644 --- a/src/views/user/registration/index.vue +++ b/src/views/user/registration/index.vue @@ -1658,6 +1658,13 @@ const switchSourceTeam = async (teamId) => { activeTeamKey.value = activeAssignGroupId.value ? `${activeAssignGroupId.value}_1` : null; }; +// 进入选择项目、分配队员步骤时,默认选中界面展示的第一个团队 +const switchToFirstSourceTeam = async () => { + const firstTeamId = selectedTeams.value[0]?.id; + if (!firstTeamId) return; + await switchSourceTeam(firstTeamId); +}; + // 选择多个来源团队并预加载各自的运动员 const onTeamSelectionChange = async (teamIds) => { const selectedIds = Array.isArray(teamIds) ? teamIds : []; @@ -2286,17 +2293,21 @@ const fetchMembers = async () => { } }; -const handlePrevious = () => { +const handlePrevious = async () => { if (activeStep.value === 3) { activeStep.value = 2; previewData.value = null; previewLoading.value = false; draftRegistrationId.value = null; + await nextTick(); + await switchToFirstSourceTeam(); return; } if (activeStep.value === 2) { activeStep.value = 1; resetAssignMembersAndBeyond(); + await nextTick(); + await switchToFirstSourceTeam(); return; } if (activeStep.value === 1) { @@ -2456,7 +2467,7 @@ const handleStep0Next = async () => { ElMessage.warning('请至少选择一个团队'); return; } - await switchSourceTeam(selectedTeamIds.value[0]); + await switchToFirstSourceTeam(); activeStep.value = 1; }; @@ -2485,7 +2496,7 @@ const handleStep1Next = async () => { }); await nextTick(); - await switchSourceTeam(selectedTeamIds.value[0]); + await switchToFirstSourceTeam(); }; const handleStep2Next = async () => {