zhangjie пре 1 месец
родитељ
комит
7798158e05

+ 0 - 17
src/render/components.d.ts

@@ -9,20 +9,9 @@ declare module 'vue' {
   export interface GlobalComponents {
     AButton: typeof import('@qmth/ui')['Button']
     ACard: typeof import('@qmth/ui')['Card']
-    ACheckbox: typeof import('@qmth/ui')['Checkbox']
     ACol: typeof import('@qmth/ui')['Col']
-    ACollapse: typeof import('@qmth/ui')['Collapse']
-    ACollapsePanel: typeof import('@qmth/ui')['CollapsePanel']
-    ADescriptions: typeof import('@qmth/ui')['Descriptions']
-    ADescriptionsItem: typeof import('@qmth/ui')['DescriptionsItem']
     ADivider: typeof import('@qmth/ui')['Divider']
-    AForm: typeof import('@qmth/ui')['Form']
-    AFormItem: typeof import('@qmth/ui')['FormItem']
-    AInput: typeof import('@qmth/ui')['Input']
     AInputNumber: typeof import('@qmth/ui')['InputNumber']
-    AModal: typeof import('@qmth/ui')['Modal']
-    APagination: typeof import('@qmth/ui')['Pagination']
-    AProgress: typeof import('@qmth/ui')['Progress']
     ARadio: typeof import('@qmth/ui')['Radio']
     ARadioGroup: typeof import('@qmth/ui')['RadioGroup']
     ARow: typeof import('@qmth/ui')['Row']
@@ -30,18 +19,12 @@ declare module 'vue' {
     ASpace: typeof import('@qmth/ui')['Space']
     ASpin: typeof import('@qmth/ui')['Spin']
     ATable: typeof import('@qmth/ui')['Table']
-    ATableSummaryCell: typeof import('@qmth/ui')['TableSummaryCell']
-    ATableSummaryRow: typeof import('@qmth/ui')['TableSummaryRow']
     ATabPane: typeof import('@qmth/ui')['TabPane']
     ATabs: typeof import('@qmth/ui')['Tabs']
     ATag: typeof import('@qmth/ui')['Tag']
-    ATextarea: typeof import('@qmth/ui')['Textarea']
-    ATooltip: typeof import('@qmth/ui')['Tooltip']
     AUpload: typeof import('@qmth/ui')['Upload']
     QmButton: typeof import('@qmth/ui')['QmButton']
     QmConfigProvider: typeof import('@qmth/ui')['QmConfigProvider']
-    QmDateRangePicker: typeof import('@qmth/ui')['QmDateRangePicker']
-    QmLowForm: typeof import('@qmth/ui')['QmLowForm']
     RouterLink: typeof import('vue-router')['RouterLink']
     RouterView: typeof import('vue-router')['RouterView']
   }

+ 2 - 3
src/render/components/SimplePagination/index.vue

@@ -5,11 +5,10 @@
     class="simple-pagination"
     :total="total"
     :default-page-size="pageSize"
-    show-quick-jumper
-    :showTotal="(totalCount) => `共${totalCount}条`"
+    :showTotal="(total) => `${total}条`"
     :show-size-changer="false"
-    @change="onChange"
     simple
+    @change="onChange"
   >
     <template #itemRender="{ type, originalElement }">
       <template v-if="type === 'prev'">

+ 10 - 1
src/render/styles/pages.less

@@ -800,8 +800,17 @@
     &-page {
       flex-grow: 0;
       flex-shrink: 0;
-      padding: 8px 16px;
+      padding: 8px 70px 8px 16px;
       border-top: 1px solid @border-color1;
+      position: relative;
+
+      .page-total {
+        position: absolute;
+        right: 10px;
+        z-index: auto;
+        top: 8px;
+        line-height: 24px;
+      }
     }
   }
   .check-action {

+ 6 - 2
src/render/views/ExamNumberCheck/CheckAction.vue

@@ -62,7 +62,7 @@ import {
 } from "@/ap/types/dataCheck";
 import { SubjectItem } from "@/ap/types/base";
 import { ReviewExportType } from "@/ap/types/review";
-import { QuestionInfo } from "./types";
+import { QuestionInfo, AllCheckFilter } from "./types";
 
 import { dataCheckStudentExport, dataCheckRoomExport } from "@/ap/dataCheck";
 import { examStatusSave } from "@/ap/absentCheck";
@@ -82,7 +82,11 @@ const dataCheckStore = useDataCheckStore();
 const { save } = useUpload();
 
 const panelKey = ref(["1", "2"]);
-const searchModel = reactive<AllCheckFilter>({ imageName: "", isCheck: true });
+const searchModel = reactive<AllCheckFilter>({
+  imageName: "",
+  isCheck: true,
+  menuKey: "zkzh",
+});
 
 function onSearch() {
   // if (!searchModel.isCheck && !searchModel.imageName) {

+ 4 - 2
src/render/views/ExamNumberCheck/api.ts

@@ -1,4 +1,4 @@
-import { StudentCheckItem } from "./types";
+import { StudentCheckItem, AllCheckFilter } from "./types";
 import { useAppStore } from "@/store";
 import { randomCode } from "@/utils/tool";
 import axios from "axios";
@@ -13,12 +13,14 @@ export const allCheckList = async (
   //   return Promise.resolve([]);
   // }
 
-  const fname = params.isCheck ? "check" : "success";
+  const fname = params.isCheck ? `check-${params.menuKey}` : "success";
   const url = `${appStore.serverUrl}/${fname}.csv?${randomCode()}`;
   let students: StudentCheckItem[] = await fetchAndParseData(url);
   if (params.imageName) {
     students = students.filter((item) => item.imageName === params.imageName);
   }
+  console.log(students);
+
   const cacheList = await fetchCacheList();
   const data = (students || []).map((item) => {
     return {

+ 21 - 30
src/render/views/ExamNumberCheck/index.vue

@@ -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();

+ 2 - 0
src/render/views/ExamNumberCheck/types.ts

@@ -20,10 +20,12 @@ export interface QuestionInfo {
   examStatus: string;
   packageCode?: string;
 }
+export MenuKey = "zkzh" | "dx" | "kx" | "xy";
 
 export interface AllCheckFilter {
   imageName: string;
   isCheck: boolean;
+  menuKey: MenuKey;
 }
 
 export interface StudentCheckItem {