import { httpApp } from "@/plugins/axiosApp"; import { CommonResponse, MarkDetail, Setting, Task } from "@/types"; interface paramType { paperNumber?: string; examId?: string; arbitrateId?: string; } /** 清理仲裁任务(taskId 与其他参数互斥填写) */ export async function clearArbitrateTask(params: paramType) { return httpApp.post( "/api/admin/mark/arbitrate/clear", {}, { params, } ); } /** 查看单个学生的仲裁任务 */ export async function getSingleArbitrateTask(params: paramType) { return httpApp.post( "/api/admin/mark/arbitrate/getTask", {}, { params } ); } /** 查看仲裁任务2次分数 */ export async function getArbitrateList(arbitrateId: string) { return httpApp.post( "/api/admin/mark/arbitrate/getArbitrationList", {}, { params: { arbitrateId } } ); } /** 批量仲裁得到单个学生的仲裁任务 */ export async function getOneOfArbitrateTask(params: paramType) { return httpApp.post( "/api/admin/mark/arbitrate/getTask", {}, { setGlobalMask: true, params, } ); } /** 批量仲裁得到任务总数 */ export async function getArbitrateTaskStatus(params: paramType) { return httpApp.post<{ valid: boolean; totalCount: number; markedCount: number; }>( "/api/admin/mark/arbitrate/getStatus", {}, { params, } ); } /** 批量仲裁设置 */ export async function getArbitrateSetting(params: paramType) { return httpApp.post( "/api/admin/mark/arbitrate/getSetting", {}, { params, } ); } /** 批量仲裁历史 */ export async function getArbitrateHistory({ subjectCode, examId, pageNumber = 1, pageSize = 20, order = "markerTime", sort = "DESC", secretNumber = null, }) { if (!subjectCode) return; return httpApp.post( "/api/admin/mark/arbitrate/getHistory", {}, { params: { paperNumber: subjectCode, pageSize, order, sort, pageNumber, examId, secretNumber: secretNumber || undefined, }, } ); } /** 保存仲裁任务 */ export async function saveArbitrateTask( arbitrateId: string, studentId: string, markerScore: number, scoreList: Array, unselective: boolean, markerTrackList?: any, markerTagList?: any ) { return httpApp.post("/api/admin/mark/arbitrate/saveTask", { arbitrateId, studentId, markerScore, scoreList, unselective, markerTrackList, markerTagList, }); }