zhangjie hace 2 días
padre
commit
162d18b177

+ 0 - 2
src/components/shared/ScoringPanelItem.vue

@@ -272,7 +272,6 @@ const joinStringChart = (str: string, index: number, chart: string) => {
 }
 const confirmWithBtn = () => {
   emit('enter')
-  markStore.setCurQuestionScore(null)
 }
 const onViewPapers = () => {
   emit('view-papers')
@@ -307,7 +306,6 @@ const onValidScore = (e: any) => {
     if (oldScore && !scoreStrictValidFail(oldScore)) {
       nextTick(() => {
         emit('enter')
-        markStore.setCurQuestionScore(null)
       })
     }
     e.preventDefault()

+ 11 - 0
src/components/shared/ScoringPanelWithConfirm.vue

@@ -157,6 +157,17 @@ const buttonDisabled = computed(() => {
   return markStore.countdownTime > 0 || !modelScore.value.length
 })
 
+watch(
+  () => buttonDisabled.value,
+  (newVal) => {
+    if (!newVal) {
+      nextTick(() => {
+        ;(confirmButtonRef.value?.ref as unknown as HTMLButtonElement)?.focus()
+      })
+    }
+  }
+)
+
 /** 提交 */
 const onSubmit = (data: ExtractApiResponse<'getQuestionStruct'>) => {
   questionInfo.value = data

+ 50 - 1
src/modules/analysis/personnel-statistics/components/StatisticsPersonnel.vue

@@ -32,7 +32,43 @@
           {{ row.markerName }}</span
         >
         <span v-else-if="row.markingGroupNumber == 0">全体</span>
-        <span v-else>全组</span>
+        <span v-else>
+          <template v-if="row.isGroupTotalRow">
+            <el-tooltip effect="dark" content="双击收缩本组" placement="top">
+              <el-button size="small" link @click.stop="onExpendRow(row)">
+                <minus
+                  style="
+                    width: 1em;
+                    height: 1em;
+                    margin-right: 5px;
+                    margin-top: -3px;
+                    vertical-align: middle;
+                    color: #0091ff;
+                  "
+                />
+              </el-button>
+            </el-tooltip>
+            <span>全组</span>
+          </template>
+          <template v-else>
+            <el-tooltip effect="dark" content="双击展开本组" placement="top">
+              <el-button size="small" link @click.stop="onExpendRow(row)">
+                <plus
+                  style="
+                    width: 1em;
+                    height: 1em;
+                    margin-right: 5px;
+                    margin-top: -3px;
+                    vertical-align: middle;
+                    color: #0091ff;
+                  "
+                />
+              </el-button>
+            </el-tooltip>
+
+            <span>第{{ row.markingGroupNumber }}组</span>
+          </template>
+        </span>
       </template>
     </base-table>
   </div>
@@ -69,6 +105,7 @@
 import { ref, inject, computed, watch, nextTick, unref } from 'vue'
 import { useRouter, useRoute } from 'vue-router'
 import { ElButton, ElPopover, ElMenu, ElMenuItem, ElIcon, ElMessage } from 'element-plus'
+import { Plus, Minus } from '@element-plus/icons-vue'
 import VueECharts from 'vue-echarts'
 import BaseTable from '@/components/element/BaseTable.vue'
 import SetWorkload from './SetWorkload.vue'
@@ -101,6 +138,9 @@ const props = defineProps<{
   filterColumns?: any
   result?: any
 }>()
+const emits = defineEmits<{
+  (e: 'expend-row', value: number): void
+}>()
 const rowClassName = (obj: any) => {
   if (obj.row.markingGroupNumber === 0) {
     return 'fixed-row'
@@ -330,7 +370,16 @@ const data = computed(() => {
 })
 
 const { tableRef, tableData, current, onCurrentChange, onDbClick, currentView, elTableRef } = useTableCheck(data, false)
+
+const onExpendRow = (row: any) => {
+  emits('expend-row', row.markingGroupNumber)
+}
 const myDbClick = (row: any, column: any, e: any) => {
+  if (row.markerDetails) {
+    onExpendRow(row)
+    return
+  }
+
   onDbClick(row, column, e)
   if (currentView.value && !!currentView.value.markingGroupNumber && !!currentView.value.markerId) {
     push({

+ 10 - 4
src/modules/analysis/personnel-statistics/index.vue

@@ -26,7 +26,7 @@
     </div>
     <div v-loading="loading" class="flex-1 p-small">
       <component
-        :is="fetchModel.expand ? StatisticsPersonnel : StatisticsGroup"
+        :is="StatisticsPersonnel"
         :data="data"
         :params="fetchModel"
         :filter-columns="filterColumns"
@@ -65,7 +65,7 @@ import useFetch from '@/hooks/useFetch'
 import useVW from '@/hooks/useVW'
 import useStatisticsFilter from './hooks/useStatisticsFilter'
 import useMainStore from '@/store/main'
-import StatisticsGroup from './components/StatisticsGroup.vue'
+// import StatisticsGroup from './components/StatisticsGroup.vue'
 import StatisticsPersonnel from './components/StatisticsPersonnel.vue'
 import { Setting } from '@element-plus/icons-vue'
 import BaseDialog from '@/components/element/BaseDialog.vue'
@@ -217,7 +217,7 @@ const data = computed<ExtractApiResponse<'getStatisticsByGroup'>>(() => {
   let expandData = groupList
     .filter((v) => v.markingGroupNumber !== 0)
     .reduce((total, cur) => {
-      if (!fetchModel.value.expand && !expendGroupNumbers.value.includes(cur.markingGroupNumber)) {
+      if (!expendGroupNumbers.value.includes(cur.markingGroupNumber)) {
         total.push({ ...cur, isGroupTotalRow: false })
         return total
       }
@@ -298,7 +298,13 @@ watchEffect(() => {
 watch(
   () => fetchModel.value.expand,
   (val) => {
-    expendGroupNumbers.value = []
+    if (val) {
+      expendGroupNumbers.value = (result?.value || [])
+        .filter((v) => v.markingGroupNumber !== 0)
+        .map((v) => v.markingGroupNumber)
+    } else {
+      expendGroupNumbers.value = []
+    }
   }
 )
 

+ 1 - 0
src/modules/marking/mark/index.vue

@@ -376,6 +376,7 @@ const onSubmit: InstanceType<typeof ScoringPanelWithConfirm>['onSubmit'] = async
       taskType: currentTask.value.taskType,
     })
     mainStore.setMarkerPausedLimit(submitResult?.markerPausedLimit || 0)
+    markStore.setCurQuestionScore(null)
     let bool = await checkMarkStatus()
     // if (!bool) {
     //   return false

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

@@ -52,6 +52,8 @@
               v-model:score="modelScore"
               :main-number="currentProblem?.mainNumber"
               :subject-code="formModel.subjectCode"
+              :image-list="currentImageList"
+              show-all-paper-btn
               @submit="onSubmit"
             ></scoring-panel-with-confirm>
           </div>
@@ -107,7 +109,7 @@
 /** 问题卷查看 */
 import { reactive, ref, computed, watch, nextTick } from 'vue'
 import { ElButton, ElMessage } from 'element-plus'
-import { add } from '@/utils/common'
+import { add, getTaskImageUrl } from '@/utils/common'
 import { useSetImgBg } from '@/hooks/useSetImgBg'
 import useVW from '@/hooks/useVW'
 import useFetch from '@/hooks/useFetch'
@@ -362,6 +364,11 @@ const imgOption = computed<SetImgBgOption>(() => {
 
 const { drawing, dataUrl } = useSetImgBg(imgOption, frontColor, setFrontColor)
 
+// full paper view
+const currentImageList = computed(() => {
+  return getTaskImageUrl(currentProblem.value?.filePath)
+})
+
 // const currentProblemImageList = computed(() => {
 //   const filePath = currentProblem.value?.filePath
 //   if (!filePath) {