|
@@ -1,10 +1,10 @@
|
|
<template>
|
|
<template>
|
|
<div
|
|
<div
|
|
- class="tw-flex tw-gap-4 tw-justify-between tw-items-center header-bg"
|
|
|
|
- style="z-index: 10000; position: relative; font-size: 16px; height: 40px"
|
|
|
|
|
|
+ class="tw-flex tw-gap-4 tw-justify-between tw-items-center header-container"
|
|
|
|
+ v-if="store.setting"
|
|
>
|
|
>
|
|
<div>
|
|
<div>
|
|
- {{ store.setting.subject?.name }}
|
|
|
|
|
|
+ {{ store.setting.subject.name }}
|
|
</div>
|
|
</div>
|
|
<div class="tw-flex tw-gap-1">
|
|
<div class="tw-flex tw-gap-1">
|
|
<div>
|
|
<div>
|
|
@@ -14,45 +14,45 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<ul class="tw-flex tw-gap-2 tw-mb-0">
|
|
<ul class="tw-flex tw-gap-2 tw-mb-0">
|
|
- <li @click="upScale" title="放大" style="line-height: 20px">
|
|
|
|
|
|
+ <li>
|
|
|
|
+ 待复核<span class="highlight-text">{{ store.status.totalCount }}</span>
|
|
|
|
+ </li>
|
|
|
|
+ </ul>
|
|
|
|
+ <ul class="tw-flex tw-gap-2 tw-mb-0">
|
|
|
|
+ <li @click="upScale" title="放大" class="line-height-20">
|
|
<PlusCircleOutlined
|
|
<PlusCircleOutlined
|
|
- style="font-size: 20px"
|
|
|
|
|
|
+ class="icon-font-size-20"
|
|
:style="{
|
|
:style="{
|
|
color: greaterThanOneScale ? 'red' : 'white',
|
|
color: greaterThanOneScale ? 'red' : 'white',
|
|
}"
|
|
}"
|
|
/>
|
|
/>
|
|
</li>
|
|
</li>
|
|
- <li @click="downScale" title="缩小" style="line-height: 20px">
|
|
|
|
|
|
+ <li @click="downScale" title="缩小" class="line-height-20">
|
|
<MinusCircleOutlined
|
|
<MinusCircleOutlined
|
|
- style="font-size: 20px"
|
|
|
|
|
|
+ class="icon-font-size-20"
|
|
:style="{
|
|
:style="{
|
|
color: lessThanOneScale ? 'red' : 'white',
|
|
color: lessThanOneScale ? 'red' : 'white',
|
|
}"
|
|
}"
|
|
/>
|
|
/>
|
|
</li>
|
|
</li>
|
|
- <li @click="normalScale" title="适应" style="line-height: 20px">
|
|
|
|
- <FullscreenOutlined style="font-size: 20px" />
|
|
|
|
|
|
+ <li @click="normalScale" title="适应" class="line-height-20">
|
|
|
|
+ <FullscreenOutlined class="icon-font-size-20" />
|
|
</li>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
- <div @click="toggleSettingMode" style="line-height: 20px">
|
|
|
|
- {{ modeName }} {{ store.setting.forceMode ? "" : "(切换)" }}
|
|
|
|
- </div>
|
|
|
|
- <div @click="toggleHistory" style="line-height: 20px" title="回看">
|
|
|
|
- <HistoryOutlined style="font-size: 20px" />
|
|
|
|
|
|
+ <div @click="toggleHistory" class="line-height-20" title="回看">
|
|
|
|
+ <HistoryOutlined class="icon-font-size-20" />
|
|
</div>
|
|
</div>
|
|
<div class="tw-flex tw-place-items-center">
|
|
<div class="tw-flex tw-place-items-center">
|
|
- <UserOutlined style="font-size: 18px; line-height: 18px" />{{
|
|
|
|
- store.setting.userName
|
|
|
|
- }}
|
|
|
|
|
|
+ <UserOutlined class="icon-with-text" />{{ store.setting.userName }}
|
|
</div>
|
|
</div>
|
|
<div class="tw-flex tw-place-items-center">
|
|
<div class="tw-flex tw-place-items-center">
|
|
- <PoweroffOutlined style="font-size: 18px; line-height: 18px" />退出
|
|
|
|
|
|
+ <PoweroffOutlined class="icon-with-text" />关闭
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
-import { getGroups, getHistoryTask } from "@/api/markPage";
|
|
|
|
|
|
+import { getInspectedHistory } from "@/api/inspectPage";
|
|
import { computed, defineComponent } from "vue";
|
|
import { computed, defineComponent } from "vue";
|
|
import { store } from "./store";
|
|
import { store } from "./store";
|
|
import {
|
|
import {
|
|
@@ -66,6 +66,7 @@ import {
|
|
QuestionCircleOutlined,
|
|
QuestionCircleOutlined,
|
|
} from "@ant-design/icons-vue";
|
|
} from "@ant-design/icons-vue";
|
|
import { ModeEnum } from "@/types";
|
|
import { ModeEnum } from "@/types";
|
|
|
|
+import { useRoute } from "vue-router";
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: "MarkHeader",
|
|
name: "MarkHeader",
|
|
@@ -80,36 +81,27 @@ export default defineComponent({
|
|
QuestionCircleOutlined,
|
|
QuestionCircleOutlined,
|
|
},
|
|
},
|
|
setup() {
|
|
setup() {
|
|
- const modeName = computed(() =>
|
|
|
|
- store.setting.mode === ModeEnum.TRACK ? "轨迹模式" : "普通模式"
|
|
|
|
- );
|
|
|
|
- function toggleSettingMode() {
|
|
|
|
- if (store.setting.mode === ModeEnum.TRACK) {
|
|
|
|
- store.setting.mode = ModeEnum.COMMON;
|
|
|
|
- } else {
|
|
|
|
- store.setting.mode = ModeEnum.TRACK;
|
|
|
|
- }
|
|
|
|
- if (store.currentMarkResult) {
|
|
|
|
- store.currentMarkResult.scoreList = [];
|
|
|
|
- store.currentMarkResult.trackList = [];
|
|
|
|
- }
|
|
|
|
- if (store.currentTask) {
|
|
|
|
- store.currentTask.questionList.forEach((q) => (q.score = null));
|
|
|
|
- }
|
|
|
|
- store.currentQuestion = undefined;
|
|
|
|
- store.currentScore = undefined;
|
|
|
|
- }
|
|
|
|
- const progress = computed(() => {
|
|
|
|
- const { totalCount, markedCount } = store.status;
|
|
|
|
- if (totalCount <= 0) return 0;
|
|
|
|
- let p = markedCount / totalCount;
|
|
|
|
- if (p < 0.01 && markedCount >= 1) p = 0.01;
|
|
|
|
- p = Math.floor(p * 100);
|
|
|
|
- return p;
|
|
|
|
- });
|
|
|
|
- const group = computed(() => {
|
|
|
|
- return store.groups.find((g) => g.number === store.setting.groupNumber);
|
|
|
|
- });
|
|
|
|
|
|
+ const route = useRoute();
|
|
|
|
+ let isSingleStudent = !!route.params.studentId;
|
|
|
|
+ const {
|
|
|
|
+ studentId,
|
|
|
|
+ subjectCode,
|
|
|
|
+ startScore,
|
|
|
|
+ endScore,
|
|
|
|
+ mainNumber,
|
|
|
|
+ mainStartScore,
|
|
|
|
+ mainEndScore,
|
|
|
|
+ questionScore,
|
|
|
|
+ } = route.query as {
|
|
|
|
+ studentId: string;
|
|
|
|
+ subjectCode: string;
|
|
|
|
+ startScore: string;
|
|
|
|
+ endScore: string;
|
|
|
|
+ mainNumber: string;
|
|
|
|
+ mainStartScore: string;
|
|
|
|
+ mainEndScore: string;
|
|
|
|
+ questionScore: string;
|
|
|
|
+ };
|
|
|
|
|
|
const upScale = () => {
|
|
const upScale = () => {
|
|
const s = store.setting.uiSetting["answer.paper.scale"];
|
|
const s = store.setting.uiSetting["answer.paper.scale"];
|
|
@@ -134,30 +126,17 @@ export default defineComponent({
|
|
return store.setting.uiSetting["answer.paper.scale"] < 1;
|
|
return store.setting.uiSetting["answer.paper.scale"] < 1;
|
|
});
|
|
});
|
|
|
|
|
|
- async function switchGroupDialog() {
|
|
|
|
- const groups = await getGroups();
|
|
|
|
- console.log(groups);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
async function updateHistoryTask({
|
|
async function updateHistoryTask({
|
|
pageNumber = 1,
|
|
pageNumber = 1,
|
|
pageSize = 10,
|
|
pageSize = 10,
|
|
- order = "markerTime",
|
|
|
|
- sort = "DESC",
|
|
|
|
- secretNumber = null,
|
|
|
|
}: {
|
|
}: {
|
|
pageNumber: number; // 从1开始
|
|
pageNumber: number; // 从1开始
|
|
pageSize: number;
|
|
pageSize: number;
|
|
- order: "markerTime" | "markerScore";
|
|
|
|
- sort: "ASC" | "DESC";
|
|
|
|
- secretNumber: string | null;
|
|
|
|
}) {
|
|
}) {
|
|
- const res = await getHistoryTask({
|
|
|
|
|
|
+ const res = await getInspectedHistory({
|
|
pageNumber,
|
|
pageNumber,
|
|
pageSize,
|
|
pageSize,
|
|
- order,
|
|
|
|
- sort,
|
|
|
|
- secretNumber,
|
|
|
|
|
|
+ subjectCode,
|
|
});
|
|
});
|
|
if (res.data) {
|
|
if (res.data) {
|
|
store.historyTasks.push(res.data);
|
|
store.historyTasks.push(res.data);
|
|
@@ -166,10 +145,6 @@ export default defineComponent({
|
|
|
|
|
|
return {
|
|
return {
|
|
store,
|
|
store,
|
|
- modeName,
|
|
|
|
- toggleSettingMode,
|
|
|
|
- progress,
|
|
|
|
- group,
|
|
|
|
upScale,
|
|
upScale,
|
|
downScale,
|
|
downScale,
|
|
normalScale,
|
|
normalScale,
|
|
@@ -177,18 +152,32 @@ export default defineComponent({
|
|
lessThanOneScale,
|
|
lessThanOneScale,
|
|
updateHistoryTask,
|
|
updateHistoryTask,
|
|
toggleHistory,
|
|
toggleHistory,
|
|
- switchGroupDialog,
|
|
|
|
};
|
|
};
|
|
},
|
|
},
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
-.header-bg {
|
|
|
|
|
|
+.header-container {
|
|
|
|
+ z-index: 10000;
|
|
|
|
+ position: relative;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ height: 40px;
|
|
|
|
+
|
|
background-color: #5d6d7d;
|
|
background-color: #5d6d7d;
|
|
color: white;
|
|
color: white;
|
|
}
|
|
}
|
|
.highlight-text {
|
|
.highlight-text {
|
|
color: #ffe400;
|
|
color: #ffe400;
|
|
}
|
|
}
|
|
|
|
+.icon-font-size-20 {
|
|
|
|
+ font-size: 20px;
|
|
|
|
+}
|
|
|
|
+.line-height-20 {
|
|
|
|
+ line-height: 20px;
|
|
|
|
+}
|
|
|
|
+.icon-with-text {
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ line-height: 18px;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|