工作台发起成绩修正后裁判端同步消息
This commit is contained in:
parent
8de56a840a
commit
b4fdd3c136
@ -34,8 +34,8 @@ export const workbenchEntryRematchPost = (data) =>
|
||||
|
||||
export const workbenchResultVoidPost = (data) => http.post('/workbench/results/void', data);
|
||||
|
||||
export const judgeScoreCorrectionInitiatePost = (data) =>
|
||||
http.post('/judgescore/corrections/initiate', data);
|
||||
export const workbenchCorrectionInitiatePost = (data) =>
|
||||
http.post('/workbench/corrections/initiate', data);
|
||||
|
||||
export const checkinScreenCastGet = (params) => http.get('/checkin/screen-cast', { params });
|
||||
|
||||
|
||||
@ -102,7 +102,7 @@ import {
|
||||
workbenchScreenCastCurrentGet, workbenchScreenCastWithdrawPost, workbenchCorrectionsGet,
|
||||
workbenchCorrectionDetailGet, workbenchCorrectionApprovePost, workbenchResultConfirmPost,
|
||||
workbenchResultsBatchConfirmPost, workbenchEntryRematchPost, workbenchResultVoidPost,
|
||||
judgeScoreCorrectionInitiatePost, workbenchResultsExportGet, workbenchScoreSheetsExportGet,
|
||||
workbenchCorrectionInitiatePost, workbenchResultsExportGet, workbenchScoreSheetsExportGet,
|
||||
} from '/@/api/match/workbench';
|
||||
|
||||
const route=useRoute(), router=useRouter();
|
||||
@ -311,7 +311,7 @@ async function batchConfirm(){
|
||||
function openReason(action,row){reasonAction.value=action;reasonRow.value=row;reasonText.value='';reasonVisible.value=true}
|
||||
async function submitReason(){const text=reasonText.value.trim();if(text.length<2)return ElMessage.warning('请填写至少 2 个字符的原因');actionLoading.value=true;try{if(reasonAction.value==='rematch')await workbenchEntryRematchPost({originalSessionEntryId:reasonRow.value.sessionEntryId,rematchReason:text});else await workbenchResultVoidPost({sessionEntryId:reasonRow.value.sessionEntryId,voidReason:text});reasonVisible.value=false;ElMessage.success(reasonAction.value==='rematch'?'重赛已安排到场次末尾':'成绩已作废');loadEntries()}finally{actionLoading.value=false}}
|
||||
function openCorrection(row){correctionRow.value=row;const firstRoleType=(row.judgeScores||[])[0]?.judgeRoleType??null;correctionForm.value={judgeRoleType:firstRoleType,scoreSheetId:null,reason:''};correctionVisible.value=true}
|
||||
async function submitCorrection(){const reason=correctionForm.value.reason.trim();if(!correctionForm.value.scoreSheetId)return ElMessage.warning('请选择裁判评分单');if(reason.length<2)return ElMessage.warning('请填写至少 2 个字符的修正原因');actionLoading.value=true;try{await judgeScoreCorrectionInitiatePost({scoreSheetId:correctionForm.value.scoreSheetId,reason});correctionVisible.value=false;ElMessage.success('修正任务已发送给裁判');loadEntries()}finally{actionLoading.value=false}}
|
||||
async function submitCorrection(){const reason=correctionForm.value.reason.trim();if(!correctionForm.value.scoreSheetId)return ElMessage.warning('请选择裁判评分单');if(reason.length<2)return ElMessage.warning('请填写至少 2 个字符的修正原因');actionLoading.value=true;try{await workbenchCorrectionInitiatePost({sessionEntryId:correctionRow.value.sessionEntryId,scoreSheetIds:[correctionForm.value.scoreSheetId],reason});correctionVisible.value=false;ElMessage.success('修正任务已发送给裁判');loadEntries()}finally{actionLoading.value=false}}
|
||||
async function approveCorrection(row,isApproved){let remark='';if(!isApproved)remark=await ElMessageBox.prompt('请输入驳回原因','驳回修正申请',{inputValidator:v=>String(v||'').trim().length>=2||'至少输入2个字符'}).then(x=>x.value);else await ElMessageBox.confirm('批准后将向裁判下发修正任务,是否继续?','批准申请');await workbenchCorrectionApprovePost({correctionId:row.correctionId,isApproved,approveRemark:remark});ElMessage.success('申请已处理');loadCorrections()}
|
||||
async function showCorrectionDetail(row){const res=await workbenchCorrectionDetailGet(row.correctionId);const x=res?.data;if(!x)return;ElMessageBox.alert(`选手:${x.entry?.participantName||'-'}\n裁判:${x.originalScore?.judgeName||'-'}(${x.originalScore?.judgeRoleName||'-'})\n原分:${score(x.originalScore?.totalScore)}\n原因:${x.applyReason}`,'修正详情',{confirmButtonText:'关闭'})}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user