Browse Source

fix: 好多bug

zhangjie 8 tháng trước cách đây
mục cha
commit
8f1cf1a485

+ 2 - 0
src/render/ap/types/audit.ts

@@ -15,6 +15,8 @@ export interface ExamOverviewResult {
   assignedCheck: {
     todoCount: number;
   };
+  // 是否开启实时审核
+  enableSyncVerify: boolean;
 }
 
 export interface AuditBatchStudentPaper {

+ 14 - 1
src/render/styles/pages.less

@@ -55,6 +55,19 @@
       display: flex;
       flex-direction: column;
       justify-content: space-between;
+      position: relative;
+
+      &.is-disabled::after {
+        content: "";
+        display: block;
+        position: absolute;
+        top: 0;
+        left: 0;
+        right: 0;
+        bottom: 0;
+        z-index: 9;
+        background-color: rgba(255, 255, 255, 0.5);
+      }
 
       &-head,
       &-foot {
@@ -490,7 +503,7 @@
       > p {
         font-weight: 500;
         font-size: 16px;
-        color: @warning-color;
+        color: @error-color;
         line-height: 24px;
         margin-bottom: 8px;
 

+ 5 - 0
src/render/views/AbsentCheck/CheckAction.vue

@@ -295,6 +295,11 @@ const { loading: downloading, setLoading } = useLoading();
 const exportTypeDialogRef = ref();
 function onExport() {
   if (downloading.value) return;
+
+  if (!searchModel.subjectCode) {
+    message.error("请选择科目");
+    return;
+  }
   exportTypeDialogRef.value?.open();
 }
 

+ 1 - 1
src/render/views/Audit/Intime/index.vue

@@ -217,7 +217,7 @@ function setCurStudent(index: number) {
   curStudentIndex.value = index;
   curStudent.value = dataList.value[curStudentIndex.value];
   setTimeout(() => {
-    auditBodyImgs.value.scrollTop = 0;
+    auditBodyImgs.value?.scrollTop = 0;
   });
 }
 function getNextStudent() {

+ 21 - 2
src/render/views/Audit/Main/index.vue

@@ -18,7 +18,12 @@
     </div>
     <div class="home-body">
       <template v-if="overviewData">
-        <div class="audit-box">
+        <div
+          :class="[
+            'audit-box',
+            { 'is-disabled': !overviewData.enableSyncVerify },
+          ]"
+        >
           <div class="audit-box-head">
             <h4>实时审核</h4>
           </div>
@@ -36,7 +41,12 @@
           </div>
         </div>
 
-        <div class="audit-box">
+        <div
+          :class="[
+            'audit-box',
+            { 'is-disabled': overviewData.enableSyncVerify },
+          ]"
+        >
           <div class="audit-box-head">
             <h4>
               复核校验<span style="font-weight: normal">(人工绑定审核)</span>
@@ -141,6 +151,15 @@ async function getOverviewData() {
 }
 
 function toPage(name: string) {
+  if (!overviewData.value) return;
+
+  if (
+    (!overviewData.value.enableSyncVerify && name === "IntimeAudit") ||
+    (overviewData.value.enableSyncVerify && name === "ReviewAudit")
+  ) {
+    return;
+  }
+
   router.push({ name });
 }
 

+ 2 - 2
src/render/views/CurExam/index.vue

@@ -126,7 +126,7 @@
             </div>
             <div class="body">
               <div class="option">
-                审核员<span style="font-weight: normal">(人工绑定审核)</span>
+                审核员<span style="font-weight: normal">(第一遍审核)</span>
                 <p>
                   已完成:{{
                     allData.assignedCheck?.auditorFinishCount
@@ -136,7 +136,7 @@
                 </p>
               </div>
               <div class="option">
-                管理员
+                管理员<span style="font-weight: normal">(第二遍审核)</span>
                 <p>
                   已完成:{{
                     allData.assignedCheck?.adminFinishCount

+ 6 - 0
src/render/views/DataCheck/CheckAction.vue

@@ -424,6 +424,12 @@ const { loading: downloading, setLoading } = useLoading();
 const exportTypeDialogRef = ref();
 function onExport(type: string) {
   if (downloading.value) return;
+
+  const params = type === "common" ? searchModel : customSearchModel;
+  if (!params.subjectCode) {
+    message.error("请选择科目");
+    return;
+  }
   actionType.value = type;
   exportTypeDialogRef.value?.open();
 }

+ 1 - 1
src/render/views/DataCheck/SliceImage/CutImageDialog.vue

@@ -22,7 +22,7 @@
           class="element-resize-act"
           :active="['r', 'rb', 'b', 'lb', 'l', 'lt', 't', 'rt']"
         >
-          <div class="image-selection" :style="selectionStyle"></div>
+          <!-- <div class="image-selection" :style="selectionStyle"></div> -->
         </element-resize>
       </div>
 

+ 5 - 1
src/render/views/RecognizeCheck/RecogArbitrateEditDialog.vue

@@ -40,7 +40,7 @@
           </div>
         </div>
         <div class="recog-col is-static is-col2">
-          <div class="modal-box is-btn" @click="changePrevTaskDetail">
+          <div class="modal-box is-btn" @click="onPrev">
             <p class="box-title">左键</p>
             <p class="box-cont">上一个</p>
           </div>
@@ -223,6 +223,10 @@ function onConfirm() {
   emit("confirm", selectResult.value);
 }
 
+function onPrev() {
+  emit("prev");
+}
+
 // init
 watch(
   () => visible.value,

+ 1 - 0
src/render/views/RecognizeCheck/RecognizeImage.vue

@@ -131,6 +131,7 @@ function onImgScroll(e: Event) {
   }
 
   const imgBoxDom = arbitrateImgRef.value as HTMLDivElement;
+  if (!imgBoxDom) return;
   const scrollTop = imgBoxDom.scrollTop;
   const imgDom = imgBoxDom.firstChild as HTMLImageElement;
   const { clientHeight } = imgThumbRef.value as HTMLDivElement;

+ 3 - 3
src/render/views/ResultExport/MarkSite.vue

@@ -1,9 +1,9 @@
 <template>
-  <div class="m-b-16px">
+  <!-- <div class="m-b-16px">
     <qm-button type="primary" :icon="h(PlusCircleOutlined)" @click="onAdd"
       >新增评卷点信息</qm-button
     >
-  </div>
+  </div> -->
 
   <a-table
     :columns="columns"
@@ -16,7 +16,7 @@
     <template #bodyCell="{ column, index }">
       <template v-if="column.dataIndex === 'operation'">
         <qm-button type="link" @click="onEdit(index)">编辑</qm-button>
-        <qm-button type="link" @click="onDelete(index)">删除</qm-button>
+        <!-- <qm-button type="link" @click="onDelete(index)">删除</qm-button> -->
       </template>
     </template>
   </a-table>

+ 2 - 0
src/render/views/ResultExport/ModifyMarkSite.vue

@@ -18,12 +18,14 @@
         <select-course
           v-model:value="formData.subjectCode"
           :exam-id="userStore.curExam.id"
+          :disabled="isEdit"
         ></select-course>
       </a-form-item>
       <a-form-item name="paperType" label="条码值">
         <a-input
           v-model:value="formData.paperType"
           placeholder="请输入"
+          :disabled="isEdit"
         ></a-input>
       </a-form-item>
       <a-form-item name="oddNumber" label="奇数考场评卷点代码">

+ 2 - 1
src/render/views/Review/ReviewMarkPan.vue

@@ -92,8 +92,9 @@ function moveAreaStop(pos: MovePos) {
 
 function updateStaticSize() {
   const panDom = reviewMarkPanRef.value as HTMLDivElement;
+  if (!panDom) return;
   const parentDom = panDom.parentElement as HTMLDivElement;
-  if (!panDom || !parentDom) return;
+  if (!parentDom) return;
   panWidth = panDom.clientWidth;
   panHeight = panDom.clientHeight;
   limitWidth = parentDom.clientWidth;

+ 2 - 2
src/render/views/Review/index.vue

@@ -2,8 +2,8 @@
   <div class="review">
     <div class="review-head">
       <h2 v-if="reviewStore.curTask" class="review-title">
-        {{ reviewStore.curTask.examNumber }} - {{ reviewStore.curTask.name }} -
-        {{ userStore.curExam?.name }}
+        {{ reviewStore.curTask.subjectName }} -
+        {{ reviewStore.curTask.examNumber }} - {{ reviewStore.curTask.name }}
       </h2>
       <h2 v-else class="review-title">-</h2>