fix: 修复表号与序号顺序不一致问题

移除按id排序逻辑,使表号与显示顺序保持一致

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
Z-WICK
2026-01-15 13:16:40 +08:00
co-authored by factory-droid[bot]
parent 0cd46d125f
commit 23d1856dcc
+2 -3
View File
@@ -500,7 +500,7 @@ export default {
period = hour < 12 ? 1 : 2
}
// 3. 获取序号:在同场地同时段中的顺序
// 3. 获取序号:在同场地同时段中的顺序(与显示顺序一致)
const sameSlotGroups = this.competitionGroups.filter(g => {
const gVenueMatch = String(g.venueId) === String(group.venueId)
if (!gVenueMatch) return false
@@ -508,8 +508,7 @@ export default {
const gPeriod = gHour < 12 ? 1 : 2
return gPeriod === period
})
// 按id排序保持稳定顺
sameSlotGroups.sort((a, b) => (a.id || 0) - (b.id || 0))
// 使用原始数组顺序(与显示顺序一致),不再按id排序
const orderIndex = sameSlotGroups.findIndex(g => g.id === group.id) + 1
// 4. 格式化: 场地(1位) + 时段(1位) + 序号(2位)