Fix: 完善裁判评分列表功能
1. 修复分页问题:添加 size=200 参数确保获取所有选手 2. 裁判长页面:使用 scoringComplete 判断评分完成状态 3. 普通裁判页面:已评分选手显示分数和修改按钮 4. 修复 getAthletesForAdmin 调用正确的接口路径 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -71,7 +71,7 @@
|
||||
<!-- 动作区域:始终显示 -->
|
||||
<view class="action-area">
|
||||
<!-- 已评分:显示总分和修改按钮 -->
|
||||
<template v-if="player.totalScore">
|
||||
<template v-if="player.scoringComplete && player.totalScore > 0">
|
||||
<text class="total-score">总分:{{ player.totalScore }}</text>
|
||||
<view class="chief-actions">
|
||||
<button class="modify-btn" @click="goToModify(player)">修改</button>
|
||||
@@ -224,11 +224,11 @@ export default {
|
||||
uni.hideLoading()
|
||||
|
||||
// 保存选手列表
|
||||
this.players = response.data || []
|
||||
this.players = (response.data.records || response.data) || []
|
||||
|
||||
// 计算评分统计(裁判长视图:统计有总分的选手)
|
||||
this.totalCount = this.players.length
|
||||
this.scoredCount = this.players.filter(p => p.totalScore).length
|
||||
this.scoredCount = this.players.filter(p => p.scoringComplete).length
|
||||
|
||||
// 调试信息
|
||||
if (config.debug) {
|
||||
|
||||
@@ -62,18 +62,35 @@
|
||||
|
||||
<!-- 裁判长:显示总分和已评分裁判数 -->
|
||||
<view class="player-scores" v-if="refereeType === 1">
|
||||
<text class="total-score">总分:{{ player.totalScore || '未评分' }}</text>
|
||||
<text class="judge-count">已评分:{{ player.scoredJudgeCount || 0 }}人</text>
|
||||
<text class="total-score">
|
||||
总分:{{ player.scoringComplete ? player.totalScore : '评分中' }}
|
||||
</text>
|
||||
<text class="judge-count">
|
||||
已评分:{{ player.scoredJudgeCount || 0 }}/{{ player.requiredJudgeCount || 0 }}人
|
||||
</text>
|
||||
</view>
|
||||
|
||||
<!-- 普通裁判:显示评分按钮 -->
|
||||
<button
|
||||
class="score-btn"
|
||||
v-else
|
||||
@click.stop="goToScoreDetail(player)"
|
||||
>
|
||||
评分
|
||||
</button>
|
||||
<!-- 普通裁判:根据评分状态显示不同内容 -->
|
||||
<view class="judge-action" v-else>
|
||||
<!-- 已评分:显示分数和修改按钮 -->
|
||||
<view class="scored-info" v-if="player.scored">
|
||||
<text class="my-score-text">我的评分:{{ player.myScore }}</text>
|
||||
<button
|
||||
class="score-btn modify-btn"
|
||||
@click.stop="goToScoreDetail(player)"
|
||||
>
|
||||
修改
|
||||
</button>
|
||||
</view>
|
||||
<!-- 未评分:显示评分按钮 -->
|
||||
<button
|
||||
class="score-btn"
|
||||
v-else
|
||||
@click.stop="goToScoreDetail(player)"
|
||||
>
|
||||
评分
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="player-info">
|
||||
@@ -634,6 +651,29 @@ export default {
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.judge-action {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.scored-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.my-score-text {
|
||||
font-size: 28rpx;
|
||||
color: #1B7C5E;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.modify-btn {
|
||||
background: linear-gradient(135deg, #FF9500 0%, #FFB340 100%);
|
||||
padding: 10rpx 30rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.player-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
Reference in New Issue
Block a user