|
@@ -3,34 +3,43 @@
|
|
:style="{ display: store.historyOpen ? 'block' : 'none' }"
|
|
:style="{ display: store.historyOpen ? 'block' : 'none' }"
|
|
class="history-container tw-px-1"
|
|
class="history-container tw-px-1"
|
|
>
|
|
>
|
|
- <div class="tw-p-1" style="text-align: end">
|
|
|
|
- <a-button shape="circle" @click="store.historyOpen = false">
|
|
|
|
|
|
+ <div class="tw-p-1 tw-flex tw-justify-between tw-place-items-center">
|
|
|
|
+ <div class="tw-text-xl">回评</div>
|
|
|
|
+ <a-button
|
|
|
|
+ class="tw-content-end"
|
|
|
|
+ shape="circle"
|
|
|
|
+ @click="store.historyOpen = false"
|
|
|
|
+ >
|
|
<template #icon><CloseOutlined /></template>
|
|
<template #icon><CloseOutlined /></template>
|
|
</a-button>
|
|
</a-button>
|
|
</div>
|
|
</div>
|
|
- <div class="tw-flex tw-justify-between tw-mt-1 tw-mb-1">
|
|
|
|
|
|
+ <div class="tw-mt-1 tw-mb-1 tw-flex"></div>
|
|
|
|
+ <div class="tw-flex tw-justify-between">
|
|
<div>编号</div>
|
|
<div>编号</div>
|
|
<div>时间</div>
|
|
<div>时间</div>
|
|
<div>分数</div>
|
|
<div>分数</div>
|
|
</div>
|
|
</div>
|
|
- <div v-for="(task, index) of store.historyTasks" :key="index">
|
|
|
|
- <div
|
|
|
|
- @click="replaceCurrentTask(task)"
|
|
|
|
- class="tw-flex tw-justify-between tw-h-6 tw-place-items-center tw-rounded tw-cursor-pointer"
|
|
|
|
- >
|
|
|
|
- <div>{{ task.secretNumber }}</div>
|
|
|
|
- <div>
|
|
|
|
- {{ task.inspectTime && $filters.datetimeFilter(task.inspectTime) }}
|
|
|
|
- </div>
|
|
|
|
- <div style="width: 30px; text-align: center">
|
|
|
|
- {{ task.markerScore }}
|
|
|
|
|
|
+ <a-spin :spinning="loading" size="large" tip="Loading...">
|
|
|
|
+ <div v-for="(task, index) of store.historyTasks" :key="index">
|
|
|
|
+ <div
|
|
|
|
+ @click="replaceCurrentTask(task)"
|
|
|
|
+ class="tw-flex tw-justify-between tw-h-6 tw-place-items-center tw-rounded tw-cursor-pointer"
|
|
|
|
+ :class="store.currentTask === task && 'current-task'"
|
|
|
|
+ >
|
|
|
|
+ <div>{{ task.secretNumber }}</div>
|
|
|
|
+ <div>
|
|
|
|
+ {{ task.inspectTime && $filters.datetimeFilter(task.inspectTime) }}
|
|
|
|
+ </div>
|
|
|
|
+ <div style="width: 30px; text-align: center">
|
|
|
|
+ {{ task.markerScore }}
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
|
|
+ </a-spin>
|
|
<div class="tw-flex tw-justify-between tw-place-content-center tw-mt-2">
|
|
<div class="tw-flex tw-justify-between tw-place-content-center tw-mt-2">
|
|
- <div @click="previousPage">上一页</div>
|
|
|
|
|
|
+ <a-button @click="previousPage">上一页</a-button>
|
|
<div style="line-height: 30px">第{{ currentPage }}页</div>
|
|
<div style="line-height: 30px">第{{ currentPage }}页</div>
|
|
- <div @click="nextPage">下一页</div>
|
|
|
|
|
|
+ <a-button @click="nextPage">下一页</a-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -38,7 +47,7 @@
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
import { getInspectedHistory } from "@/api/inspectPage";
|
|
import { getInspectedHistory } from "@/api/inspectPage";
|
|
import { Task } from "@/types";
|
|
import { Task } from "@/types";
|
|
-import { defineComponent, reactive, ref, watchEffect } from "vue";
|
|
|
|
|
|
+import { defineComponent, ref, watch, watchEffect } from "vue";
|
|
import { useRoute } from "vue-router";
|
|
import { useRoute } from "vue-router";
|
|
import { store } from "./store";
|
|
import { store } from "./store";
|
|
import { CloseOutlined } from "@ant-design/icons-vue";
|
|
import { CloseOutlined } from "@ant-design/icons-vue";
|
|
@@ -46,6 +55,9 @@ import { CloseOutlined } from "@ant-design/icons-vue";
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: "MarkHistory",
|
|
name: "MarkHistory",
|
|
components: { CloseOutlined },
|
|
components: { CloseOutlined },
|
|
|
|
+ props: {
|
|
|
|
+ shouldReload: { type: Number, required: true },
|
|
|
|
+ },
|
|
emits: ["reload"],
|
|
emits: ["reload"],
|
|
setup(props, { emit }) {
|
|
setup(props, { emit }) {
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
@@ -63,6 +75,15 @@ export default defineComponent({
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ watch(
|
|
|
|
+ () => props.shouldReload,
|
|
|
|
+ async () => {
|
|
|
|
+ await updateHistoryTask({ pageNumber: currentPage.value });
|
|
|
|
+ // 提交后,渲染第一条
|
|
|
|
+ replaceCurrentTask(store.historyTasks[0]);
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+
|
|
const secretNumberInput = ref(null);
|
|
const secretNumberInput = ref(null);
|
|
const loading = ref(false);
|
|
const loading = ref(false);
|
|
const currentPage = ref(1);
|
|
const currentPage = ref(1);
|
|
@@ -122,4 +143,7 @@ export default defineComponent({
|
|
min-width: 250px;
|
|
min-width: 250px;
|
|
border-right: 1px solid grey;
|
|
border-right: 1px solid grey;
|
|
}
|
|
}
|
|
|
|
+.current-task {
|
|
|
|
+ background-color: aqua;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|