|
@@ -25,44 +25,6 @@ export async function getGroup() {
|
|
|
/** 获取评卷任务 */
|
|
|
export async function getTask() {
|
|
|
const res = await httpApp.post("/mark/getTask");
|
|
|
- // if (res.data.questionList) {
|
|
|
- // const task = res.data as Task;
|
|
|
- // if (!isNull(task.objectiveScore)) {
|
|
|
- // task.objectiveScore = Math.round(task.objectiveScore * 100);
|
|
|
- // }
|
|
|
- // if (!isNull(task.markerScore)) {
|
|
|
- // task.markerScore = Math.round(task.markerScore * 100);
|
|
|
- // }
|
|
|
- // if (task.questionList.length > 0) {
|
|
|
- // task.questionList = task.questionList.map((q) => {
|
|
|
- // if (!isNull(q.intervalScore)) {
|
|
|
- // q.intervalScore = Math.round(q.intervalScore * 100);
|
|
|
- // }
|
|
|
- // if (!isNull(q.defaultScore)) {
|
|
|
- // q.defaultScore = Math.round(q.defaultScore * 100);
|
|
|
- // }
|
|
|
- // if (!isNull(q.minScore)) {
|
|
|
- // q.minScore = Math.round(q.minScore * 100);
|
|
|
- // }
|
|
|
- // if (!isNull(q.maxScore)) {
|
|
|
- // q.maxScore = Math.round(q.maxScore * 100);
|
|
|
- // }
|
|
|
- // if (!isNull(q.score)) {
|
|
|
- // q.score = Math.round(q.score * 100);
|
|
|
- // }
|
|
|
- // if (q.trackList?.length > 0) {
|
|
|
- // q.trackList = q.trackList.map((t) => {
|
|
|
- // if (!isNull(t.score)) {
|
|
|
- // t.score = Math.round(t.score * 100);
|
|
|
- // }
|
|
|
- // return t;
|
|
|
- // });
|
|
|
- // }
|
|
|
-
|
|
|
- // return q;
|
|
|
- // });
|
|
|
- // }
|
|
|
- // }
|
|
|
return res;
|
|
|
}
|
|
|
|
|
@@ -102,11 +64,14 @@ export async function getHistoryTask({
|
|
|
|
|
|
/** 保存评卷任务 */
|
|
|
export async function saveTask() {
|
|
|
- const markResult = findCurrentTaskMarkResult();
|
|
|
+ let markResult = findCurrentTaskMarkResult();
|
|
|
if (markResult) {
|
|
|
markResult.specialTagList = [];
|
|
|
markResult.problem = false;
|
|
|
markResult.spent = Date.now() - markResult.__markStartTime;
|
|
|
+ markResult = { ...markResult };
|
|
|
+ // @ts-ignore
|
|
|
+ markResult.__markStartTime = undefined;
|
|
|
|
|
|
return httpApp.post("/mark/saveTask", markResult);
|
|
|
}
|