fix(scoring): 明确成绩投屏评分卡的得分与系数标签

成绩投屏的系数赛制评分卡改为展示“难度得分”“表现系数”“规定系数”“扣分系数 M”,让标签与评分含义一致。沿用赛制判断,规定赛继续显示“创意编排分”“完成质量分”和实际扣分,不误标为系数;交互绳等赛制的评分项隐藏规则保持不变。

仅修改前端成绩大屏页面,不涉及后端接口或计分计算。验证:npm run build:local 通过,git diff --check 通过。业务契约脚本因硬编码的后端路径在本机不存在而未能执行。
This commit is contained in:
ltx 2026-10-19 15:50:18 +08:00
parent 96eb9ce91e
commit 77180eaeb8

View File

@ -29,7 +29,7 @@ import { useRoute } from 'vue-router';
import { DocumentChecked, Flag, Location, Medal, Setting, Trophy, User, UserFilled } from '@element-plus/icons-vue'; import { DocumentChecked, Flag, Location, Medal, Setting, Trophy, User, UserFilled } from '@element-plus/icons-vue';
import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes'; import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
import { workbenchScreenCastCurrentGet } from '/@/api/match/workbench'; import { workbenchScreenCastCurrentGet } from '/@/api/match/workbench';
import { isWireRule } from '../score-format.mjs'; import { isFactorRule, isWireRule } from '../score-format.mjs';
const route=useRoute(),storesTagsViewRoutes=useTagsViewRoutes(); const route=useRoute(),storesTagsViewRoutes=useTagsViewRoutes();
let savedContext={};try{savedContext=JSON.parse(sessionStorage.getItem('scoring-context')||'{}')}catch{savedContext={}} let savedContext={};try{savedContext=JSON.parse(sessionStorage.getItem('scoring-context')||'{}')}catch{savedContext={}}
@ -59,8 +59,9 @@ const scoreIconComponents={difficulty:Setting,performance:Medal,required:Documen
const scoreCards=computed(()=>{ const scoreCards=computed(()=>{
const scoreRuleCode=effectiveCast.value?.scoreRuleCode; const scoreRuleCode=effectiveCast.value?.scoreRuleCode;
const prescribed=String(scoreRuleCode||'').toUpperCase().includes('PRESCRIBED'); const prescribed=String(scoreRuleCode||'').toUpperCase().includes('PRESCRIBED');
const factor=isFactorRule(scoreRuleCode);
const wire=isWireRule(scoreRuleCode); const wire=isWireRule(scoreRuleCode);
return [{key:'difficulty',label:'难度',en:'DIFFICULTY',field:'difficultyScore'},{key:'performance',label:'表现',en:'PERFORMANCE',field:'performanceScore'},{key:'required',label:'规定',en:'REQUIRED',field:'requiredScore'},{key:'deduction',label:payload.value.deductionFactor!=null?'扣分 M':'扣分',en:'DEDUCTION',field:payload.value.deductionFactor!=null?'deductionFactor':'deductionScore'}] return [{key:'difficulty',label:'难度得分',en:'DIFFICULTY',field:'difficultyScore'},{key:'performance',label:prescribed?'创意编排分':factor?'表现系数':'表现',en:'PERFORMANCE',field:'performanceScore'},{key:'required',label:prescribed?'完成质量分':factor?'规定系数':'规定',en:'REQUIRED',field:'requiredScore'},{key:'deduction',label:factor?'扣分系数 M':'扣分',en:'DEDUCTION',field:payload.value.deductionFactor!=null?'deductionFactor':'deductionScore'}]
.filter(item=>(item.key!=='difficulty'||!prescribed)&&(item.key!=='required'||!wire)); .filter(item=>(item.key!=='difficulty'||!prescribed)&&(item.key!=='required'||!wire));
}); });
const rankingAll=computed(()=>Array.isArray(payload.value)?payload.value:[]),rankingTotal=computed(()=>rankingAll.value.length),rankingPageCount=computed(()=>Math.max(1,Math.ceil(rankingTotal.value/6))),rankingPageIndex=computed(()=>rankPage.value%rankingPageCount.value),rankingRows=computed(()=>rankingAll.value.slice(rankingPageIndex.value*6,rankingPageIndex.value*6+6)),maxRankScore=computed(()=>Math.max(...rankingAll.value.map(row=>Number(row.totalScore??row.score)||0),1)); const rankingAll=computed(()=>Array.isArray(payload.value)?payload.value:[]),rankingTotal=computed(()=>rankingAll.value.length),rankingPageCount=computed(()=>Math.max(1,Math.ceil(rankingTotal.value/6))),rankingPageIndex=computed(()=>rankPage.value%rankingPageCount.value),rankingRows=computed(()=>rankingAll.value.slice(rankingPageIndex.value*6,rankingPageIndex.value*6+6)),maxRankScore=computed(()=>Math.max(...rankingAll.value.map(row=>Number(row.totalScore??row.score)||0),1));