刘洋 8 hónapja
szülő
commit
41db717ac8

+ 6 - 1
src/render/views/AbsentCheck/index.vue

@@ -124,13 +124,18 @@ async function onChangeListPage(index: number) {
 async function onSearch(datas: AbsentCheckListFilter) {
   searchModel = { ...datas };
   if (!searchModel.subjectCode) {
+    total.value = 0;
+    pageCount.value = 0;
+    studentList.value = [];
+    dataCheckStore.resetInfo();
+    window.$message.error("请选择科目");
     return;
   }
   pageNumber.value = 1;
   await getList();
   selectPage(0);
 }
-onSearch({ examId: userStore.curExam.id } as AbsentCheckListFilter);
+// onSearch({ examId: userStore.curExam.id } as AbsentCheckListFilter);
 
 // student
 function onSelectStudent(index: number) {

+ 9 - 3
src/render/views/DataCheck/CheckAction.vue

@@ -115,7 +115,7 @@
             </a-col>
           </a-row>
           <a-row>
-            <a-col :span="16">
+            <a-col :span="14">
               <a-form-item label="缺考">
                 <a-select
                   v-model:value="customSearchModel.examStatus"
@@ -126,8 +126,8 @@
                 ></a-select>
               </a-form-item>
             </a-col>
-            <a-col :span="8">
-              <a-form-item>
+            <a-col :span="10">
+              <a-form-item style="text-align: right">
                 <a-button class="m-r-8px" type="primary" @click="onCustomSearch"
                   >查询</a-button
                 >
@@ -390,6 +390,12 @@ watch(
     immediate: true,
   }
 );
+watch(
+  () => dataCheckStore.imageType,
+  (val) => {
+    imageType.value = val;
+  }
+);
 
 async function onQuestionsChange() {
   if (!dataCheckStore.curPage) return;

+ 17 - 2
src/render/views/DataCheck/index.vue

@@ -120,13 +120,28 @@ async function onChangeListPage(index: number) {
   selectPage(0);
 }
 async function onSearch(datas: DataCheckListFilter) {
-  searchModel = { ...datas };
+  console.log("datas", datas);
+  searchModel = {
+    ...datas,
+    examStatus:
+      datas.examStatus === "UNCHECK"
+        ? "UNCHECK1,UNCHECK2,UNCHECK3"
+        : datas.examStatus,
+  };
   pageNumber.value = 1;
+  if (!searchModel.subjectCode) {
+    total.value = 0;
+    pageCount.value = 0;
+    studentList.value = [];
+    dataCheckStore.resetInfo();
+    window.$message.error("请选择科目");
+    return;
+  }
   await getList();
   selectPage(0);
 }
 
-onSearch({ examId: userStore.curExam.id } as DataCheckListFilter);
+// onSearch({ examId: userStore.curExam.id } as DataCheckListFilter);
 
 // student
 function onSelectStudent(index: number) {