feat(competition): 支持决赛环节并添加加时赛管理功能

- 扩展竞赛环节类型,支持决赛环节(RoundType=3)
- 新增加时赛创建功能,支持多分组队伍选择
- 添加题目库禁用/启用功能,支持批量操作
- 优化用户端竞赛流程,区分常规赛和加时赛
- 重构操作按钮组件,提高代码复用性
This commit is contained in:
2026-03-09 17:34:40 +08:00
parent 8469e16638
commit 11fb5481d3
22 changed files with 468 additions and 142 deletions

View File

@ -1,5 +1,5 @@
<script lang="ts" setup>
import { onMounted, ref } from 'vue'
import { computed, onMounted, ref } from 'vue'
import { useRoute } from 'vue-router'
import CompetitionLayout from '@/components/custom/user/CompetitionLayout.vue'
import { useRouterPush } from '@/hooks/common/router'
@ -20,6 +20,8 @@ const activityId = (route.query?.activityId) as string || ''
const groupsId = (route.query?.groupsId) as string || ''
const teamIds = ref<number[]>([])
const RoundType = computed(() => Number(route.query?.RoundType || 0))
async function getTeams() {
if (!groupsId)
return
@ -61,7 +63,7 @@ function handleNext() {
function selectTeam(_id: number) {
// 选择队伍逻辑
routerPushByKey('user_cover', { query: { activityId, groupsId, teamId: _id, teamIds: teamIds.value.join(',') } })
routerPushByKey('user_cover', { query: { activityId, groupsId, teamId: _id, teamIds: teamIds.value.join(','), RoundType: RoundType.value } })
}
onMounted(() => {