Browse Source

feat: 仲裁轨迹

zhangjie 1 year ago
parent
commit
fa1a4755fd
2 changed files with 10 additions and 3 deletions
  1. 9 2
      src/features/student/studentInspect/MarkBody.vue
  2. 1 1
      src/types/index.ts

+ 9 - 2
src/features/student/studentInspect/MarkBody.vue

@@ -566,7 +566,9 @@ function parseMarkDetailList(): Array<MarkDetailItem[]> {
     }
 
     const userMap: UserMapType = {};
-    question.trackList.forEach((track) => {
+    const isArbitration = Boolean(question.headerTrack?.length);
+    const tList = isArbitration ? question.headerTrack : question.trackList;
+    tList.forEach((track) => {
       if (!userMap[track.userId]) {
         userMap[track.userId] = {
           userId: track.userId,
@@ -586,7 +588,12 @@ function parseMarkDetailList(): Array<MarkDetailItem[]> {
     const isDoubleMark = Object.keys(userMap).length > 1;
     const users = Object.values(userMap).map((user, index) => {
       const zhs = ["一", "二", "三"];
-      const prename = isDoubleMark ? `${zhs[index] || ""}评` : "评卷员";
+      let prename = "";
+      if (isArbitration) {
+        prename = "仲裁";
+      } else {
+        prename = isDoubleMark ? `${zhs[index] || ""}评` : "评卷员";
+      }
       return {
         ...user,
         prename,

+ 1 - 1
src/types/index.ts

@@ -288,7 +288,7 @@ interface RawQuestion {
   selectiveIndex: number | null;
   rejected?: boolean;
   questionName?: string;
-  headerTrack?: any;
+  headerTrack?: Array<Track>;
 }
 export interface Question extends RawQuestion {
   /** question 在 task 里面的 index ,用来对应 scoreList 的 score */