Эх сурвалжийг харах

fixbug 强制标志开关

Michael Wang 4 жил өмнө
parent
commit
b14d3283a4

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

@@ -243,20 +243,32 @@ export default defineComponent({
           }
           if (question) {
             message.error({
-              content: `${question.mainNumber}-${question.subNumber} 没有轨迹`,
+              content: `${question.mainNumber}-${question.subNumber} 没有轨迹`,
               duration: 5,
             });
           } else {
             message.error({ content: "少有人见过的错误" });
           }
         } else {
-          message.error({ content: "还有题目没有评分", duration: 5 });
+          message.error({ content: "还有题目没有评分", duration: 5 });
         }
         return;
       }
       if (store.setting.mode !== ModeEnum.TRACK) {
         markResult.trackList = [];
       }
+      if (store.setting.forceSpecialTag) {
+        if (
+          markResult.trackList.length === 0 &&
+          markResult.specialTagList.length === 0
+        ) {
+          message.error({
+            content: "强制标记已开启,请至少使用一个标记。",
+            duration: 5,
+          });
+          return;
+        }
+      }
       console.log("save task to server");
       const mkey = "save_task_key";
       message.loading({ content: "保存评卷任务...", key: mkey });

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

@@ -149,7 +149,7 @@
               />
             </td>
           </tr>
-          <tr v-if="store.setting.forceSpecialTag">
+          <tr>
             <td>特殊标记</td>
             <td>
               <a-switch