Parcourir la source

Merge branch 'dev_1.0.0' of http://git.qmth.com.cn/scan-central/client-admin into dev_1.0.0

刘洋 il y a 8 mois
Parent
commit
f99dcdff2a

+ 9 - 0
src/render/ap/base.ts

@@ -88,3 +88,12 @@ export const cardInfo = (data: CardInfoParams): Promise<CardInfoResult> => {
     data,
   });
 };
+
+// 证号填涂位数获取
+export const examNumberFillCount = (examId: Number): Promise<number> => {
+  return request({
+    url: "/api/admin/exam/exam-number/fill-count",
+    method: "post",
+    data: { examId },
+  });
+};

+ 1 - 1
src/render/ap/types/absentCheck.ts

@@ -7,7 +7,7 @@ export interface AbsentCheckListFilter {
   studentCode: string;
   name: string;
   subjectCode: string;
-  examStatus: ExamStatus[];
+  examStatus: string;
 }
 
 export type AbsentCheckListParams = PageParams<AbsentCheckListFilter>;

+ 2 - 2
src/render/ap/types/dataCheck.ts

@@ -6,8 +6,8 @@ export type PaperTypeStatus = "OK" | "BLANK" | "ERROR";
 
 export interface DataCheckListFilter {
   examId: number;
-  status: DataStatus[];
-  examStatus: ExamStatus[];
+  status: string;
+  examStatus: string;
   examNumber: string;
   studentCode: string;
   name: string;

+ 0 - 5
src/render/constants/enumerate.ts

@@ -9,11 +9,6 @@ export const DATA_CHECK_TYPE = {
   6: "缺考有条码",
 };
 
-export const ABSENT_CHECK_TYPE = {
-  1: "缺考",
-  2: "正常",
-};
-
 export const PAPER_TYPE_STATUS = {
   OK: "正常",
   BLANK: "空白",

+ 0 - 2
src/render/hooks/dictOption.ts

@@ -4,7 +4,6 @@ import type { DefaultOptionType } from "ant-design-vue/es/vc-select/Select";
 import {
   DEFAULT_LABEL,
   DATA_CHECK_TYPE,
-  ABSENT_CHECK_TYPE,
   PAPER_TYPE_STATUS,
   EXAM_STATUS,
   EXAM_SIMPLE_STATUS,
@@ -15,7 +14,6 @@ import {
 
 const dicts = {
   DATA_CHECK_TYPE,
-  ABSENT_CHECK_TYPE,
   PAPER_TYPE_STATUS,
   EXAM_STATUS,
   EXAM_SIMPLE_STATUS,

+ 32 - 22
src/render/views/AbsentCheck/CheckAction.vue

@@ -18,11 +18,10 @@
           </a-form-item>
           <a-form-item label="查找条件">
             <a-select
-              v-model:value="searchDataCheckType"
+              v-model:value="searchModel.examStatus"
               placeholder="请选择"
               :options="absentCheckOptions"
               allow-clear
-              @change="absentCheckTypeChange"
             ></a-select>
           </a-form-item>
           <a-form-item label="考号">
@@ -131,6 +130,7 @@ import {
   RedoOutlined,
 } from "@ant-design/icons-vue";
 import { message } from "ant-design-vue";
+import type { DefaultOptionType } from "ant-design-vue/es/vc-select/Select";
 
 import { useUserStore, useDataCheckStore } from "@/store";
 import { AbsentCheckListFilter, ImportType } from "@/ap/types/absentCheck";
@@ -142,6 +142,7 @@ import {
   absentCheckRoomExport,
   examStatusSave,
 } from "@/ap/absentCheck";
+import { examNumberFillCount } from "@/ap/base";
 import useDictOption from "@/hooks/dictOption";
 import useLoading from "@/hooks/useLoading";
 
@@ -161,10 +162,37 @@ const emit = defineEmits(["search"]);
 const userStore = useUserStore();
 const dataCheckStore = useDataCheckStore();
 
-const { optionList: absentCheckOptions } = useDictOption("ABSENT_CHECK_TYPE");
 const { optionList: imageTypeOptions } = useDictOption("IMAGE_TYPE");
 const panelKey = ref(["1", "2", "3", "4"]);
 
+const absentCheckOptions = ref([] as DefaultOptionType[]);
+async function getAbsentCheckOptions() {
+  const res = await examNumberFillCount(userStore.curExam.id);
+  absentCheckOptions.value = [
+    {
+      label: "缺考",
+      value: "ABSENT",
+    },
+    {
+      label: "正常",
+      value: "OK",
+    },
+    {
+      label: "客观题未作答+主观题有作答(待确认)",
+      value: "UNCHECK1",
+    },
+    {
+      label: `客观题未作答+主观题未作答+填涂≥${res}+有卷型(待确认)`,
+      value: "UNCHECK2",
+    },
+    {
+      label: `交叉对比缺考不一致(待确认)`,
+      value: "UNCHECK3",
+    },
+  ];
+}
+getAbsentCheckOptions();
+
 // search
 const initSearchModel = {
   examId: userStore.curExam.id,
@@ -172,10 +200,9 @@ const initSearchModel = {
   studentCode: "",
   name: "",
   subjectCode: "",
-  examStatus: [],
+  examStatus: "",
 };
 const searchModel = reactive<AbsentCheckListFilter>({ ...initSearchModel });
-const searchDataCheckType = ref();
 const imageType = ref(dataCheckStore.imageType);
 
 // imageType
@@ -198,23 +225,6 @@ function onExamNumberEdited(val: string) {
   searchModel.examNumber = val;
 }
 
-function absentCheckTypeChange() {
-  switch (searchDataCheckType.value) {
-    // 缺考
-    case "1":
-      searchModel.examStatus = ["ABSENT"];
-      break;
-    // 正常
-    case "2":
-      searchModel.examStatus = ["OK"];
-      break;
-
-    default:
-      searchModel.examStatus = [];
-      break;
-  }
-}
-
 function onSearch() {
   emit("search", searchModel);
 }

+ 17 - 15
src/render/views/DataCheck/CheckAction.vue

@@ -118,12 +118,11 @@
             <a-col :span="16">
               <a-form-item label="缺考">
                 <a-select
-                  v-model:value="customExamStatus"
+                  v-model:value="customSearchModel.examStatus"
                   placeholder="请选择"
                   :options="examStatusOptions"
                   style="width: 85px"
                   allow-clear
-                  @change="customExamStatusChange"
                 ></a-select>
               </a-form-item>
             </a-col>
@@ -233,8 +232,8 @@ const fieldNames = { label: "name", value: "code" };
 // search
 const initSearchModel = {
   examId: userStore.curExam.id,
-  status: [] as DataStatus[],
-  examStatus: [] as ExamStatus[],
+  status: "",
+  examStatus: "",
   examNumber: "",
   studentCode: "",
   name: "",
@@ -258,7 +257,6 @@ const initSearchModel = {
 const searchModel = reactive<DataCheckListFilter>({ ...initSearchModel });
 const customSearchModel = reactive<DataCheckListFilter>({ ...initSearchModel });
 const searchDataCheckType = ref();
-const customExamStatus = ref<ExamStatus>();
 const imageType = ref(dataCheckStore.imageType);
 const actionType = ref("common");
 
@@ -285,7 +283,7 @@ function dataCheckTypeChange() {
   switch (searchDataCheckType.value) {
     // 缺考有作答
     case "1":
-      searchModel.examStatus = ["ABSENT"];
+      searchModel.examStatus = ["ABSENT"].join();
       searchModel.hasFilled = true;
       break;
     // 客观题无作答,主观题有作答;
@@ -295,13 +293,23 @@ function dataCheckTypeChange() {
       break;
     // 不缺考,无条码,有作答;(正常或待审核考生,条码为空,有作答)
     case "3":
-      searchModel.examStatus = ["OK", "UNCHECK"];
+      searchModel.examStatus = [
+        "OK",
+        "UNCHECK1",
+        "UNCHECK2",
+        "UNCHECK3",
+      ].join();
       searchModel.paperTypeStatus = "BLANK";
       searchModel.hasFilled = true;
       break;
     // 不缺考,无条码,无作答;(正常或待审核考生,条码为空,没有作答)
     case "4":
-      searchModel.examStatus = ["OK", "UNCHECK"];
+      searchModel.examStatus = [
+        "OK",
+        "UNCHECK1",
+        "UNCHECK2",
+        "UNCHECK3",
+      ].join();
       searchModel.paperTypeStatus = "BLANK";
       searchModel.hasFilled = false;
       break;
@@ -312,7 +320,7 @@ function dataCheckTypeChange() {
     // 缺考有条码
     case "6":
       searchModel.paperTypeStatus = "OK";
-      searchModel.examStatus = ["ABSENT"];
+      searchModel.examStatus = ["ABSENT"].join();
       break;
 
     default:
@@ -324,12 +332,6 @@ function dataCheckTypeChange() {
   }
 }
 
-function customExamStatusChange() {
-  customSearchModel.examStatus = customExamStatus.value
-    ? [customExamStatus.value]
-    : [];
-}
-
 function onSearch() {
   emit("search", searchModel);
 }