소스 검색

问题卷标记,确保有任务

Michael Wang 4 년 전
부모
커밋
65eca3b556
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/features/mark/MarkProblemDialog.vue

+ 4 - 0
src/features/mark/MarkProblemDialog.vue

@@ -63,6 +63,10 @@ export default defineComponent({
     }
 
     const chooseProblemType = async (problemId: number) => {
+      if (!store.currentTask) {
+        message.warn({ content: "没有可以标记的任务", duration: 5 });
+        return;
+      }
       const res = await doProblemType(problemId);
       if (res.data.success) {
         message.success({ content: "问题卷处理成功", duration: 3 });