From be8b887a1c492f7f1d21d864eafa127a566fbaa7 Mon Sep 17 00:00:00 2001 From: DevOps Date: Wed, 31 Dec 2025 16:20:50 +0800 Subject: [PATCH] =?UTF-8?q?feat(judgeInvite):=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=9C=BA=E5=9C=B0=E8=BF=87=E6=BB=A4=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/martial/judgeInvite/index.vue | 37 +++++++++++++++++++++---- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/src/views/martial/judgeInvite/index.vue b/src/views/martial/judgeInvite/index.vue index 9e8d34b..5ac2622 100644 --- a/src/views/martial/judgeInvite/index.vue +++ b/src/views/martial/judgeInvite/index.vue @@ -347,6 +347,7 @@ const judgeDialogVisible = ref(false) // 场地和项目列表 const venueList = ref([]) +const filterVenueList = ref([]) const projectList = ref([]) // 导入表单 @@ -381,7 +382,8 @@ const queryParams = reactive({ competitionId: null, judgeName: '', judgeLevel: '', - inviteStatus: '' + inviteStatus: '', + venueId: null }) // 加载赛事列表 @@ -417,11 +419,31 @@ const loadCompetitionList = async () => { } // 赛事切换 -const handleCompetitionChange = (competitionId) => { +const handleCompetitionChange = async (competitionId) => { + // 重置场地筛选 + queryParams.venueId = null + // 加载该赛事的场地列表用于筛选 + await loadFilterVenueList() fetchData() loadStatistics() } +// 加载筛选用的场地列表 +const loadFilterVenueList = async () => { + if (!queryParams.competitionId) { + filterVenueList.value = [] + return + } + try { + const res = await getVenuesByCompetition(queryParams.competitionId) + const venueData = res.data?.data || res.data || {} + filterVenueList.value = venueData.records || [] + } catch (error) { + console.error('加载场地列表失败:', error) + filterVenueList.value = [] + } +} + // 加载统计数据 const loadStatistics = async () => { if (queryParams.competitionId === null || queryParams.competitionId === '') return @@ -472,7 +494,8 @@ const handleReset = () => { size: 10, judgeName: '', judgeLevel: '', - inviteStatus: '' + inviteStatus: '', + venueId: null }) fetchData() } @@ -904,8 +927,12 @@ const fallbackCopyToClipboard = (text, label) => { } // 挂载 -onMounted(() => { - loadCompetitionList() +onMounted(async () => { + await loadCompetitionList() + // 加载筛选用的场地列表 + if (queryParams.competitionId) { + await loadFilterVenueList() + } })