|
@@ -1,7 +1,6 @@
|
|
|
import { findCurrentTaskMarkResult } from "@/components/mark/store";
|
|
|
import { httpApp } from "@/plugins/axiosApp";
|
|
|
import { Setting, UISetting } from "@/types";
|
|
|
-import { groupBy, sortBy } from "lodash";
|
|
|
|
|
|
/** 清除评卷任务(之前锁住的任务之类的) */
|
|
|
export async function clearMarkTask() {
|
|
@@ -66,40 +65,6 @@ export async function getHistoryTask({
|
|
|
export async function saveTask() {
|
|
|
const markResult = findCurrentTaskMarkResult();
|
|
|
if (markResult) {
|
|
|
- // const scoreGroups = groupBy(
|
|
|
- // markResult.trackList,
|
|
|
- // (obj) =>
|
|
|
- // (obj.mainNumber + "").padStart(10, "0") +
|
|
|
- // obj.subNumber.padStart(10, "0")
|
|
|
- // );
|
|
|
- // const questionWithScore = Object.entries(scoreGroups);
|
|
|
- // const questionWithTotalScore = questionWithScore.map((v) => [
|
|
|
- // v[0],
|
|
|
- // v[1].reduce((acc, c) => (acc += c.score), 0),
|
|
|
- // ]);
|
|
|
- // const questionWithTotalScoreSorted = sortBy(
|
|
|
- // questionWithTotalScore,
|
|
|
- // (obj) => obj[0]
|
|
|
- // );
|
|
|
- // const scoreList = questionWithTotalScoreSorted.map((s) => s[1]);
|
|
|
- // // console.log(
|
|
|
- // // scoreGroups,
|
|
|
- // // questionWithScore,
|
|
|
- // // questionWithTotalScore,
|
|
|
- // // questionWithTotalScoreSorted,
|
|
|
- // // scoreList
|
|
|
- // // );
|
|
|
- // markResult.scoreList = scoreList as number[];
|
|
|
- // // const sortScore = orderBy(markResult.trackList, ['mainNumber', 'subNumber', 'score']);
|
|
|
- // // markResult.scoreList = sortScore.reduce((acc, pre) => {
|
|
|
- // // if(pre.mainNumber === cur.mainNumber && pre.subNumber === cur.subNumber) {
|
|
|
- // // acc[acc.length-1] += cur.score
|
|
|
- // // }
|
|
|
- // // }, [0])
|
|
|
- // markResult.markerScore =
|
|
|
- // markResult.trackList
|
|
|
- // .map((t) => t.score)
|
|
|
- // .reduce((acc, v) => (acc += v * 100), 0) / 100;
|
|
|
markResult.specialTagList = [];
|
|
|
markResult.problem = false;
|
|
|
markResult.spent = Date.now() - markResult.spent;
|