fix: 修复表号与序号顺序不一致问题
移除按id排序逻辑,使表号与显示顺序保持一致 Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
factory-droid[bot]
parent
0cd46d125f
commit
23d1856dcc
@@ -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位)
|
||||
|
||||
Reference in New Issue
Block a user