This commit is contained in:
ltx 2026-09-21 17:55:11 +08:00
commit 17f432625e

View File

@ -35,7 +35,13 @@
<div class="role-title">{{ section.title }}</div>
<div class="role-slots">
<div v-for="slot in section.slots" :key="slot.code" :class="['role-slot', { active: !viewOnly && selectedRole === slot.code, readonly: viewOnly }]" @click="selectRole(slot.code)">
<div class="slot-head"><strong>{{ slot.name }}</strong><span class="slot-quota">{{ quotaText(slot) }}</span></div>
<div class="slot-head">
<strong class="slot-name">{{ slot.name }}</strong>
<span class="slot-quota">{{ quotaText(slot) }}</span>
</div>
<div v-if="slot.categories?.length" style="font-size: 12px; color: var(--el-text-color-secondary); line-height: 1.5;">
<div v-for="cat in slot.categories" :key="cat">{{ cat }}</div>
</div>
<div v-if="picked(slot.code).length" class="slot-referees">
<el-tag v-for="id in picked(slot.code)" :key="id" :closable="!viewOnly" @close.stop="removeReferee(slot.code, id)">{{ candidateName(id) }}</el-tag>
</div>
@ -44,7 +50,11 @@
</div>
</div>
</div>
<div v-if="!viewOnly" class="candidate-area"><div class="candidate-title">{{ selectedSlot ? `可选${selectedSlot.name}` : '裁判报名' }}</div><el-empty v-if="eligibleCandidates.length === 0" description="暂无符合资格的报名裁判" :image-size="60" /><el-button v-for="item in eligibleCandidates" :key="item.eventRefereeId" class="candidate" @click="chooseCandidate(item)">{{ item.name }} / {{ item.mobile }}</el-button></div>
<div v-if="!viewOnly" class="candidate-area">
<div class="candidate-title">{{ selectedSlot ? `可选${selectedSlot.name}` : '裁判报名' }}</div>
<el-empty v-if="eligibleCandidates.length === 0" description="暂无符合资格的报名裁判" :image-size="60" />
<el-button v-for="item in eligibleCandidates" :key="item.eventRefereeId" class="candidate" @click="chooseCandidate(item)">{{ item.name }} / {{ item.mobile }}</el-button>
</div>
</div>
<template #footer><el-button @click="assignVisible = false">{{ viewOnly ? '关闭' : '取消' }}</el-button><el-button v-if="!viewOnly" type="primary" @click="saveAssignments">确定</el-button></template>
</el-dialog>