表演赛裁判详情

检录大屏调整:左侧的赛事检录顺序显示项目
This commit is contained in:
马梓彭 2026-09-21 14:15:55 +08:00
parent 989f9edd18
commit 8de56a840a
2 changed files with 15 additions and 4 deletions

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>

View File

@ -95,7 +95,7 @@ const projectStages=computed(()=>{
return {...stage,stageStatus:status,stageStatusText:stageStatusLabel(status)};
});
});
const unitsPerPage=15;
const unitsPerPage=24;
const unitPageCount=computed(()=>Math.max(1,Math.ceil((data.value.units||[]).length/unitsPerPage)));
const visibleUnits=computed(()=>{const all=data.value.units||[];const page=unitPage.value%unitPageCount.value;return all.slice(page*unitsPerPage,page*unitsPerPage+unitsPerPage)});
const pad=n=>String(n).padStart(2,'0');
@ -111,7 +111,7 @@ function toggleFullscreen(){if(fullscreenDocument.fullscreenElement)fullscreenDo
function requestAutoFullscreen(){if(route.query.autofullscreen==='1'&&!document.fullscreenElement)document.documentElement.requestFullscreen?.({navigationUI:'hide'}).catch(()=>{})}
function showControls(){controlsVisible.value=true;window.clearTimeout(controlTimer);controlTimer=window.setTimeout(()=>controlsVisible.value=false,2600)}
function setPreview(){if(!route.query.preview)return;const names=['凌予蓁','刘姝妍','乔韵宁','廖歆悦','程沐晞','陈禹舟','韩蕙阳','孟清和','廖翊博','张景泽','任家驹','周瑾瑜','张锦川','施宜程','苏栩宁','林若瑶','陈星宇','徐梓涵','吴一诺','陆子昂'];data.value={eventName:'2026年上海城市业余联赛跳绳联赛(杨浦站)',serverTimeText:'2026-07-29 10:05:32',weekDayText:'星期三',stages:[{eventProjectId:1,groupId:1,projectName:'3分钟10人长绳“8”字跳',groupName:'少儿男子组',order:1,totalUnits:10,checkedUnits:6,stageStatus:1},{eventProjectId:1,groupId:2,projectName:'3分钟10人长绳“8”字跳',groupName:'少儿女子组',order:11,totalUnits:10,checkedUnits:4,stageStatus:1},{eventProjectId:2,groupId:3,projectName:'两人同步规定套路',groupName:'少儿组',order:21,totalUnits:8,checkedUnits:0,stageStatus:2},{eventProjectId:3,groupId:4,projectName:'个人花样基础套路赛',groupName:'儿童组',order:29,totalUnits:12,checkedUnits:0,stageStatus:3}],currentCheckin:{eventProjectId:1,projectName:'3分钟10人长绳“8”字跳',displayName:'3分钟10人长绳“8”字跳'},currentCompeting:{displayName:'个人花样基础套路赛 · 儿童组',unitName:'跃动之夏培训学校有限公司',teamName:'诺宝宝花样跳绳队',athleteNames:['张嘉果','王灵曦','英轩诚']},units:names.map((name,index)=>({unitKey:String(index),groupName:index<10?'少儿男子组':'少儿女子组',athleteNames:[name],teamName:`第 ${index+1} 参赛队`,checkinStatus:index<10?2:1,checkinStatusText:index<10?'已检录':'待检录'}))};syncClock()}
onMounted(async()=>{storesTagsViewRoutes.setCurrenFullscreen(true);setPreview();if(!route.query.preview)await load();await nextTick();resize();window.addEventListener('resize',resize);pollTimer=window.setInterval(()=>document.visibilityState==='visible'&&!route.query.preview&&load(),3000);clockTimer=window.setInterval(tick,1000);unitTimer=window.setInterval(()=>{unitPage.value=(unitPage.value+1)%unitPageCount.value},9000);requestAutoFullscreen()});
onMounted(async()=>{storesTagsViewRoutes.setCurrenFullscreen(true);setPreview();if(!route.query.preview)await load();await nextTick();resize();window.addEventListener('resize',resize);pollTimer=window.setInterval(()=>document.visibilityState==='visible'&&!route.query.preview&&load(),3000);clockTimer=window.setInterval(tick,1000);unitTimer=window.setInterval(()=>{unitPage.value=(unitPage.value+1)%unitPageCount.value},7000);requestAutoFullscreen()});
onBeforeUnmount(()=>{[pollTimer,clockTimer,unitTimer].forEach(window.clearInterval);window.clearTimeout(controlTimer);window.removeEventListener('resize',resize)});
</script>
@ -125,4 +125,5 @@ onBeforeUnmount(()=>{[pollTimer,clockTimer,unitTimer].forEach(window.clearInterv
@keyframes pulse{50%{opacity:.35;box-shadow:0 0 15px currentColor}}@keyframes card-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
.schedule-panel{display:flex;flex-direction:column;padding:24px 22px;border:1px solid rgba(57,179,255,.28);border-radius:18px;background:linear-gradient(160deg,rgba(11,52,143,.62),rgba(2,20,77,.72));box-shadow:inset 0 1px rgba(119,224,255,.12),0 20px 50px rgba(0,0,26,.18);overflow:hidden}.schedule-panel .section-title small{display:block;color:#4d92cd;font-size:11px;font-weight:700;letter-spacing:.2em}.schedule-panel h2{margin:4px 0 0;font-size:24px}
.schedule-panel .stage-list{display:flex;flex-direction:column}.schedule-panel .stage-item{width:100%;flex:none}
.unit-grid{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(4,1fr);gap:7px;padding-top:11px}.unit-card{padding:7px 9px;border-radius:9px}.status-row{gap:5px}.order-no,.group-name,.status-row em,.team-name{font-size:9px}.status-row em i{width:4px;height:4px}.athlete-names{gap:2px 7px;max-height:38px}.athlete-names b{font-size:13px;line-height:1.25}.team-name{padding-top:5px}
</style>