浏览代码

Merge branch 'master' into hotfix_release_v1.3.7_20221009

chenhao 2 年之前
父节点
当前提交
218d9b1a2c

+ 5 - 1
.gitignore

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

+ 2 - 2
src/components/QmButton.vue

@@ -27,10 +27,10 @@ let parentOnClick = attrs.onClick as (e: Event) => void;
 delete newAttrs["onClick"];
 delete newAttrs["onClick"];
 
 
 let inInterval = $ref(false);
 let inInterval = $ref(false);
-const insideClick = (e: PointerEvent) => {
+const insideClick = (e: PointerEvent | MouseEvent) => {
   // console.log(e.pointerType);
   // console.log(e.pointerType);
   // 不允许键盘触发按钮事件,因为全局监听键盘事件的太多了
   // 不允许键盘触发按钮事件,因为全局监听键盘事件的太多了
-  if (e.pointerType === "") return;
+  if (e instanceof PointerEvent && e.pointerType === "") return;
   inInterval = true;
   inInterval = true;
   // false warning
   // false warning
   // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
   // eslint-disable-next-line @typescript-eslint/no-unsafe-argument

+ 8 - 5
src/features/admin/confirmPaper/ConfirmPaper.vue

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

+ 2 - 2
src/features/mark/MarkChangeProfile.vue

@@ -11,8 +11,8 @@
     <a-form
     <a-form
       labelAlign="right"
       labelAlign="right"
       :labelCol="{ span: 4 }"
       :labelCol="{ span: 4 }"
-      @keydown.stop
-      @keypress.stop
+      @keydown.stop=""
+      @keypress.stop=""
     >
     >
       <a-form-item class="tw-mb-2" :required="true" label="姓名">
       <a-form-item class="tw-mb-2" :required="true" label="姓名">
         <a-input v-model:value="user.name" placeholder="姓名" />
         <a-input v-model:value="user.name" placeholder="姓名" />

+ 2 - 2
src/features/mark/MarkHistory.vue

@@ -13,8 +13,8 @@
         type="text"
         type="text"
         placeholder="查找试卷"
         placeholder="查找试卷"
         class="tw-flex-1 tw-rounded tw-h-8 tw-pl-1 tw-pr-8"
         class="tw-flex-1 tw-rounded tw-h-8 tw-pl-1 tw-pr-8"
-        @keydown.stop
-        @keypress.stop
+        @keydown.stop=""
+        @keypress.stop=""
         @keyup.enter="searchHistoryTask"
         @keyup.enter="searchHistoryTask"
       />
       />
       <SearchOutlined
       <SearchOutlined