|
@@ -1078,35 +1078,40 @@ export default function useDraw(drawConfig: DrawConfig) {
|
|
function getMode4MarkerName(q: Question): string {
|
|
function getMode4MarkerName(q: Question): string {
|
|
let markerName = '';
|
|
let markerName = '';
|
|
if (q.headerTrack && q.headerTrack.length) {
|
|
if (q.headerTrack && q.headerTrack.length) {
|
|
- markerName = q.headerTrack[0].userName;
|
|
|
|
|
|
+ const names = new Set(q.headerTrack.map((item) => item.userName));
|
|
|
|
+ markerName = Array.from(names).join(',');
|
|
} else if (q.trackList && q.trackList.length) {
|
|
} else if (q.trackList && q.trackList.length) {
|
|
- markerName = q.trackList[0].userName;
|
|
|
|
|
|
+ const names = new Set(q.trackList.map((item) => item.userName));
|
|
|
|
+ markerName = Array.from(names).join(',');
|
|
} else if (q.markerList && q.markerList.length) {
|
|
} else if (q.markerList && q.markerList.length) {
|
|
let markers = q.markerList.filter((marker) => marker.header);
|
|
let markers = q.markerList.filter((marker) => marker.header);
|
|
if (!markers.length) {
|
|
if (!markers.length) {
|
|
markers = q.markerList.filter((marker) => !marker.header);
|
|
markers = q.markerList.filter((marker) => !marker.header);
|
|
}
|
|
}
|
|
- if (markers.length) markerName = markers[0].userName;
|
|
|
|
|
|
+ if (markers.length) {
|
|
|
|
+ const names = new Set(markers.map((item) => item.userName));
|
|
|
|
+ markerName = Array.from(names).join(',');
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return markerName;
|
|
return markerName;
|
|
}
|
|
}
|
|
|
|
|
|
function parseSummaryData(img: ImageItem): DrawTrackItem[] {
|
|
function parseSummaryData(img: ImageItem): DrawTrackItem[] {
|
|
- const isDoubleMark = (rawTask.questionList || []).some((question) => {
|
|
|
|
- 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);
|
|
|
|
- return uids.size === 2;
|
|
|
|
- });
|
|
|
|
- if (isDoubleMark) return [];
|
|
|
|
|
|
+ // const isDoubleMark = (rawTask.questionList || []).some((question) => {
|
|
|
|
+ // 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);
|
|
|
|
+ // return uids.size === 2;
|
|
|
|
+ // });
|
|
|
|
+ // if (isDoubleMark) return [];
|
|
|
|
|
|
const dataList: DrawTrackItem[] = [];
|
|
const dataList: DrawTrackItem[] = [];
|
|
const sources: string[][] = [['主观题号', '分数', '评卷员']];
|
|
const sources: string[][] = [['主观题号', '分数', '评卷员']];
|