fix(schedule): 修复markPlayerAsException重复定义导致的事件绑定问题
This commit is contained in:
@@ -738,37 +738,6 @@ export default {
|
|||||||
this.$message.success('下移成功')
|
this.$message.success('下移成功')
|
||||||
},
|
},
|
||||||
|
|
||||||
// 标记单个选手为异常
|
|
||||||
markPlayerAsException(group, player) {
|
|
||||||
if (this.isScheduleCompleted) {
|
|
||||||
this.$message.warning('编排已完成,无法标记异常')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 在 group.items 中找到该选手并修改状态
|
|
||||||
const item = group.items.find(i => i.id === player.id)
|
|
||||||
if (item) {
|
|
||||||
item.status = '异常'
|
|
||||||
|
|
||||||
// 添加到异常列表
|
|
||||||
this.exceptionList.push({
|
|
||||||
groupId: group.id,
|
|
||||||
groupTitle: group.title,
|
|
||||||
participantId: player.id,
|
|
||||||
schoolUnit: player.schoolUnit,
|
|
||||||
playerName: player.playerName,
|
|
||||||
status: '异常'
|
|
||||||
})
|
|
||||||
|
|
||||||
// 调用后端API保存状态
|
|
||||||
updateCheckInStatus(player.id, '异常').then(() => {
|
|
||||||
this.$message.success(`已将 ${player.playerName} 标记为异常`)
|
|
||||||
}).catch(err => {
|
|
||||||
console.error('保存异常状态失败:', err)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
goBack() {
|
goBack() {
|
||||||
this.$router.go(-1)
|
this.$router.go(-1)
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user