|
@@ -1,6 +1,6 @@
|
|
|
import { useMarkStore } from "@/store";
|
|
|
import { saveTask, doUnselectiveType } from "@/api/markPage";
|
|
|
-import { message } from "ant-design-vue";
|
|
|
+import { message, Modal } from "ant-design-vue";
|
|
|
import { isNumber, cloneDeep } from "lodash-es";
|
|
|
import { h } from "vue";
|
|
|
import EventBus from "@/plugins/eventBus";
|
|
@@ -175,6 +175,28 @@ export default function useMarkSubmit() {
|
|
|
// 单题模式下,更新当前题目的状态
|
|
|
if (markStore.isSingelQuestionModel) {
|
|
|
await updateQuestionStatus(markStore.currentQuestion.questionId);
|
|
|
+
|
|
|
+ const questionIndex = markStore.status.findIndex(
|
|
|
+ (item) => item.questionId === markStore.currentQuestion.questionId
|
|
|
+ );
|
|
|
+ if (questionIndex < 0) return;
|
|
|
+ const curStatus = markStore.status[questionIndex];
|
|
|
+ if (
|
|
|
+ isNumber(curStatus?.topCount) &&
|
|
|
+ curStatus?.topCount > 0 &&
|
|
|
+ curStatus?.personCount === curStatus?.topCount
|
|
|
+ ) {
|
|
|
+ Modal.confirm({
|
|
|
+ centered: true,
|
|
|
+ mask: true,
|
|
|
+ zIndex: 6000,
|
|
|
+ maskStyle: { opacity: 0.97 },
|
|
|
+ content: `分配任务份已完成,是否继续?`,
|
|
|
+ okText: "继续",
|
|
|
+ cancelText: "退出",
|
|
|
+ onCancel: logout,
|
|
|
+ });
|
|
|
+ }
|
|
|
} else {
|
|
|
updateStatus().catch((e) => console.log("保存任务后获取status出错", e));
|
|
|
}
|