刘洋 10 달 전
부모
커밋
fda522e0be
4개의 변경된 파일17개의 추가작업 그리고 5개의 파일을 삭제
  1. 0 1
      src/App.vue
  2. 1 1
      src/modules/marking/arbitration/index.vue
  3. 1 1
      src/modules/marking/problem/index.vue
  4. 15 2
      src/modules/marking/repeat/index.vue

+ 0 - 1
src/App.vue

@@ -28,7 +28,6 @@ const onlineCheckInterval = () => {
 }
 onlineIntervalWorker.onmessage = (e: any) => {
   const data = e.data
-  console.log('data', data)
   if (typeof e.data === 'boolean') {
     isActive.value = !!data
   } else if (e.data === '') {

+ 1 - 1
src/modules/marking/arbitration/index.vue

@@ -20,7 +20,7 @@
           </span>
           <!-- <right-button class="next-button" @click="checkNext" /> -->
           <div class="flex-1 p-base scroll-auto mark-content-paper img-wrap">
-            <img :src="dataUrl" alt="" class="paper-img" :style="{ 'background-color': frontColor }" />
+            <img v-if="!!dataUrl" :src="dataUrl" alt="" class="paper-img" :style="{ 'background-color': frontColor }" />
             <p v-if="currentArbitration" class="absolute question-info">
               {{ currentArbitration.mainNumber + '-' + currentArbitration.mainName }}
             </p>

+ 1 - 1
src/modules/marking/problem/index.vue

@@ -37,7 +37,7 @@
           <p v-if="currentProblem" class="absolute mark-score">{{ currentProblem.markScore }}</p>
           <!-- <right-button class="next-button" @click="checkNext" /> -->
           <div class="flex-1 p-base scroll-auto mark-content-paper img-wrap">
-            <img :src="dataUrl" alt="" class="paper-img" :style="{ 'background-color': frontColor }" />
+            <img v-if="!!dataUrl" :src="dataUrl" alt="" class="paper-img" :style="{ 'background-color': frontColor }" />
           </div>
           <div v-show="showScoreBoard">
             <scoring-panel-with-confirm

+ 15 - 2
src/modules/marking/repeat/index.vue

@@ -11,6 +11,7 @@
         size="small"
         type="primary"
         :disabled="!currentReMarkPaper"
+        :loading="confirmLoading"
         @click="onConfirmReMark"
       >
         确认
@@ -301,11 +302,23 @@ const onSearch = async () => {
 
 const { fetch: confirmReMarkPaper } = useFetch('confirmReMarkPaper')
 
+const confirmLoading = ref(false)
+const hideLoading = () => {
+  setTimeout(() => {
+    confirmLoading.value = false
+  })
+}
 /** 确认重评 */
 const onConfirmReMark = async () => {
   if (currentReMarkPaper.value?.id) {
-    await confirmReMarkPaper({ id: currentReMarkPaper.value.id })
-    await onSearch()
+    confirmLoading.value = true
+    try {
+      await confirmReMarkPaper({ id: currentReMarkPaper.value.id })
+      await onSearch()
+      hideLoading()
+    } catch (e) {
+      hideLoading()
+    }
   }
 }