|
@@ -3,8 +3,10 @@
|
|
|
<div class="check-menu">
|
|
|
<div class="check-menu-head">
|
|
|
<a-tabs v-model:activeKey="menuKey" size="small" @change="menuChange">
|
|
|
- <a-tab-pane key="examNumber" tab="准考证号"></a-tab-pane>
|
|
|
- <a-tab-pane key="question" tab="客观题"></a-tab-pane>
|
|
|
+ <a-tab-pane key="zkzh" tab="准考证号"></a-tab-pane>
|
|
|
+ <a-tab-pane key="dx" tab="多选"></a-tab-pane>
|
|
|
+ <a-tab-pane key="kx" tab="空选"></a-tab-pane>
|
|
|
+ <a-tab-pane key="xy" tab="嫌疑"></a-tab-pane>
|
|
|
</a-tabs>
|
|
|
</div>
|
|
|
<div class="check-menu-body">
|
|
@@ -29,6 +31,7 @@
|
|
|
:page-size="pageSize"
|
|
|
@change="onChangeListPage"
|
|
|
/>
|
|
|
+ <div class="page-total">{{ total }}条</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="check-body">
|
|
@@ -56,7 +59,12 @@ import {
|
|
|
|
|
|
import { DataCheckListFilter, DataCheckListItem } from "@/ap/types/dataCheck";
|
|
|
import { allCheckList, fetchAndParseData, getExamNumberInfo } from "./api";
|
|
|
-import { StudentPage, AllCheckFilter, StudentCheckItem } from "./types";
|
|
|
+import {
|
|
|
+ StudentPage,
|
|
|
+ AllCheckFilter,
|
|
|
+ StudentCheckItem,
|
|
|
+ MenuKey,
|
|
|
+} from "./types";
|
|
|
import { useDataCheckStore, useAppStore } from "@/store";
|
|
|
|
|
|
import SimplePagination from "@/components/SimplePagination/index.vue";
|
|
@@ -72,17 +80,17 @@ const dataCheckStore = useDataCheckStore();
|
|
|
const appStore = useAppStore();
|
|
|
dataCheckStore.resetInfo();
|
|
|
|
|
|
-const menuKey = ref("");
|
|
|
+const menuKey = ref<MenuKey>("zkzh");
|
|
|
|
|
|
-let searchModel = {} as DataCheckListFilter;
|
|
|
+let searchModel: AllCheckFilter = {
|
|
|
+ imageName: "",
|
|
|
+ isCheck: true,
|
|
|
+ menuKey: "zkzh",
|
|
|
+};
|
|
|
const pageNumber = ref(1);
|
|
|
const pageSize = ref(50);
|
|
|
const total = ref(0);
|
|
|
const pageCount = ref(0);
|
|
|
-const menuStudents = ref<{
|
|
|
- examNumber: StudentCheckItem[];
|
|
|
- question: StudentCheckItem[];
|
|
|
-}>({ examNumber: [], question: [] });
|
|
|
const allStudentList = ref<StudentCheckItem[]>([]);
|
|
|
const studentList = ref<DataCheckListItem[]>([]);
|
|
|
const dataList = ref<StudentPage[]>([]);
|
|
@@ -93,17 +101,6 @@ async function getAllStudents(data: AllCheckFilter) {
|
|
|
const res = await allCheckList(data).catch(() => null);
|
|
|
loading.value = false;
|
|
|
if (!res) return;
|
|
|
- menuStudents.value = {
|
|
|
- examNumber: res.filter(
|
|
|
- (item) => !item.info || item.info.includes("准考证号")
|
|
|
- ),
|
|
|
- question: res.filter(
|
|
|
- (item) =>
|
|
|
- item.info &&
|
|
|
- !item.info.includes("准考证号") &&
|
|
|
- item.info.includes("客观题")
|
|
|
- ),
|
|
|
- };
|
|
|
|
|
|
allStudentList.value = res;
|
|
|
}
|
|
@@ -190,7 +187,8 @@ function parseStudentPageList(students: DataCheckListItem[]) {
|
|
|
|
|
|
// menu
|
|
|
async function menuChange() {
|
|
|
- allStudentList.value = menuStudents.value[menuKey.value];
|
|
|
+ searchModel = { ...searchModel, menuKey: menuKey.value };
|
|
|
+ await getAllStudents(searchModel);
|
|
|
total.value = allStudentList.value.length;
|
|
|
pageCount.value = Math.ceil(total.value / pageSize.value);
|
|
|
pageNumber.value = 1;
|
|
@@ -205,14 +203,7 @@ async function onChangeListPage(index: number) {
|
|
|
await onSelectStudent(0);
|
|
|
}
|
|
|
async function onSearch(data: AllCheckFilter) {
|
|
|
- await getAllStudents(data);
|
|
|
- if (menuKey.value && menuStudents.value[menuKey.value].length) {
|
|
|
- await menuChange();
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- const mk = menuStudents.value.examNumber.length ? "examNumber" : "question";
|
|
|
- menuKey.value = mk;
|
|
|
+ searchModel = { ...data };
|
|
|
await menuChange();
|
|
|
}
|
|
|
|
|
@@ -404,7 +395,7 @@ onMounted(async () => {
|
|
|
}
|
|
|
appStore.setState({ serverUrl: appConfig.base.serverUrl });
|
|
|
registShortcut();
|
|
|
- onSearch({ imageName: "", isCheck: true });
|
|
|
+ menuChange();
|
|
|
});
|
|
|
onBeforeUnmount(() => {
|
|
|
removeShortcut();
|