From 77c2c51d8a7c5f2e57213e78e26f6f428c34ef53 Mon Sep 17 00:00:00 2001 From: DevOps Date: Mon, 29 Dec 2025 15:33:19 +0800 Subject: [PATCH] =?UTF-8?q?fix(schedule):=20=E4=BF=AE=E5=A4=8D=E5=B1=95?= =?UTF-8?q?=E5=BC=80=E9=80=89=E6=89=8B=E8=AF=A6=E6=83=85=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E7=8A=B6=E6=80=81=E6=8C=81=E4=B9=85=E5=8C=96?= =?UTF-8?q?API=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - markPlayerAsException方法添加updateCheckInStatus API调用 - removePlayerException方法添加updateCheckInStatus API调用 - 添加编排完成状态检查 --- src/views/martial/schedule/index.vue | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/views/martial/schedule/index.vue b/src/views/martial/schedule/index.vue index fc4d31d..74b7143 100644 --- a/src/views/martial/schedule/index.vue +++ b/src/views/martial/schedule/index.vue @@ -530,6 +530,11 @@ export default { // 标记选手为异常 markPlayerAsException(group, team, playerIndex) { + if (this.isScheduleCompleted) { + this.$message.warning('编排已完成,无法标记异常') + return + } + const player = team.players[playerIndex] if (player) { player.status = '异常' @@ -543,12 +548,23 @@ export default { playerName: player.playerName, status: '异常' }) - this.$message.success('已标记为异常') + + // 调用后端API保存状态 + updateCheckInStatus(player.id, '异常').then(() => { + this.$message.success(`已将 ${player.playerName} 标记为异常`) + }).catch(err => { + console.error('保存异常状态失败:', err) + }) } }, // 取消选手异常状态 removePlayerException(group, team, playerIndex) { + if (this.isScheduleCompleted) { + this.$message.warning('编排已完成,无法取消异常') + return + } + const player = team.players[playerIndex] if (player) { player.status = '未签到' @@ -559,7 +575,13 @@ export default { if (idx !== -1) { this.exceptionList.splice(idx, 1) } - this.$message.success('已取消异常标记') + + // 调用后端API恢复状态 + updateCheckInStatus(player.id, '未签到').then(() => { + this.$message.success(`已将 ${player.playerName} 取消异常标记`) + }).catch(err => { + console.error('恢复状态失败:', err) + }) } },