|
@@ -312,6 +312,40 @@ export default function useTrackTag() {
|
|
};
|
|
};
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ // 新增仲裁和复核记录
|
|
|
|
+ const headerTrackQuestions = groupQuestions.filter(
|
|
|
|
+ (question) => question.headerTrackList?.length
|
|
|
|
+ );
|
|
|
|
+ if (headerTrackQuestions.length) {
|
|
|
|
+ const updateTypeUser = (type: "ARBITRATED" | "MARKED") => {
|
|
|
|
+ const typeQuestions = headerTrackQuestions.filter(
|
|
|
|
+ (question) => question.headerTrackList[0].headerType === type
|
|
|
|
+ );
|
|
|
|
+ typeQuestions.forEach((question) => {
|
|
|
|
+ const scores = question.headerTrackList.map((track) => {
|
|
|
|
+ return {
|
|
|
|
+ score: track.score,
|
|
|
|
+ subNumber: track.subNumber,
|
|
|
|
+ };
|
|
|
|
+ });
|
|
|
|
+ const score = calcSumPrecision(scores.map((s) => s.score));
|
|
|
|
+ const user = {
|
|
|
|
+ userId: question.headerTrackList[0].userId,
|
|
|
|
+ userName: question.headerTrackList[0].userName,
|
|
|
|
+ color: "green",
|
|
|
|
+ prename: type === "ARBITRATED" ? "仲裁" : "复核",
|
|
|
|
+ scores,
|
|
|
|
+ score,
|
|
|
|
+ };
|
|
|
|
+ users.push(user);
|
|
|
|
+ });
|
|
|
|
+ };
|
|
|
|
+ // 仲裁记录
|
|
|
|
+ updateTypeUser("ARBITRATED");
|
|
|
|
+ // 复核记录
|
|
|
|
+ updateTypeUser("MARKED");
|
|
|
|
+ }
|
|
|
|
+
|
|
const score = calcSumPrecision(
|
|
const score = calcSumPrecision(
|
|
groupQuestions.map((item) => item.score || 0)
|
|
groupQuestions.map((item) => item.score || 0)
|
|
);
|
|
);
|
|
@@ -349,16 +383,26 @@ export default function useTrackTag() {
|
|
}
|
|
}
|
|
|
|
|
|
const userMap: UserMapType = {};
|
|
const userMap: UserMapType = {};
|
|
- const isArbitration = Boolean(question.headerTrackList?.length);
|
|
|
|
- const tList = isArbitration
|
|
|
|
|
|
+
|
|
|
|
+ const hasHeaderTrack = question.headerTrackList?.length;
|
|
|
|
+ // 是否仲裁
|
|
|
|
+ const isArbitration =
|
|
|
|
+ hasHeaderTrack &&
|
|
|
|
+ question.headerTrackList[0].headerType === "ARBITRATED";
|
|
|
|
+ // 是否复核
|
|
|
|
+ const isReview =
|
|
|
|
+ hasHeaderTrack && question.headerTrackList[0].headerType === "MARKED";
|
|
|
|
+
|
|
|
|
+ const tList = hasHeaderTrack
|
|
? question.headerTrackList
|
|
? question.headerTrackList
|
|
: question.markerTrackList;
|
|
: question.markerTrackList;
|
|
|
|
+
|
|
tList.forEach((track) => {
|
|
tList.forEach((track) => {
|
|
if (!userMap[track.userId]) {
|
|
if (!userMap[track.userId]) {
|
|
userMap[track.userId] = {
|
|
userMap[track.userId] = {
|
|
userId: track.userId,
|
|
userId: track.userId,
|
|
userName: track.userName,
|
|
userName: track.userName,
|
|
- color: track.color || "red",
|
|
|
|
|
|
+ color: hasHeaderTrack ? "green" : "red",
|
|
prename: "",
|
|
prename: "",
|
|
scores: [],
|
|
scores: [],
|
|
score: 0,
|
|
score: 0,
|
|
@@ -369,13 +413,15 @@ export default function useTrackTag() {
|
|
subNumber: track.subNumber,
|
|
subNumber: track.subNumber,
|
|
});
|
|
});
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+ // 是否双评,复核或者仲裁只会是一个人
|
|
const isDoubleMark = Object.keys(userMap).length > 1;
|
|
const isDoubleMark = Object.keys(userMap).length > 1;
|
|
const zhs = ["一", "二", "三"];
|
|
const zhs = ["一", "二", "三"];
|
|
let users = Object.values(userMap).map((user, index) => {
|
|
let users = Object.values(userMap).map((user, index) => {
|
|
let prename = "";
|
|
let prename = "";
|
|
if (isArbitration) {
|
|
if (isArbitration) {
|
|
prename = "仲裁";
|
|
prename = "仲裁";
|
|
|
|
+ } else if (isReview) {
|
|
|
|
+ prename = "复核";
|
|
} else {
|
|
} else {
|
|
prename = isDoubleMark ? `${zhs[index] || ""}评` : "评卷员";
|
|
prename = isDoubleMark ? `${zhs[index] || ""}评` : "评卷员";
|
|
}
|
|
}
|