浏览代码

feat: 数据检查页面样式调整

chenhao 2 年之前
父节点
当前提交
85029254eb
共有 2 个文件被更改,包括 12 次插入5 次删除
  1. 5 1
      .gitignore
  2. 7 4
      src/features/admin/confirmPaper/ConfirmPaper.vue

+ 5 - 1
.gitignore

@@ -28,4 +28,8 @@ quokka*.js
 
 devLoginParams.ts
 
-dist.zip
+dist.zip
+
+metadata.md
+
+paper.json

+ 7 - 4
src/features/admin/confirmPaper/ConfirmPaper.vue

@@ -47,10 +47,10 @@
 
     <div class="tw-flex" style="height: calc(100% - 56px)">
       <div
-        style="flex: 0 1 420px"
+        style="flex: 0 1 420px; overflow: auto"
         class="tw-flex tw-flex-col tw-justify-between"
       >
-        <div class="tw-m-2">
+        <div class="tw-m-2 tw-flex-1 tw-overflow-auto">
           <div v-if="pageType === 'DATA_CHECK'">
             是否缺考:
             <a-radio-group v-if="student" v-model:value="student.absent">
@@ -79,7 +79,7 @@
                   group.subs.length
                 }})
               </h2>
-              <div class="tw-flex tw-gap-4">
+              <div class="tw-flex tw-flex-wrap tw-gap-4">
                 <div v-for="question in group.subs" :key="question.subNumber">
                   <span>{{ question.subNumber }}. </span>
                   <a-input
@@ -260,7 +260,9 @@ async function getSetting() {
 
 async function getNextStudent() {
   const wantedIndex = allIds.indexOf(currentStudentId);
-  student = await getStudent(allIds[wantedIndex + 1]);
+  if (allIds[wantedIndex + 1]) {
+    student = await getStudent(allIds[wantedIndex + 1]);
+  }
 }
 
 async function getPreviousStudent() {
@@ -339,6 +341,7 @@ async function saveStudentAnswer() {
     void message.error("保存失败,请刷新页面。");
   } else {
     void message.success("保存成功");
+    await getNextStudent()
   }
 
   if (setting.studentIds.length === 0) {