zhangjie 8 месяцев назад
Родитель
Сommit
08d95163a3

+ 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;

+ 4 - 11
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";
@@ -165,7 +165,7 @@ const dataCheckStore = useDataCheckStore();
 const { optionList: imageTypeOptions } = useDictOption("IMAGE_TYPE");
 const panelKey = ref(["1", "2", "3", "4"]);
 
-const absentCheckOptions = ref([]);
+const absentCheckOptions = ref([] as DefaultOptionType[]);
 async function getAbsentCheckOptions() {
   const res = await examNumberFillCount(userStore.curExam.id);
   absentCheckOptions.value = [
@@ -200,10 +200,9 @@ const initSearchModel = {
   studentCode: "",
   name: "",
   subjectCode: "",
-  examStatus: [],
+  examStatus: "",
 };
 const searchModel = reactive<AbsentCheckListFilter>({ ...initSearchModel });
-const searchDataCheckType = ref("");
 const imageType = ref(dataCheckStore.imageType);
 
 // imageType
@@ -226,12 +225,6 @@ function onExamNumberEdited(val: string) {
   searchModel.examNumber = val;
 }
 
-function absentCheckTypeChange() {
-  searchModel.examStatus = searchDataCheckType
-    ? [searchDataCheckType.value]
-    : [];
-}
-
 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);
 }