This commit is contained in:
2025-12-14 17:38:35 +08:00
parent 8c56251d72
commit b7b8947939
16 changed files with 659 additions and 201 deletions

View File

@@ -4,48 +4,77 @@
*/
/**
* 获取我的选手列表(普通评委
* 获取选手列表(根据裁判类型返回不同数据
* @param {Object} params
* @param {String} params.judgeId - 评委ID
* @param {String} params.venueId - 场地ID
* @param {String} params.projectId - 项目ID
* @returns {Array} 选手列表(带评分状态
* @param {Number} params.refereeType - 裁判类型1-裁判长, 2-普通裁判)
* @param {String} params.venueId - 场地ID可选
* @param {String} params.projectId - 项目ID可选
* @returns {Array} 选手列表
*/
export function getMyAthletes(params) {
// 模拟3个选手数据
const { refereeType } = params
// 裁判长:返回已有评分的选手
if (refereeType === 1) {
return [
{
athleteId: 1,
name: '张三',
number: '123-4567898275',
team: '少林寺武术大学院',
projectName: '女子组长拳',
orderNum: 1,
totalScore: 8.907,
scoredJudgeCount: 6,
competitionStatus: 2
},
{
athleteId: 2,
name: '李四',
number: '123-4567898276',
team: '武当山武术学院',
projectName: '女子组长拳',
orderNum: 2,
totalScore: 8.902,
scoredJudgeCount: 6,
competitionStatus: 2
},
{
athleteId: 4,
name: '赵六',
number: '123-4567898278',
team: '华山武术学院',
projectName: '女子组长拳',
orderNum: 4,
totalScore: 8.899,
scoredJudgeCount: 5,
competitionStatus: 2
}
]
}
// 普通裁判:返回待评分的选手
return [
{
athleteId: '1',
name: '张三',
idCard: '123456789000000000',
team: '少林寺武术大学院',
number: '123-4567898275',
myScore: 8.906, // 我的评分
totalScore: 8.907, // 总分
scored: true, // 已评分
scoreTime: '2025-06-25 09:15:00'
},
{
athleteId: '2',
name: '李四',
idCard: '123456789000000001',
team: '武当山武术学院',
number: '123-4567898276',
myScore: 8.901,
totalScore: 8.902,
scored: true,
scoreTime: '2025-06-25 09:20:00'
},
{
athleteId: '3',
athleteId: 3,
name: '王五',
idCard: '123456789000000002',
team: '峨眉派武术学校',
number: '123-4567898277',
myScore: null, // 未评分
totalScore: null,
scored: false,
scoreTime: null
projectName: '女子组长拳',
orderNum: 3,
competitionStatus: 0
},
{
athleteId: 5,
name: '孙七',
idCard: '123456789000000004',
team: '崆峒派武术学校',
number: '123-4567898279',
projectName: '女子组长拳',
orderNum: 5,
competitionStatus: 0
}
]
}

View File

@@ -23,8 +23,8 @@ export function login(params) {
// 返回Mock登录数据
return {
token: 'mock_token_' + Date.now(),
userRole: role, // 'pub' 或 'admin'
matchId: '123',
refereeType: role === 'pub' ? 2 : 1, // 1-裁判长, 2-普通裁判
matchId: matchCode || '200', // 使用传入的比赛编码默认200
matchName: '2025年全国武术散打锦标赛暨第十七届世界武术锦标赛选拔赛',
matchTime: '2025年6月25日 9:00',
judgeId: '456',

View File

@@ -7,20 +7,26 @@
* 获取扣分项列表
* @param {Object} params
* @param {String} params.projectId - 项目ID
* @returns {Array} 扣分项列表
* @returns {Object} 扣分项列表包装在records中与后端API格式一致
*/
export function getDeductions(params) {
// 模拟8个扣分项
return [
{ id: '1', text: '扣分项描述', score: -0.1, checked: false },
{ id: '2', text: '扣分项描述', score: -0.1, checked: false },
{ id: '3', text: '扣分项描述', score: -0.1, checked: false },
{ id: '4', text: '扣分项描述', score: -0.1, checked: false },
{ id: '5', text: '扣分项描述', score: -0.1, checked: false },
{ id: '6', text: '扣分项描述', score: -0.1, checked: false },
{ id: '7', text: '扣分项描述', score: -0.1, checked: false },
{ id: '8', text: '扣分项描述', score: -0.1, checked: false }
]
// 模拟8个扣分项字段名与后端API保持一致
return {
records: [
{ id: '1', itemName: '动作不规范', deductionPoint: '0.1' },
{ id: '2', itemName: '节奏不稳', deductionPoint: '0.1' },
{ id: '3', itemName: '力度不足', deductionPoint: '0.1' },
{ id: '4', itemName: '平衡失误', deductionPoint: '0.1' },
{ id: '5', itemName: '器械掉落', deductionPoint: '0.2' },
{ id: '6', itemName: '出界', deductionPoint: '0.1' },
{ id: '7', itemName: '动作遗漏', deductionPoint: '0.2' },
{ id: '8', itemName: '其他失误', deductionPoint: '0.1' }
],
total: 8,
size: 100,
current: 1,
pages: 1
}
}
/**