2
0
刘洋 1 жил өмнө
parent
commit
43227fe95f

+ 18 - 19
src/devLoginParams.ts

@@ -9,17 +9,16 @@
 // export const markerId="419";
 
 /** 244 评卷员 */
-// export const LOGIN_CONFIG = {
-//   isAdmin: false,
-//   forceChange: true,
-//   loginName: "1-339-6-1",
-//   // loginName: "liuyang",
-//   password: "123456",
-//   examId: "1",
-//   markerId: "438",
-//   // markerId: "482",
-//   // markerId: "483",
-// };
+export const LOGIN_CONFIG = {
+  isAdmin: false,
+  forceChange: true,
+  loginName: "1-339-5-1",
+  // loginName: "liuyang",
+  password: "123456",
+  examId: "1",
+  // markerId: "438",
+  markerId: "147",
+};
 // export const LOGIN_CONFIG = {
 //   isAdmin: false,
 //   forceChange: true,
@@ -67,14 +66,14 @@
 //   // markerId: "483",
 // };
 /** 224 管理员 */
-export const LOGIN_CONFIG = {
-  isAdmin: true,
-  forceChange: true,
-  loginName: "admin-test",
-  password: "123456",
-  examId: "1",
-  markerId: null,
-};
+// export const LOGIN_CONFIG = {
+//   isAdmin: true,
+//   forceChange: true,
+//   loginName: "admin-test",
+//   password: "123456",
+//   examId: "1",
+//   markerId: null,
+// };
 // export const LOGIN_CONFIG = {
 //   isAdmin: true,
 //   forceChange: true,

+ 26 - 2
src/features/mark/Mark.vue

@@ -300,14 +300,38 @@ const showRejectedReason = (task: Task) => {
                 { style: { fontWeight: "bold", marginRight: "0.5em" } },
                 "给分记录: "
               ),
-              h("span", task.rejectScoreList),
+              // h("span", task.rejectScoreList),
+              ...buildRejectScoreList(task),
             ]),
           ]
         ),
     });
   }
 };
-
+const buildRejectScoreList = (task: Task) => {
+  let afterRejectScoreList: string = task?.afterRejectScoreList;
+  let rejectScoreList: string = task?.rejectScoreList;
+  if (!afterRejectScoreList || !rejectScoreList) {
+    return [h("span", rejectScoreList)];
+  }
+  let arr = [];
+  let aRejectArr = afterRejectScoreList.split(",");
+  let rejectArr = rejectScoreList.split(",");
+  for (let i = 0; i < rejectArr.length; i++) {
+    let score = rejectArr[i];
+    if (aRejectArr[i] === "#") {
+      arr.push(
+        h("span", { style: { fontWeight: "bold", color: "red" } }, score)
+      );
+    } else {
+      arr.push(h("span", { style: { fontWeight: "bold" } }, score));
+    }
+    if (i !== rejectArr.length - 1) {
+      arr.push(h("span", ", "));
+    }
+  }
+  return arr;
+};
 // 切换currentTask
 watch(
   () => store.currentTask,

+ 1 - 0
src/types/index.ts

@@ -219,6 +219,7 @@ interface RawTask {
   rejectScoreList?: any;
   headerTagList?: any;
   arbitrateIndex?: string;
+  afterRejectScoreList?: string;
 }
 
 export interface Task extends RawTask {