Browse Source

feat: 回评列表样式&评卷页面逻辑调整

chenhao 2 years ago
parent
commit
35646a2b4a
2 changed files with 27 additions and 12 deletions
  1. 13 4
      src/components/shared/RemarkListModal.vue
  2. 14 8
      src/modules/marking/mark/index.vue

+ 13 - 4
src/components/shared/RemarkListModal.vue

@@ -6,6 +6,7 @@
       :columns="tableColumns"
       :columns="tableColumns"
       :data="markHistoryList"
       :data="markHistoryList"
       highlight-current-row
       highlight-current-row
+      :max-height="useVW(620)"
       @current-change="onCurrentChange"
       @current-change="onCurrentChange"
     ></base-table>
     ></base-table>
     <div v-else class="flex flex-wrap justify-between preview-list">
     <div v-else class="flex flex-wrap justify-between preview-list">
@@ -91,12 +92,20 @@ const onCancel = () => {
 
 
 <style scoped lang="scss">
 <style scoped lang="scss">
 .preview-list {
 .preview-list {
+  max-height: 620px;
+  padding: 8px;
+  overflow: auto;
   .preview-item {
   .preview-item {
-    width: 250px;
-    height: 300px;
-    border: 1px solid transparent;
+    width: 230px;
+    border: 1px solid;
+    border-color: transparent;
+    margin-bottom: 8px;
+    text-align: center;
+    border-radius: 6px;
+    padding: 6px;
     &.current {
     &.current {
-      border: $OnePixelLine;
+      // border-color: $color--primary;
+      box-shadow: 0 0 4px $color--primary;
     }
     }
     img {
     img {
       max-width: 100%;
       max-width: 100%;

+ 14 - 8
src/modules/marking/mark/index.vue

@@ -120,9 +120,10 @@ const {
   onViewStandard,
   onViewStandard,
 } = useMarkHeader()
 } = useMarkHeader()
 
 
-type TaskInfoType =
-  | ExtractArrayValue<ExtractApiResponse<'getMarkingTask'>>
-  | ExtractArrayValue<ExtractApiResponse<'getMarkHistory'>>
+type HistoryTaskType = ExtractArrayValue<ExtractApiResponse<'getMarkHistory'>>
+type FormalTaskType = ExtractArrayValue<ExtractApiResponse<'getMarkingTask'>>
+
+type TaskInfoType = FormalTaskType | HistoryTaskType
 
 
 let currentTaskPool: ExtractApiResponse<'getMarkingTask'> = []
 let currentTaskPool: ExtractApiResponse<'getMarkingTask'> = []
 
 
@@ -231,9 +232,14 @@ const onConfirmProblem = async () => {
 
 
 /** 返回 */
 /** 返回 */
 const onBack = () => {
 const onBack = () => {
-  replace({
-    name: 'MarkingNav',
-  })
+  /** 回评时返回到正评, 否则返回到评卷员主页 */
+  if (currentTaskType.value === 'remarking') {
+    currentTask.value = void 0
+  } else {
+    replace({
+      name: 'MarkingNav',
+    })
+  }
 }
 }
 
 
 /** 刷新 */
 /** 刷新 */
@@ -291,8 +297,8 @@ const { drawing, dataUrl } = useSetImgBg(imgOption)
 
 
 watch(currentTask, () => {
 watch(currentTask, () => {
   resume()
   resume()
-  modelScore.value = []
-  scoringPanelVisible.value = true
+  modelScore.value = (currentTask?.value as HistoryTaskType)?.markerScores || []
+  scoringPanelVisible.value = !!currentTask?.value
 })
 })
 
 
 getMarkStatus()
 getMarkStatus()