Prechádzať zdrojové kódy

全卷复核,打回时,由于 track里前端新增的 isByMultMark字段导致的400错误

刘洋 1 rok pred
rodič
commit
8c51048f9f
2 zmenil súbory, kde vykonal 32 pridanie a 24 odobranie
  1. 13 5
      src/api/inspectPage.ts
  2. 19 19
      src/devLoginParams.ts

+ 13 - 5
src/api/inspectPage.ts

@@ -133,17 +133,25 @@ export async function rejectInspectedTask(
   questionList: Array<Question>,
   questionList: Array<Question>,
   reason: string
   reason: string
 ) {
 ) {
+  // questionList = questionList.map((item: any) => {
+  //   if (Array.isArray(item.trackList)) {
+  //     item.trackList = item.trackList.map((v: any) => {
+  //       delete v.isByMultMark;
+  //       return v;
+  //     });
+  //   }
+  //   return item;
+  // });
   questionList = JSON.parse(
   questionList = JSON.parse(
     JSON.stringify(questionList, (key, value) => {
     JSON.stringify(questionList, (key, value) => {
-      const keys:string[] = ['markerId','color'];
+      const keys: string[] = ["markerId", "color", "isByMultMark"];
       // eslint-disable-next-line @typescript-eslint/no-unsafe-return
       // eslint-disable-next-line @typescript-eslint/no-unsafe-return
-      return !key.startsWith("__") && !keys.includes(key) ? value : undefined ;
-    }
-    )
+      return !key.startsWith("__") && !keys.includes(key) ? value : undefined;
+    })
   );
   );
   return httpApp.post<CommonResponse>("/admin/exam/inspected/rejected", {
   return httpApp.post<CommonResponse>("/admin/exam/inspected/rejected", {
     studentId,
     studentId,
     questionList,
     questionList,
-    reason
+    reason,
   });
   });
 }
 }

+ 19 - 19
src/devLoginParams.ts

@@ -31,17 +31,17 @@
 //   // markerId: "482",
 //   // markerId: "482",
 //   // markerId: "483",
 //   // markerId: "483",
 // };
 // };
-export const LOGIN_CONFIG = {
-  isAdmin: false,
-  forceChange: true,
-  loginName: "6-X-M_pj01",
-  // loginName: "liuyang",
-  password: "123456",
-  examId: "432",
-  markerId: "3123",
-  // markerId: "482",
-  // markerId: "483",
-};
+// export const LOGIN_CONFIG = {
+//   isAdmin: false,
+//   forceChange: true,
+//   loginName: "6-X-M_pj01",
+//   // loginName: "liuyang",
+//   password: "123456",
+//   examId: "432",
+//   markerId: "3123",
+//   // markerId: "482",
+//   // markerId: "483",
+// };
 // export const LOGIN_CONFIG = {
 // export const LOGIN_CONFIG = {
 //   isAdmin: false,
 //   isAdmin: false,
 //   forceChange: false,
 //   forceChange: false,
@@ -56,14 +56,14 @@ export const LOGIN_CONFIG = {
 //   // markerId: "483",
 //   // markerId: "483",
 // };
 // };
 /** 224 管理员 */
 /** 224 管理员 */
-// export const LOGIN_CONFIG = {
-//   isAdmin: true,
-//   forceChange: true,
-//   loginName: "admin-test",
-//   password: "123456",
-//   examId: "1",
-//   markerId: "339",
-// };
+export const LOGIN_CONFIG = {
+  isAdmin: true,
+  forceChange: true,
+  loginName: "admin01",
+  password: "123456",
+  examId: "292",
+  markerId: null,
+};
 
 
 /** 255 评卷员 */
 /** 255 评卷员 */
 // export const LOGIN_CONFIG = {
 // export const LOGIN_CONFIG = {