|
@@ -72,11 +72,11 @@ import MarkBody from "./MarkBody.vue";
|
|
|
import { useTimers } from "@/setups/useTimers";
|
|
|
import MarkHistory from "./MarkHistory.vue";
|
|
|
import MarkBoardTrack from "./MarkBoardTrack.vue";
|
|
|
-import type { Question } from "@/types";
|
|
|
+import type { Question, Task } from "@/types";
|
|
|
import MarkBoardKeyBoard from "./MarkBoardKeyBoard.vue";
|
|
|
import MarkBoardMouse from "./MarkBoardMouse.vue";
|
|
|
import { debounce, isEmpty, isNumber } from "lodash-es";
|
|
|
-import { message } from "ant-design-vue";
|
|
|
+import { message, Modal } from "ant-design-vue";
|
|
|
import AnswerModal from "./AnswerModal.vue";
|
|
|
import PaperModal from "./PaperModal.vue";
|
|
|
import MinimapModal from "./MinimapModal.vue";
|
|
@@ -228,6 +228,51 @@ watch(
|
|
|
{ deep: true }
|
|
|
);
|
|
|
|
|
|
+const showRejectedReason = (task: Task) => {
|
|
|
+ if (task.rejected && task.rejectReason) {
|
|
|
+ const [reasonType,reasonDesc] = task.rejectReason.split(':')
|
|
|
+ Modal.info({
|
|
|
+ title: null,
|
|
|
+ closable: false,
|
|
|
+ maskClosable: false,
|
|
|
+ centered: true,
|
|
|
+ icon: null,
|
|
|
+ okText: "知道了",
|
|
|
+ wrapClassName: "custom-modal-info",
|
|
|
+ zIndex: 9999,
|
|
|
+ bodyStyle: {
|
|
|
+ padding: "15px",
|
|
|
+ },
|
|
|
+ content: () =>
|
|
|
+ h(
|
|
|
+ "div",
|
|
|
+ {
|
|
|
+ style: {
|
|
|
+ fontSize: "14px",
|
|
|
+ color: "var(--app-main-text-color)",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ [
|
|
|
+ h("div", { style: { marginBottom: "8px" } }, [
|
|
|
+ h(
|
|
|
+ "span",
|
|
|
+ { style: { fontWeight: "bold", marginRight: "0.5em" } },
|
|
|
+ "打回原因: "
|
|
|
+ ),
|
|
|
+ h("span", reasonType),
|
|
|
+ ]),
|
|
|
+ h("div", { style: { fontWeight: "bold" } }, "详情描述: "),
|
|
|
+ h(
|
|
|
+ "div",
|
|
|
+ { style: { padding: "4px 2px" } },
|
|
|
+ reasonDesc
|
|
|
+ ),
|
|
|
+ ]
|
|
|
+ ),
|
|
|
+ });
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
// 切换currentTask
|
|
|
watch(
|
|
|
() => store.currentTask,
|
|
@@ -235,6 +280,9 @@ watch(
|
|
|
// 重置当前选择的quesiton和score
|
|
|
store.currentQuestion = undefined;
|
|
|
store.currentScore = undefined;
|
|
|
+ if (store.currentTask) {
|
|
|
+ showRejectedReason(store.currentTask);
|
|
|
+ }
|
|
|
}
|
|
|
);
|
|
|
|
|
@@ -402,6 +450,12 @@ const saveTaskToServer = async () => {
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
+<style>
|
|
|
+.custom-modal-info .ant-modal-content {
|
|
|
+ border-radius: 4px;
|
|
|
+}
|
|
|
+</style>
|
|
|
+
|
|
|
<style scoped>
|
|
|
.my-container {
|
|
|
width: 100%;
|