فهرست منبع

监控-人员明细卷、人员数据统计-双击调用人员明细卷补充支持多选打回的功能

刘洋 1 سال پیش
والد
کامیت
60d76f476e

+ 1 - 3
src/components/shared/SendBackMark.vue

@@ -117,9 +117,7 @@ const onSendBack = async () => {
       ElMessage.warning('请选先选择一条评卷数据')
       return
     }
-    // const valid = await elFormRef?.value?.validate()
-    // if (valid) {
-    // await ApiMap[props.type]({ description: model.description, reason: model.reason, id: props.id })
+
     if (props.type === 'custom-check') {
       // await rejectCustomCheckData({ description: model.description, reason: model.reason, taskId: props.id })
       await rejectCustomCheckData({ description: model.description, reason: model.reason, taskIds: props.id })

+ 104 - 46
src/modules/analysis/marker-statistics/index.vue

@@ -50,13 +50,23 @@
               <div class="flex items-center p-t-base">
                 <el-button
                   :disabled="!current?.taskId"
-                  class="m-l-base m-r-auto"
+                  class="m-l-base"
                   size="small"
                   type="primary"
                   style="margin-bottom: 4px"
                   @click="onSendBack"
                   >打回</el-button
                 >
+                <el-button
+                  custom-1
+                  class="m-l-base m-r-auto"
+                  size="small"
+                  type="success"
+                  :disabled="!tableData?.length"
+                  style="margin-bottom: 4px"
+                  @click="multToggle"
+                  >{{ isMult ? '取消多选' : '多选' }}</el-button
+                >
                 <div class="flex-1 flex justify-end items-center">
                   <scoring-panel-with-confirm
                     :id="current?.taskId"
@@ -88,21 +98,6 @@
                 </div>
                 <div v-else></div>
                 <btn-pagination v-model="currentPage" :pagination="pagination"></btn-pagination>
-                <!-- <el-button custom-1 size="small" class="detail-info-label">
-                  <span class="">总数:</span>
-                  <span class="m-l-extra-small detail-info-label-num">{{ pagination.total }}</span>
-                </el-button>
-                <el-pagination
-                  v-bind="pagination"
-                  v-model:current-page="currentPage"
-                  size="small"
-                  class="m-t-unset"
-                  background
-                  right
-                  hide-on-single-page
-                  :pager-count="3"
-                  small
-                ></el-pagination> -->
               </div>
               <div class="flex-1 scroll-auto m-t-mini">
                 <base-table
@@ -114,11 +109,12 @@
                   height="100%"
                   :data="tableData"
                   :columns="columns"
-                  highlight-current-row
+                  :highlight-current-row="!isMult"
                   :cell-style="{ padding: '6px 0' }"
                   :memory-column="true"
                   @current-change="onCurrentChange"
                   @row-dblclick="onDbClick"
+                  @selection-change="handleSelectionChange"
                 ></base-table>
               </div>
             </pane>
@@ -136,12 +132,13 @@
     </div>
   </div>
   <image-preview v-model="previewModalVisible" :url="current?.filePath"></image-preview>
-  <send-back-mark
+  <!-- <send-back-mark
     :id="current?.taskId"
     v-model="sendBackVisible"
     type="custom-check"
     @rejected="onRejected"
-  ></send-back-mark>
+  ></send-back-mark> -->
+  <send-back-mark :id="rejectIds" v-model="sendBackVisible" type="custom-check" @rejected="onRejected"></send-back-mark>
   <mark-history-list
     :id="currentViewHistory?.taskId"
     v-model="visibleHistory"
@@ -151,7 +148,7 @@
 
 <script setup lang="tsx" name="AnalysisPersonnelStatisticsMarker">
 /** 评卷员明细统计 */
-import { computed, reactive, ref, watch } from 'vue'
+import { computed, reactive, ref, watch, nextTick } from 'vue'
 import { useRouter, useRoute } from 'vue-router'
 import { ElButton, ElMessage } from 'element-plus'
 import dayjs from 'dayjs'
@@ -183,6 +180,13 @@ import type { EChartsOption } from 'echarts'
 import type { ExtractApiResponse } from '@/api/api'
 import type { EpTableColumn, EpFormItem } from 'global-type'
 import type { SetImgBgOption } from '@/hooks/useSetImgBg'
+
+const isMult = ref(false)
+const multipleSelection = ref<any>([])
+const handleSelectionChange = (val: any) => {
+  multipleSelection.value = val
+}
+
 const mainStore = useMainStore()
 const paneSize = computed(() => {
   return mainStore.paneSizeConfig[location.pathname] || 70
@@ -199,6 +203,7 @@ const onSendBack = () => {
 const onRejected = () => {
   // onRefresh()
   ElMessage.success('打回成功')
+  fetchTable()
 }
 /** 给分板 */
 const editScoreVisible = ref<boolean>(true)
@@ -259,7 +264,8 @@ const {
   onDbClick,
   onCurrentChange,
   nextRow,
-} = useTableCheck(data)
+  elTableRef,
+} = useTableCheck(data, true, null, false, isMult)
 /** 确定给分 */
 const { fetch: updatePersonalMarkDetailScore } = useFetch('updatePersonalMarkDetailScore')
 const onSubmit = async () => {
@@ -395,32 +401,67 @@ const objectiveTableData = computed<TableDataType[]>(() => {
   }))
 })
 
-const columns: EpTableColumn<any>[] = [
-  {
-    label: '评卷员',
-    prop: 'markerName',
-    minWidth: 90,
-    formatter(row: any) {
-      return (
-        <SecNumberStatus
-          secretNumber={row.markerName}
-          checked={row.checked}
-          corrected={row.corrected}
-        ></SecNumberStatus>
-      )
+// const columns: EpTableColumn<any>[] = [
+//   {
+//     label: '评卷员',
+//     prop: 'markerName',
+//     minWidth: 90,
+//     formatter(row: any) {
+//       return (
+//         <SecNumberStatus
+//           secretNumber={row.markerName}
+//           checked={row.checked}
+//           corrected={row.corrected}
+//         ></SecNumberStatus>
+//       )
+//     },
+//   },
+//   {
+//     label: '密号',
+//     prop: 'secretNumber',
+//     minWidth: 110,
+//   },
+//   { label: '给分', prop: 'markerScore', minWidth: 70 },
+//   { label: '客观分', prop: 'objectiveScore', minWidth: 70 },
+//   { label: '客主比', prop: 'markerRatio', minWidth: 80 },
+//   { label: '成绩客主比', prop: 'ratio', minWidth: 110 },
+//   { label: '成绩', prop: 'markScore', minWidth: 70 },
+// ]
+const columns: any = computed(() => {
+  let cols: any = [
+    {
+      label: '评卷员',
+      prop: 'markerName',
+      minWidth: 90,
+      formatter(row: any) {
+        return (
+          <SecNumberStatus
+            secretNumber={row.markerName}
+            checked={row.checked}
+            corrected={row.corrected}
+          ></SecNumberStatus>
+        )
+      },
     },
-  },
-  {
-    label: '密号',
-    prop: 'secretNumber',
-    minWidth: 110,
-  },
-  { label: '给分', prop: 'markerScore', minWidth: 70 },
-  { label: '客观分', prop: 'objectiveScore', minWidth: 70 },
-  { label: '客主比', prop: 'markerRatio', minWidth: 80 },
-  { label: '成绩客主比', prop: 'ratio', minWidth: 110 },
-  { label: '成绩', prop: 'markScore', minWidth: 70 },
-]
+    {
+      label: '密号',
+      prop: 'secretNumber',
+      minWidth: 110,
+    },
+    { label: '给分', prop: 'markerScore', minWidth: 70 },
+    { label: '客观分', prop: 'objectiveScore', minWidth: 70 },
+    { label: '客主比', prop: 'markerRatio', minWidth: 80 },
+    { label: '成绩客主比', prop: 'ratio', minWidth: 110 },
+    { label: '成绩', prop: 'markScore', minWidth: 70 },
+  ]
+  if (isMult.value) {
+    cols.unshift({
+      type: 'selection',
+      width: 55,
+    })
+  }
+  return cols
+})
 
 const onSearch = () => {
   fetchTable()
@@ -661,6 +702,23 @@ const markerObjectiveChartsOption = computed<EChartsOption>(() => {
 })
 
 onSearch()
+
+const multToggle = () => {
+  isMult.value = !isMult.value
+  editScoreVisible.value = !isMult.value
+  if (!isMult.value && tableData.value?.length && current.value) {
+    nextTick(() => {
+      let index = tableData.value.findIndex((task: any) => task.taskId == current.value?.taskId)
+      elTableRef?.value?.setCurrentRow(tableData.value[index == -1 ? 0 : index])
+    })
+  }
+  if (isMult.value) {
+    elTableRef?.value?.clearSelection()
+  }
+}
+const rejectIds = computed(() => {
+  return isMult.value ? multipleSelection.value.map((item: any) => item.taskId) : [current.value?.taskId]
+})
 </script>
 
 <style scoped lang="scss">

+ 0 - 411
src/modules/analysis/marker-statistics/old.vue

@@ -1,411 +0,0 @@
-<template>
-  <div class="full flex direction-column">
-    <div class="flex items-center p-extra-small fill-blank header-view">
-      <el-button class="m-r-auto" size="small" plain @click="back()">返回</el-button>
-
-      <div class="data-item">
-        <user-info></user-info>
-      </div>
-      <div class="data-item">
-        <div class="icon-item">
-          <lock-entry />
-        </div>
-        <div class="icon-item">
-          <message></message>
-        </div>
-      </div>
-    </div>
-    <div class="flex-1 overflow-hidden flex direction-column">
-      <div class="fill-blank p-t-medium-base filter-header">
-        <base-form size="small" :items="formItems" :model="model">
-          <template #form-item-search>
-            <el-button type="primary" :loading="loading1 || loading2" @click="onSearch">刷新</el-button>
-          </template>
-        </base-form>
-      </div>
-      <div class="flex-1 flex overflow-hidden p-base">
-        <div class="flex-1 flex direction-column overflow-hidden">
-          <div class="fill-blank text-center p-t-base table-title">{{ query.markerName }}主观题给分分布</div>
-          <div class="flex-1 overflow-hidden fill-blank m-b-base table-box">
-            <base-table
-              size="small"
-              border
-              stripe
-              height="100%"
-              :columns="columns"
-              :data="subjectTableData"
-              @row-dblclick="onDbClick"
-            ></base-table>
-          </div>
-          <div class="flex-1 overflow-hidden radius-base fill-blank p-base chart-box">
-            <vue-echarts class="full" :option="markerSubjectiveChartsOption"></vue-echarts>
-          </div>
-        </div>
-        <div class="flex-1 flex direction-column overflow-hidden m-l-base">
-          <div class="fill-blank text-center p-t-base table-title">{{ query.markerName }}客观题给分分布</div>
-          <div class="flex-1 overflow-hidden fill-blank m-b-base table-box">
-            <base-table
-              size="small"
-              border
-              stripe
-              height="100%"
-              :columns="columns"
-              :data="objectiveTableData"
-            ></base-table>
-          </div>
-          <div class="flex-1 overflow-hidden radius-base fill-blank p-base chart-box">
-            <vue-echarts class="full" :option="markerObjectiveChartsOption"></vue-echarts>
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script setup lang="tsx" name="AnalysisPersonnelStatisticsMarker">
-/** 评卷员明细统计 */
-import { computed, reactive } from 'vue'
-import { useRouter, useRoute } from 'vue-router'
-import { ElButton } from 'element-plus'
-import dayjs from 'dayjs'
-import VueEcharts from 'vue-echarts'
-import Message from '@/components/shared/message/Message.vue'
-import UserInfo from '@/components/shared/UserInfo.vue'
-import BaseTable from '@/components/element/BaseTable.vue'
-import BaseForm from '@/components/element/BaseForm.vue'
-import useFetch from '@/hooks/useFetch'
-import LockEntry from '@/components/common/LockEntry.vue'
-
-import type { EChartsOption } from 'echarts'
-import type { ExtractApiResponse } from '@/api/api'
-import type { EpTableColumn, EpFormItem } from 'global-type'
-
-const { back, push } = useRouter()
-const { query } = useRoute()
-
-const model = reactive({
-  type: 'total',
-})
-
-const formItems: EpFormItem[] = [
-  {
-    label: '统计方式',
-    prop: 'type',
-    slotType: 'radio',
-    rowKey: 'row-1',
-    slot: {
-      options: [
-        { label: 'total', slotLabel: '积累' },
-        { label: 'today', slotLabel: '当天' },
-      ],
-    },
-    colProp: {
-      span: 4,
-      offset: 18,
-    },
-  },
-  {
-    slotName: 'search',
-    rowKey: 'row-1',
-    colProp: {
-      span: 2,
-    },
-  },
-]
-
-const {
-  fetch: getStatisticObjectiveByMarker,
-  result: objectiveByMarker,
-  loading: loading1,
-} = useFetch('getStatisticObjectiveByMarker')
-const {
-  fetch: getStatisticSubjectiveByMarker,
-  result: subjectiveByMarker,
-  loading: loading2,
-} = useFetch('getStatisticSubjectiveByMarker')
-
-type TableDataType = ExtractArrayValue<ExtractApiResponse<'getStatisticObjectiveByMarker'>['segmentsByAll']> & {
-  groupCount: number
-  groupRate: number
-  allCount: number
-  allRate: number
-}
-
-type GroupData = Record<number, { groupCount: number; groupRate: number }>
-type AllData = Record<number, { allCount: number; allRate: number }>
-
-const objectiveGroupData = computed<GroupData>(() => {
-  return objectiveByMarker.value?.segmentsByGroup?.reduce((result, data) => {
-    result[data.scoreStart] = { groupCount: data.count, groupRate: data.rate }
-    return result
-  }, {} as GroupData)
-})
-
-const objectiveAllData = computed<AllData>(() => {
-  return objectiveByMarker.value?.segmentsByAll?.reduce((result, data) => {
-    result[data.scoreStart] = { allCount: data.count, allRate: data.rate }
-    return result
-  }, {} as AllData)
-})
-
-const subjectiveGroupData = computed<GroupData>(() => {
-  return subjectiveByMarker.value?.segmentsByGroup?.reduce((result, data) => {
-    result[data.scoreStart] = { groupCount: data.count, groupRate: data.rate }
-    return result
-  }, {} as GroupData)
-})
-
-const subjectiveAllData = computed<AllData>(() => {
-  return subjectiveByMarker.value?.segmentsByAll?.reduce((result, data) => {
-    result[data.scoreStart] = { allCount: data.count, allRate: data.rate }
-    return result
-  }, {} as AllData)
-})
-
-const objectiveTableData = computed<TableDataType[]>(() => {
-  return objectiveByMarker?.value?.segmentsByUser.map((d) => ({
-    ...d,
-    ...objectiveGroupData.value?.[d.scoreStart],
-    ...objectiveAllData.value?.[d.scoreStart],
-  }))
-})
-
-const subjectTableData = computed<TableDataType[]>(() => {
-  return subjectiveByMarker?.value?.segmentsByUser.map((d) => ({
-    ...d,
-    ...subjectiveGroupData.value?.[d.scoreStart],
-    ...subjectiveAllData.value?.[d.scoreStart],
-  }))
-})
-
-const columns: EpTableColumn<TableDataType>[] = [
-  { label: '分数', prop: 'scoreStart' },
-  { label: '人数', prop: 'count' },
-  { label: '百分比', prop: 'rate', formatter: (row) => `${row.rate}%` },
-  { label: '本组人数', prop: 'groupCount' },
-  { label: '百分比', prop: 'groupRate', formatter: (row) => `${row.groupRate}%` },
-  { label: '全体人数', prop: 'allCount' },
-  { label: '百分比', prop: 'allRate', formatter: (row) => `${row.allRate}%` },
-]
-
-const onSearch = () => {
-  if (query.markerId) {
-    const startTime = model.type === 'today' ? dayjs().startOf('day').format('YYYYMMDDHHmmss') : ''
-    getStatisticObjectiveByMarker({
-      markerId: query.markerId as string,
-      startTime,
-      endTime: '',
-    })
-    getStatisticSubjectiveByMarker({
-      markerId: query.markerId as string,
-      startTime,
-      endTime: '',
-    })
-  }
-}
-
-const onDbClick = (row: TableDataType) => {
-  if (query.markerId) {
-    push({
-      name: 'AnalysisViewMarked',
-      params: {
-        markerId: query.markerId as string,
-      },
-      query: {
-        markerName: query.markerName,
-        score: row.scoreStart,
-        source: (query.source as string) || '',
-        subjectCode: query.subjectCode,
-        questionMainNumber: query.questionMainNumber,
-      },
-    })
-  }
-}
-
-type StatisticObjectiveByMarker = ExtractApiResponse<'getStatisticObjectiveByMarker'>
-
-type StatisticObjectiveByMarkerValues = StatisticObjectiveByMarker['segmentsByAll']
-
-const getXAxisData = <K extends keyof ExtractArrayValue<StatisticObjectiveByMarkerValues>>(
-  field: K,
-  data?: StatisticObjectiveByMarkerValues
-) => {
-  if (!data) {
-    return []
-  }
-  const getValue = (key: K, item: ExtractArrayValue<StatisticObjectiveByMarkerValues>) => {
-    return item[key]
-  }
-  return data?.map((v) => getValue(field, v))
-}
-
-const markerSubjectiveChartsOption = computed<EChartsOption>(() => {
-  return {
-    legend: {
-      itemWidth: 14,
-      data: ['评卷员主观分布', '小组主观分布', '题组主观分布'],
-    },
-    xAxis: {
-      axisLine: { show: false },
-      axisTick: { show: false },
-      splitLine: { show: false },
-      axisLabel: {
-        align: 'right',
-      },
-      data: getXAxisData('scoreStart', subjectiveByMarker?.value?.segmentsByAll),
-    },
-    yAxis: [
-      {
-        type: 'value',
-      },
-      {
-        type: 'value',
-        axisLabel: {
-          formatter: `{value}%`,
-        },
-        splitLine: { show: false },
-      },
-    ],
-    series: [
-      {
-        name: '评卷员主观分布',
-        type: 'line',
-        itemStyle: {
-          color: '#8ED14B',
-        },
-        data: getXAxisData('rate', subjectiveByMarker?.value?.segmentsByUser),
-      },
-      {
-        name: '小组主观分布',
-        type: 'line',
-        itemStyle: {
-          color: '#3B99D4',
-        },
-        data: getXAxisData('rate', subjectiveByMarker?.value?.segmentsByGroup),
-      },
-      {
-        name: '题组主观分布',
-        type: 'line',
-        itemStyle: {
-          color: '#ff0000',
-        },
-        data: getXAxisData('rate', subjectiveByMarker?.value?.segmentsByAll),
-      },
-    ],
-  }
-})
-
-const markerObjectiveChartsOption = computed<EChartsOption>(() => {
-  return {
-    legend: {
-      itemWidth: 14,
-      data: ['评卷员客观分布', '小组客观分布', '题组客观分布'],
-    },
-    xAxis: {
-      axisLine: { show: false },
-      axisTick: { show: false },
-      splitLine: { show: false },
-      axisLabel: {
-        align: 'right',
-      },
-      data: getXAxisData('scoreStart', objectiveByMarker?.value?.segmentsByAll),
-    },
-    yAxis: [
-      {
-        type: 'value',
-      },
-      {
-        type: 'value',
-        axisLabel: {
-          formatter: `{value}%`,
-        },
-        splitLine: { show: false },
-      },
-    ],
-    series: [
-      {
-        name: '评卷员客观分布',
-        type: 'line',
-        itemStyle: {
-          color: '#8ED14B',
-        },
-        data: getXAxisData('rate', objectiveByMarker?.value?.segmentsByUser),
-      },
-      {
-        name: '小组客观分布',
-        type: 'line',
-        itemStyle: {
-          color: '#3B99D4',
-        },
-        data: getXAxisData('rate', objectiveByMarker?.value?.segmentsByGroup),
-      },
-      {
-        name: '题组客观分布',
-        type: 'line',
-        itemStyle: {
-          color: '#ff0000',
-        },
-        data: getXAxisData('rate', objectiveByMarker?.value?.segmentsByAll),
-      },
-    ],
-  }
-})
-
-onSearch()
-</script>
-
-<style scoped lang="scss">
-.header-view {
-  background-color: #333;
-  height: 60px;
-  ::v-deep(.data-item) {
-    // padding-left: 20px;
-    padding-left: 15px;
-    padding-right: 15px;
-    position: relative;
-    height: 100%;
-    display: flex;
-    align-items: center;
-    color: #8a8a8a;
-    .icon-item {
-      // width: 45px;
-      padding: 0 10px;
-      height: 100%;
-      display: flex;
-      flex-direction: column;
-      justify-content: flex-end;
-    }
-    &:first-child {
-      margin-left: auto;
-    }
-    &:not(:last-child) {
-      &:after {
-        content: '';
-        position: absolute;
-        right: 0;
-        top: 0;
-        width: 1px;
-        height: 100%;
-        background-color: #464646;
-      }
-    }
-    &.is-last:after {
-      width: 0;
-    }
-    .main-ques-info {
-      text-align: center;
-      font-weight: bold;
-      color: $color--primary;
-      margin-bottom: 5px;
-      max-width: 130px;
-    }
-  }
-}
-.filter-header {
-  border-top: 1px solid #eee;
-  border-bottom: 1px solid #eee;
-}
-.chart-box {
-  height: 350px;
-}
-</style>

+ 104 - 32
src/modules/analysis/view-marked-detail/index.vue

@@ -9,9 +9,18 @@
       <!-- <el-button :disabled="!current?.taskId" class="m-l-base" size="small" type="primary" @click="onEditScore"
         >修改给分</el-button
       > -->
-      <el-button :disabled="!current?.taskId" class="m-l-base m-r-auto" size="small" type="primary" @click="onSendBack"
+      <el-button :disabled="!current?.taskId" class="m-l-base" size="small" type="primary" @click="onSendBack"
         >打回</el-button
       >
+      <el-button
+        custom-1
+        class="m-l-base m-r-auto"
+        size="small"
+        type="success"
+        :disabled="!tableData?.length"
+        @click="multToggle"
+        >{{ isMult ? '取消多选' : '多选' }}</el-button
+      >
     </mark-header>
     <div class="flex flex-1 overflow-hidden p-base mark-container">
       <splitpanes class="default-theme" style="height: 100%" @resize="setPaneSize">
@@ -91,11 +100,12 @@
               height="100%"
               :data="tableData"
               :columns="columns"
-              highlight-current-row
+              :highlight-current-row="!isMult"
               :cell-style="{ padding: '6px 0' }"
               :memory-column="true"
               @current-change="onCurrentChange"
               @row-dblclick="onDbClick"
+              @selection-change="handleSelectionChange"
             ></base-table>
           </div>
         </pane>
@@ -103,12 +113,13 @@
     </div>
   </div>
   <image-preview v-model="previewModalVisible" :url="current?.filePath"></image-preview>
-  <send-back-mark
+  <!-- <send-back-mark
     :id="current?.taskId"
     v-model="sendBackVisible"
     type="custom-check"
     @rejected="onRejected"
-  ></send-back-mark>
+  ></send-back-mark> -->
+  <send-back-mark :id="rejectIds" v-model="sendBackVisible" type="custom-check" @rejected="onRejected"></send-back-mark>
   <mark-history-list
     :id="currentViewHistory?.taskId"
     v-model="visibleHistory"
@@ -119,7 +130,7 @@
 <script setup lang="tsx" name="AnalysisViewMarked">
 // <script setup lang="ts" name="ViewMarkedDetail">
 /** 提取阅卷明细 */
-import { ref, computed, watch } from 'vue'
+import { ref, computed, watch, nextTick } from 'vue'
 import { useRoute } from 'vue-router'
 import { ElButton, ElMessage, ElPagination } from 'element-plus'
 import { add } from '@/utils/common'
@@ -145,6 +156,13 @@ import { setPaneSize } from '@/utils/common'
 import useMainStore from '@/store/main'
 import BtnPagination from '@/components/common/BtnPagination.vue'
 type RowType = ExtractMultipleApiResponse<'getPersonalMarkDetail'> & { index: number }
+
+const isMult = ref(false)
+const multipleSelection = ref<any>([])
+const handleSelectionChange = (val: any) => {
+  multipleSelection.value = val
+}
+
 const mainStore = useMainStore()
 const paneSize = computed(() => {
   return mainStore.paneSizeConfig[location.pathname] || 60
@@ -164,6 +182,7 @@ const onSendBack = () => {
 const onRejected = () => {
   // onRefresh()
   ElMessage.success('打回成功')
+  fetchTable()
 }
 /** 给分板 */
 const editScoreVisible = ref<boolean>(true)
@@ -222,33 +241,69 @@ const onOperationClick: OperationClick = ({ type, value }) => {
   operationHandles[type]?.(value)
 }
 
-const columns: EpTableColumn<RowType>[] = [
-  {
-    label: '评卷员',
-    prop: 'markerName',
-    minWidth: 90,
-    formatter(row: any) {
-      return (
-        <SecNumberStatus
-          secretNumber={row.markerName}
-          checked={row.checked}
-          corrected={row.corrected}
-        ></SecNumberStatus>
-      )
+// const columns: EpTableColumn<RowType>[] = [
+//   {
+//     label: '评卷员',
+//     prop: 'markerName',
+//     minWidth: 90,
+//     formatter(row: any) {
+//       return (
+//         <SecNumberStatus
+//           secretNumber={row.markerName}
+//           checked={row.checked}
+//           corrected={row.corrected}
+//         ></SecNumberStatus>
+//       )
+//     },
+//   },
+//   {
+//     label: '密号',
+//     prop: 'secretNumber',
+//     minWidth: 110,
+//   },
+//   { label: '给分', prop: 'markerScore', minWidth: 70 },
+//   { label: '客观分', prop: 'objectiveScore', minWidth: 70 },
+//   { label: '客主比', prop: 'markerRatio', minWidth: 80 },
+//   { label: '成绩客主比', prop: 'ratio', minWidth: 110 },
+//   { label: '成绩', prop: 'markScore', minWidth: 70 },
+//   { label: '评卷时间', prop: 'markTime', minWidth: 130 },
+// ]
+const columns: any = computed(() => {
+  let cols: any = [
+    {
+      label: '评卷员',
+      prop: 'markerName',
+      minWidth: 90,
+      formatter(row: any) {
+        return (
+          <SecNumberStatus
+            secretNumber={row.markerName}
+            checked={row.checked}
+            corrected={row.corrected}
+          ></SecNumberStatus>
+        )
+      },
     },
-  },
-  {
-    label: '密号',
-    prop: 'secretNumber',
-    minWidth: 110,
-  },
-  { label: '给分', prop: 'markerScore', minWidth: 70 },
-  { label: '客观分', prop: 'objectiveScore', minWidth: 70 },
-  { label: '客主比', prop: 'markerRatio', minWidth: 80 },
-  { label: '成绩客主比', prop: 'ratio', minWidth: 110 },
-  { label: '成绩', prop: 'markScore', minWidth: 70 },
-  { label: '评卷时间', prop: 'markTime', minWidth: 130 },
-]
+    {
+      label: '密号',
+      prop: 'secretNumber',
+      minWidth: 110,
+    },
+    { label: '给分', prop: 'markerScore', minWidth: 70 },
+    { label: '客观分', prop: 'objectiveScore', minWidth: 70 },
+    { label: '客主比', prop: 'markerRatio', minWidth: 80 },
+    { label: '成绩客主比', prop: 'ratio', minWidth: 110 },
+    { label: '成绩', prop: 'markScore', minWidth: 70 },
+    { label: '评卷时间', prop: 'markTime', minWidth: 130 },
+  ]
+  if (isMult.value) {
+    cols.unshift({
+      type: 'selection',
+      width: 55,
+    })
+  }
+  return cols
+})
 
 const { pagination, currentPage, data, fetchTable, loading } = useTable(
   'getPersonalMarkDetail',
@@ -276,7 +331,8 @@ const {
   onDbClick,
   onCurrentChange,
   nextRow,
-} = useTableCheck(data, true, queryPosition)
+  elTableRef,
+} = useTableCheck(data, true, queryPosition, false, isMult)
 
 /** 确定给分 */
 const { fetch: updatePersonalMarkDetailScore } = useFetch('updatePersonalMarkDetailScore')
@@ -329,6 +385,22 @@ const imgOption = computed<SetImgBgOption>(() => {
 const { drawing, dataUrl } = useSetImgBg(imgOption, frontColor, setFrontColor)
 
 onRefresh()
+const multToggle = () => {
+  isMult.value = !isMult.value
+  editScoreVisible.value = !isMult.value
+  if (!isMult.value && tableData.value?.length && current.value) {
+    nextTick(() => {
+      let index = tableData.value.findIndex((task: any) => task.taskId == current.value?.taskId)
+      elTableRef?.value?.setCurrentRow(tableData.value[index == -1 ? 0 : index])
+    })
+  }
+  if (isMult.value) {
+    elTableRef?.value?.clearSelection()
+  }
+}
+const rejectIds = computed(() => {
+  return isMult.value ? multipleSelection.value.map((item: any) => item.taskId) : [current.value?.taskId]
+})
 </script>
 
 <style scoped lang="scss">

+ 9 - 3
src/modules/marking/inquiry-result/index.vue

@@ -12,9 +12,15 @@
       <el-button :disabled="!current?.taskId" class="m-l-base" size="small" type="primary" @click="onSendBack"
         >打回</el-button
       >
-      <el-button custom-1 class="m-l-base m-r-auto" size="small" type="success" @click="multToggle">{{
-        isMult ? '取消多选' : '多选'
-      }}</el-button>
+      <el-button
+        custom-1
+        class="m-l-base m-r-auto"
+        size="small"
+        type="success"
+        :disabled="!tableData?.length"
+        @click="multToggle"
+        >{{ isMult ? '取消多选' : '多选' }}</el-button
+      >
     </mark-header>
     <div class="flex flex-1 overflow-hidden p-base mark-container">
       <splitpanes class="default-theme" style="height: 100%" @resize="setPaneSize">