浏览代码

feat: 仲裁轨迹

zhangjie 1 年之前
父节点
当前提交
fa1a4755fd
共有 2 个文件被更改,包括 10 次插入3 次删除
  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 = {};
     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]) {
       if (!userMap[track.userId]) {
         userMap[track.userId] = {
         userMap[track.userId] = {
           userId: track.userId,
           userId: track.userId,
@@ -586,7 +588,12 @@ 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 users = Object.values(userMap).map((user, index) => {
       const zhs = ["一", "二", "三"];
       const zhs = ["一", "二", "三"];
-      const prename = isDoubleMark ? `${zhs[index] || ""}评` : "评卷员";
+      let prename = "";
+      if (isArbitration) {
+        prename = "仲裁";
+      } else {
+        prename = isDoubleMark ? `${zhs[index] || ""}评` : "评卷员";
+      }
       return {
       return {
         ...user,
         ...user,
         prename,
         prename,

+ 1 - 1
src/types/index.ts

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