refactor: 裁判角色名称修改 - 裁判长→主裁判, 普通裁判→裁判员

- 修改pages目录下的Vue组件注释
- 修改api目录下的接口注释
- 修改mock目录下的模拟数据注释
- 修改utils/dataAdapter.js中的注释

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
DevOps
2025-12-27 11:37:50 +08:00
parent 711779dc57
commit a3680f7d3e
24 changed files with 76 additions and 76 deletions

View File

@@ -122,14 +122,14 @@ export default {
// 保存用户信息到全局数据
getApp().globalData = {
userRole, // 'pub' 或 'admin'
refereeType, // 1-裁判, 2-普通裁判
refereeType, // 1-裁判, 2-裁判
matchCode: this.matchCode,
matchId,
matchName,
matchTime,
judgeId,
judgeName,
venueId, // 普通评委有场地,裁判为null
venueId, // 普通评委有场地,裁判为null
venueName,
projects, // 分配的项目列表(从登录接口返回)
currentProjectIndex: 0 // 当前选中的项目索引
@@ -155,12 +155,12 @@ export default {
// 根据角色跳转到不同页面
setTimeout(() => {
if (userRole === 'admin') {
// 裁判跳转到多场地列表页(可以修改评分)
// 裁判跳转到多场地列表页(可以修改评分)
uni.navigateTo({
url: '/pages/score-list-multi/score-list-multi'
})
} else {
// 普通裁判跳转到评分列表页(可以评分)
// 裁判跳转到评分列表页(可以评分)
uni.navigateTo({
url: '/pages/score-list/score-list'
})

View File

@@ -142,7 +142,7 @@ export default {
// 获取当前选手信息(从 score-list-multi 页面传递)
const currentAthlete = globalData.currentAthlete ||
// 获取裁判ID
// 获取裁判ID
this.modifierId = globalData.judgeId
// 调试信息

View File

@@ -32,7 +32,7 @@
</scroll-view>
<view class="venue-tip">
<!-- <text class="tip-bold">裁判可看见所有场地和项目</text> -->
<!-- <text class="tip-bold">裁判可看见所有场地和项目</text> -->
<!-- <text class="tip-normal">场地和项目可动态全部可以点击切换</text> -->
</view>
@@ -130,12 +130,12 @@ export default {
time: globalData.matchTime || '比赛时间'
}
// 注意:裁判没有固定场地和项目,需要查看所有
// 注意:裁判没有固定场地和项目,需要查看所有
this.competitionId = globalData.matchId
// 调试信息
if (config.debug) {
console.log('裁判列表页加载:', {
console.log('裁判列表页加载:', {
userRole: globalData.userRole,
competitionId: this.competitionId
})
@@ -212,7 +212,7 @@ export default {
mask: true
})
// 🔥 关键改动:使用 dataAdapter 获取选手列表(裁判视图)
// 🔥 关键改动:使用 dataAdapter 获取选手列表(裁判视图)
// Mock模式调用 mock/athlete.js 的 getAthletesForAdmin 函数
// API模式调用 api/athlete.js 的 getAthletesForAdmin 函数GET /api/mini/athletes/admin
const response = await dataAdapter.getData('getAthletesForAdmin', {
@@ -226,7 +226,7 @@ export default {
// 保存选手列表
this.players = (response.data.records || response.data) || []
// 计算评分统计(裁判视图:统计有总分的选手)
// 计算评分统计(裁判视图:统计有总分的选手)
this.totalCount = this.players.length
this.scoredCount = this.players.filter(p => p.scoringComplete).length

View File

@@ -60,7 +60,7 @@
<view class="player-header">
<view class="player-name">{{ player.name }}</view>
<!-- 裁判显示总分和已评分裁判数 -->
<!-- 裁判显示总分和已评分裁判数 -->
<view class="player-scores" v-if="refereeType === 1">
<text class="total-score">
总分{{ player.scoringComplete ? player.totalScore : '评分中' }}
@@ -70,7 +70,7 @@
</text>
</view>
<!-- 普通裁判根据评分状态显示不同内容 -->
<!-- 裁判根据评分状态显示不同内容 -->
<view class="judge-action" v-else>
<!-- 已评分显示分数和修改按钮 -->
<view class="scored-info" v-if="player.scored">
@@ -124,7 +124,7 @@ export default {
},
judgeId: '',
matchId: '',
refereeType: 2, // 裁判类型1-裁判, 2-普通裁判)
refereeType: 2, // 裁判类型1-裁判, 2-裁判
venues: [], // 所有场地列表
currentVenueIndex: 0, // 当前选中的场地索引
projects: [], // 所有项目列表
@@ -149,7 +149,7 @@ export default {
this.judgeId = globalData.judgeId
this.matchId = globalData.matchId || globalData.matchCode
this.refereeType = globalData.refereeType || 2 // 默认为普通裁判
this.refereeType = globalData.refereeType || 2 // 默认为裁判
// 调试信息
if (config.debug) {
@@ -277,15 +277,15 @@ export default {
/**
* 处理选手卡片点击
* - 裁判:跳转到查看详情页面
* - 普通裁判:不处理(通过评分按钮跳转)
* - 裁判:跳转到查看详情页面
* - 裁判:不处理(通过评分按钮跳转)
*/
handlePlayerClick(player) {
if (this.refereeType === 1) {
// 裁判:查看评分详情
// 裁判:查看评分详情
this.goToScoreDetail(player)
}
// 普通裁判不处理卡片点击,只能通过评分按钮跳转
// 裁判不处理卡片点击,只能通过评分按钮跳转
},
goToScoreDetail(player) {