|
@@ -580,7 +580,16 @@ function parseMarkDetailList(): Array<MarkDetailItem[]> {
|
|
const userMap: UserMapType = {};
|
|
const userMap: UserMapType = {};
|
|
// 大题分成两个部分给两个人评 与 大题被两人同时评 是不一样的
|
|
// 大题分成两个部分给两个人评 与 大题被两人同时评 是不一样的
|
|
const isDoubleMark = !groupQuestions.some((question) => {
|
|
const isDoubleMark = !groupQuestions.some((question) => {
|
|
- const userIds = question.trackList.map((track) => track.userId);
|
|
|
|
|
|
+ let userIds = question.trackList.map((track) => track.userId);
|
|
|
|
+ if (
|
|
|
|
+ !userIds.length &&
|
|
|
|
+ question.markerList &&
|
|
|
|
+ question.markerList.length
|
|
|
|
+ ) {
|
|
|
|
+ userIds = question.markerList
|
|
|
|
+ .filter((marker) => !marker.header)
|
|
|
|
+ .map((marker) => marker.userId);
|
|
|
|
+ }
|
|
const uids = new Set(userIds);
|
|
const uids = new Set(userIds);
|
|
return uids.size === 1;
|
|
return uids.size === 1;
|
|
});
|
|
});
|
|
@@ -608,6 +617,32 @@ function parseMarkDetailList(): Array<MarkDetailItem[]> {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ // 普通模式没有轨迹
|
|
|
|
+ if (
|
|
|
|
+ !question.trackList.length &&
|
|
|
|
+ question.markerList &&
|
|
|
|
+ question.markerList.length
|
|
|
|
+ ) {
|
|
|
|
+ question.markerList
|
|
|
|
+ .filter((marker) => !marker.header)
|
|
|
|
+ .forEach((marker) => {
|
|
|
|
+ if (!userMap[marker.userId]) {
|
|
|
|
+ userMap[marker.userId] = {
|
|
|
|
+ userId: marker.userId,
|
|
|
|
+ userName: marker.userName,
|
|
|
|
+ color: marker.header ? "green" : "red",
|
|
|
|
+ prename: "",
|
|
|
|
+ scores: [],
|
|
|
|
+ score: 0,
|
|
|
|
+ };
|
|
|
|
+ }
|
|
|
|
+ userMap[marker.userId].scores.push({
|
|
|
|
+ score: marker.score,
|
|
|
|
+ subNumber: question.subNumber,
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ }
|
|
});
|
|
});
|
|
|
|
|
|
const users = Object.values(userMap).map((user, index) => {
|
|
const users = Object.values(userMap).map((user, index) => {
|
|
@@ -673,8 +708,8 @@ function parseMarkDetailList(): Array<MarkDetailItem[]> {
|
|
});
|
|
});
|
|
|
|
|
|
const isDoubleMark = Object.keys(userMap).length > 1;
|
|
const isDoubleMark = Object.keys(userMap).length > 1;
|
|
- const users = Object.values(userMap).map((user, index) => {
|
|
|
|
- const zhs = ["一", "二", "三"];
|
|
|
|
|
|
+ const zhs = ["一", "二", "三"];
|
|
|
|
+ let users = Object.values(userMap).map((user, index) => {
|
|
let prename = "";
|
|
let prename = "";
|
|
if (isArbitration) {
|
|
if (isArbitration) {
|
|
prename = "仲裁";
|
|
prename = "仲裁";
|
|
@@ -688,6 +723,25 @@ function parseMarkDetailList(): Array<MarkDetailItem[]> {
|
|
};
|
|
};
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ // 普通模式没有轨迹
|
|
|
|
+ if (!tList.length && question.markerList && question.markerList.length) {
|
|
|
|
+ let markers = question.markerList.filter((marker) => marker.header);
|
|
|
|
+ if (!markers.length) {
|
|
|
|
+ markers = question.markerList.filter((marker) => !marker.header);
|
|
|
|
+ }
|
|
|
|
+ users = markers.map((item, index) => {
|
|
|
|
+ return {
|
|
|
|
+ userId: item.markerId,
|
|
|
|
+ userName: item.markerName,
|
|
|
|
+ color: item.header ? "green" : "red",
|
|
|
|
+ prename:
|
|
|
|
+ question.markerList.length > 1 ? `${zhs[index] || ""}评` : "评卷员",
|
|
|
|
+ scores: [],
|
|
|
|
+ score: item.score,
|
|
|
|
+ };
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
dataList[imgIndex].push({
|
|
dataList[imgIndex].push({
|
|
mainNumber: question.mainNumber,
|
|
mainNumber: question.mainNumber,
|
|
subNumber: question.subNumber,
|
|
subNumber: question.subNumber,
|