Michael Wang 4 lat temu
rodzic
commit
6332bc1c49
2 zmienionych plików z 5 dodań i 2 usunięć
  1. 4 1
      src/api/markPage.ts
  2. 1 1
      src/features/mark/MarkProblemDialog.vue

+ 4 - 1
src/api/markPage.ts

@@ -146,7 +146,7 @@ export async function doSwitchGroup(markerId: number) {
 
 /** 评卷用户选择试卷的问题类型 */
 export async function doProblemType(problemId: number) {
-  const markResult = findCurrentTaskMarkResult();
+  let markResult = findCurrentTaskMarkResult();
   if (markResult) {
     markResult.problem = true;
     markResult.problemTypeId = problemId;
@@ -157,6 +157,9 @@ export async function doProblemType(problemId: number) {
     markResult.trackList = [];
 
     markResult.spent = Date.now() - markResult.__markStartTime;
+    markResult = { ...markResult };
+    // @ts-ignore
+    markResult.__markStartTime = undefined;
   }
   return httpApp.post("/mark/saveTask", markResult);
 }

+ 1 - 1
src/features/mark/MarkProblemDialog.vue

@@ -44,10 +44,10 @@ export default defineComponent({
     // TODO: 和Mark.vue重复
     const removeSubmitedTask = () => {
       removeCurrentMarkResult();
-      // store.currentTask = undefined;
 
       if (!store.historyOpen) {
         store.tasks.shift();
+        store.currentTask = undefined;
       } else {
         if (store.currentTask === store.historyTasks[0]) {
           store.currentTask = store.historyTasks[1];