刘洋 2 years ago
parent
commit
e38c61d626
1 changed files with 17 additions and 7 deletions
  1. 17 7
      src/modules/marking/problem/index.vue

+ 17 - 7
src/modules/marking/problem/index.vue

@@ -31,13 +31,15 @@
         <div class="flex-1 p-base scroll-auto mark-content-paper img-wrap">
           <img :src="dataUrl" alt="" class="paper-img" :style="{ 'background-color': frontColor }" />
         </div>
-        <scoring-panel-with-confirm
-          :id="currentProblem?.taskId"
-          v-model:visible="scoringPanelVisible"
-          v-model:score="modelScore"
-          :main-number="currentProblem?.mainNumber"
-          @submit="onSubmit"
-        ></scoring-panel-with-confirm>
+        <div v-show="showScoreBoard">
+          <scoring-panel-with-confirm
+            :id="currentProblem?.taskId"
+            v-model:visible="scoringPanelVisible"
+            v-model:score="modelScore"
+            :main-number="currentProblem?.mainNumber"
+            @submit="onSubmit"
+          ></scoring-panel-with-confirm>
+        </div>
       </div>
       <div class="flex direction-column p-base radius-base fill-blank m-l-base table-view">
         <base-form size="small" :model="formModel" :items="formItems" :label-width="'78px'">
@@ -256,9 +258,17 @@ const {
   onCurrentChange,
 } = useTableCheck(problemHistory)
 
+const showScoreBoard = ref(false)
 watch(currentProblem, () => {
   if (currentProblem.value) {
     useFetch('viewProblemPaper').fetch({ id: currentProblem.value.id })
+    if (currentProblem.value.problemSolveType !== 'MARK' && currentProblem.value.problemSolveType !== 'REJECT') {
+      showScoreBoard.value = true
+    } else {
+      showScoreBoard.value = false
+    }
+  } else {
+    showScoreBoard.value = false
   }
 })