Эх сурвалжийг харах

决策分析所有表格增加排序

刘洋 2 жил өмнө
parent
commit
dd5296b990

+ 2 - 2
server.config.ts

@@ -3,9 +3,9 @@ import type { ServerOptions } from 'vite'
 const server: ServerOptions = {
   proxy: {
     '^/?(api|file)/': {
-      target: 'http://192.168.10.41:8200',
+      // target: 'http://192.168.10.41:8200',
       // target: 'http://192.168.10.107:8200',
-      // target: 'http://cet-test.markingtool.cn',
+      target: 'http://cet-test.markingtool.cn',
       // target: 'http://cet-dev.markingtool.cn:8200',
     },
   },

+ 10 - 8
src/modules/analysis/group-monitoring/index.vue

@@ -36,16 +36,17 @@ const { loading, fetch: getGroupMonitor, result } = useFetch('getGroupMonitor')
 
 const columns: EpTableColumn<ExtractArrayValue<ExtractApiResponse<'getGroupMonitor'>>>[] = [
   { label: '组长', prop: 'markingGroupLeader', fixed: 'left' },
-  { label: '已浏览系统抽查卷数', prop: 'sysCheckCount', width: 140 },
-  { label: '已给分系统抽查卷数', prop: 'sysCheckReScoreCount', width: 140 },
-  { label: '已浏览问题卷数', prop: 'problemCount', width: 110 },
-  { label: '已给分问题卷数', prop: 'problemReScoreCount', width: 110 },
-  { label: '已浏览自定义抽查卷数', prop: 'customCheckCount', width: 140 },
-  { label: '已给分自定义抽查卷数', prop: 'customCheckReScoreCount', width: 140 },
+  { label: '已浏览系统抽查卷数', prop: 'sysCheckCount', width: 160, sortable: true },
+  { label: '已给分系统抽查卷数', prop: 'sysCheckReScoreCount', width: 160, sortable: true },
+  { label: '已浏览问题卷数', prop: 'problemCount', width: 130, sortable: true },
+  { label: '已给分问题卷数', prop: 'problemReScoreCount', width: 130, sortable: true },
+  { label: '已浏览自定义抽查卷数', prop: 'customCheckCount', width: 170, sortable: true },
+  { label: '已给分自定义抽查卷数', prop: 'customCheckReScoreCount', width: 170, sortable: true },
   {
     label: '已浏览试卷总数',
     prop: 'totalCount',
-    width: 110,
+    width: 130,
+    sortable: true,
     formatter(row) {
       return (
         <ElButton type="primary" link onClick={() => viewMonitoringDetail(row, 'VIEW')}>
@@ -57,7 +58,8 @@ const columns: EpTableColumn<ExtractArrayValue<ExtractApiResponse<'getGroupMonit
   {
     label: '已给分试卷总数',
     prop: 'totalReScoreCount',
-    width: 110,
+    width: 130,
+    sortable: true,
     formatter(row) {
       return (
         <ElButton type="primary" link onClick={() => viewMonitoringDetail(row, 'MARK')}>

+ 6 - 3
src/modules/analysis/marking-progress/components/GroupProgress.vue

@@ -9,7 +9,7 @@
         >
       </template>
     </base-form>
-    <base-table border stripe :columns="columns" :data="result"></base-table>
+    <base-table border stripe size="small" :columns="columns" :data="result"></base-table>
   </div>
 </template>
 
@@ -89,11 +89,12 @@ const columns = computed<TableColumn[]>(() => {
       type: 'index',
       width: 64,
       align: 'center',
+      fixed: 'left',
       index(index) {
         return index < result?.value?.length - 1 ? index + 1 : (void 0 as unknown as number)
       },
     },
-    { label: '评卷员', prop: 'markerName' },
+    { label: '评卷员', prop: 'markerName', align: 'center' },
     ...dateTimes.value.map((d) => {
       return {
         label: d,
@@ -101,9 +102,11 @@ const columns = computed<TableColumn[]>(() => {
         formatter(row) {
           return row.dayFinishCounts.find((v) => v.date === d)?.count ?? ''
         },
+        width: 300,
+        sortable: true,
       } as TableColumn
     }),
-    { label: '合计', prop: 'totalFinishCount', align: 'right' },
+    { label: '合计', prop: 'totalFinishCount', align: 'center', sortable: true },
   ]
 })
 </script>

+ 15 - 9
src/modules/analysis/marking-progress/components/TotalProgress.vue

@@ -27,7 +27,7 @@
   <div class="p-base radius-base fill-blank flex group-progress-box">
     <div class="flex direction-column full-h p-r-base table-info">
       <div class="flex justify-between">
-        <span class="table-title">小组进度</span>
+        <span class="table-title p-t-small p-b-extra-small">小组进度</span>
         <span v-show="currentMainName" class="flex items-center current-main-name">
           <svg-icon class="m-r-medium-mini" name="question"></svg-icon>
           <span>{{ currentMainName }}</span>
@@ -104,39 +104,43 @@ const totalColumns: EpTableColumn<TotalProgress>[] = [
     label: '大题',
     formatter: getMainName,
   },
-  { label: '试卷总量', prop: 'totalPaper', align: 'center', width: usePX(100) },
-  { label: '已完成', prop: 'finishCount', align: 'center', width: usePX(100) },
+  { label: '试卷总量', prop: 'totalPaper', align: 'center', width: 100, sortable: true },
+  { label: '已完成', prop: 'finishCount', align: 'center', width: 100, sortable: true },
   {
     label: '完成比',
     align: 'center',
-    width: usePX(72),
+    width: 92,
     formatter(row) {
       return `${row.finishRate}%`
     },
+    sortable: true,
   },
   {
     label: '待完成',
     align: 'center',
-    width: usePX(100),
+    width: 90,
     formatter(row) {
       return `${minus(row.totalPaper, row.finishCount)}`
     },
+    sortable: true,
   },
   {
     label: '待完成比',
     align: 'center',
-    width: usePX(72),
+    width: 90,
     formatter(row) {
       return `${minus(100, row.finishRate)}%`
     },
+    sortable: true,
   },
   {
     label: '预计耗时(分)',
     align: 'center',
-    width: usePX(100),
+    width: 114,
     formatter(row) {
       return `${parseFloat((row.takeTime / 60).toFixed(2))}`
     },
+    sortable: true,
   },
 ]
 
@@ -276,7 +280,7 @@ type GroupProgress = ExtractArrayValue<ExtractApiResponse<'getMarkProgressByGrou
 
 const groupColumns: EpTableColumn<GroupProgress>[] = [
   { label: '小组', formatter: (row) => (row.markingGroupNumber ? `第${row.markingGroupNumber}组` : '全体') },
-  { label: '完成总量', prop: 'finishCount', align: 'center' },
+  { label: '完成总量', prop: 'finishCount', align: 'center', sortable: true },
   {
     label: '完成比',
     prop: 'finishRate',
@@ -284,8 +288,9 @@ const groupColumns: EpTableColumn<GroupProgress>[] = [
     formatter(row) {
       return `${row.finishRate}%`
     },
+    sortable: true,
   },
-  { label: '当日已完成', prop: 'dayFinishCount', align: 'center' },
+  { label: '当日已完成', prop: 'dayFinishCount', align: 'center', sortable: true },
   {
     label: '当日完成比',
     prop: 'dayFinishRate',
@@ -293,6 +298,7 @@ const groupColumns: EpTableColumn<GroupProgress>[] = [
     formatter(row) {
       return `${row.dayFinishRate}%`
     },
+    sortable: true,
   },
 ]
 

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

@@ -19,7 +19,7 @@ const emits = defineEmits(['rightClick', 'onSetWorkload', 'onSendMessage', 'forc
 const fun = () => {
   emits('rightClick')
 }
-const curRow = ref({})
+const curRow: any = ref({})
 const onload = (row: any, column: any, event: any) => {
   curRow.value = row
   console.log('curRow:', curRow)

+ 26 - 23
src/modules/analysis/personnel-statistics/components/StatisticsGroup.vue

@@ -47,7 +47,7 @@ const columns: EpTableColumn<ExtractArrayValue<ExtractApiResponse<'getStatistics
     prop: 'markingGroupNumber',
     width: 52,
     fixed: 'left',
-    formatter(row) {
+    formatter(row: any) {
       return row.markingGroupNumber === 0 ? '全部' : `${row.markingGroupNumber}`
     },
   },
@@ -56,31 +56,34 @@ const columns: EpTableColumn<ExtractArrayValue<ExtractApiResponse<'getStatistics
     prop: 'markerName',
     minWidth: 84,
     slotName: 'marker',
-    formatter(row) {
+    formatter(row: any) {
       return row.markingGroupNumber === 0 ? '题组' : `第${row.markingGroupNumber}组`
     },
   },
-  { align: 'center', label: '评卷份数', prop: 'markingPaperCount', width: 72 },
-  { align: 'center', label: '当日可阅', prop: 'markDayCount', width: 72 },
-  { align: 'center', label: '剩余可阅', prop: 'todoMarkDayCount', width: 72 },
-  { align: 'center', label: '客观题0分量', prop: 'objectiveZero', width: 100 },
-  { align: 'center', label: '客观平均分', prop: 'objectiveAvg', width: 90 },
-  { align: 'center', label: '客观标准差', prop: 'objectiveStd', width: 80 },
-  { align: 'center', label: '重评/待确认', prop: 'reMarkUnConfirmCount', width: 100 },
-  { align: 'center', label: '抽查量', prop: 'checkCount', width: 70 },
-  { align: 'center', label: '抽查改正量', prop: 'checkCorrectCount', width: 90 },
-  { align: 'center', label: '相关系数', prop: 'xyRelate', width: 70 },
-  { align: 'center', label: '平均分', prop: 'avg', width: 60 },
-  { align: 'center', label: '标准差', prop: 'std', width: 60 },
-  { align: 'center', label: '近5分钟最高分', prop: 'scoreTop', width: 100 },
-  { align: 'center', label: '近5分钟最低分', prop: 'scoreLow', width: 100 },
-  { align: 'center', label: '近5分钟客主比', prop: 'objSubRate', width: 100 },
-  { align: 'center', label: '平均客主比', prop: 'objSubAvgRate', width: 90 },
-  { align: 'center', label: '在线', prop: 'online', width: 52 },
-  { align: 'center', label: '状态', prop: 'markingStatus', width: 80 },
-  { align: 'center', label: '速度', prop: 'markingRate', width: 46 },
-  { align: 'center', label: '综合系数', prop: 'integration', width: 70 },
-]
+  { align: 'center', label: '评卷份数', prop: 'markingPaperCount', width: 92 },
+  { align: 'center', label: '当日可阅', prop: 'markDayCount', width: 92 },
+  { align: 'center', label: '剩余可阅', prop: 'todoMarkDayCount', width: 92 },
+  { align: 'center', label: '客观题0分量', prop: 'objectiveZero', width: 120 },
+  { align: 'center', label: '客观平均分', prop: 'objectiveAvg', width: 110 },
+  { align: 'center', label: '客观标准差', prop: 'objectiveStd', width: 104 },
+  { align: 'center', label: '重评/待确认', prop: 'reMarkUnConfirmCount', width: 120 },
+  { align: 'center', label: '抽查量', prop: 'checkCount', width: 90 },
+  { align: 'center', label: '抽查改正量', prop: 'checkCorrectCount', width: 110 },
+  { align: 'center', label: '相关系数', prop: 'xyRelate', width: 90 },
+  { align: 'center', label: '平均分', prop: 'avg', width: 80 },
+  { align: 'center', label: '标准差', prop: 'std', width: 80 },
+  { align: 'center', label: '近5分钟最高分', prop: 'scoreTop', width: 124 },
+  { align: 'center', label: '近5分钟最低分', prop: 'scoreLow', width: 124 },
+  { align: 'center', label: '近5分钟客主比', prop: 'objSubRate', width: 124 },
+  { align: 'center', label: '平均客主比', prop: 'objSubAvgRate', width: 110 },
+  { align: 'center', label: '在线', prop: 'online', width: 72 },
+  { align: 'center', label: '状态', prop: 'markingStatus', width: 100 },
+  { align: 'center', label: '速度', prop: 'markingRate', width: 66 },
+  { align: 'center', label: '综合系数', prop: 'integration', width: 90 },
+].map((col: any) => {
+  if (!['小组', '评卷员'].includes(col.label)) col.sortable = true
+  return col
+})
 
 const data = computed(() => {
   const arr = props.data?.map((v) => ({ ...v })) || []

+ 26 - 23
src/modules/analysis/personnel-statistics/components/StatisticsPersonnel.vue

@@ -97,40 +97,43 @@ const columns: EpTableColumn<ExtractArrayValue<ExtractApiResponse<'getStatistics
     prop: 'markingGroupNumber',
     width: 52,
     fixed: 'left',
-    formatter(row) {
+    formatter(row: any) {
       return row.markingGroupNumber === 0 ? '全部' : `第${row.markingGroupNumber}组`
     },
   },
   { label: '评卷员', prop: 'markerName', minWidth: 84, slotName: 'marker' },
-  { align: 'center', label: '评卷份数', prop: 'markingPaperCount', width: 72 },
-  { align: 'center', label: '当日可阅', prop: 'markDayCount', width: 72 },
-  { align: 'center', label: '剩余可阅', prop: 'todoMarkDayCount', width: 72 },
-  { align: 'center', label: '客观题0分量', prop: 'objectiveZero', width: 100 },
-  { align: 'center', label: '客观平均分', prop: 'objectiveAvg', width: 90 },
-  { align: 'center', label: '客观标准差', prop: 'objectiveStd', width: 80 },
-  { align: 'center', label: '重评/待确认', prop: 'reMarkUnConfirmCount', width: 100 },
-  { align: 'center', label: '抽查量', prop: 'checkCount', width: 70 },
-  { align: 'center', label: '抽查改正量', prop: 'checkCorrectCount', width: 90 },
-  { align: 'center', label: '相关系数', prop: 'xyRelate', width: 70 },
-  { align: 'center', label: '平均分', prop: 'avg', width: 60 },
-  { align: 'center', label: '标准差', prop: 'std', width: 60 },
-  { align: 'center', label: '近5分钟最高分', prop: 'scoreTop', width: 100 },
-  { align: 'center', label: '近5分钟最低分', prop: 'scoreLow', width: 100 },
-  { align: 'center', label: '近5分钟客主比', prop: 'objSubRate', width: 100 },
-  { align: 'center', label: '平均客主比', prop: 'objSubAvgRate', width: 90 },
+  { align: 'center', label: '评卷份数', prop: 'markingPaperCount', width: 92 },
+  { align: 'center', label: '当日可阅', prop: 'markDayCount', width: 92 },
+  { align: 'center', label: '剩余可阅', prop: 'todoMarkDayCount', width: 92 },
+  { align: 'center', label: '客观题0分量', prop: 'objectiveZero', width: 120 },
+  { align: 'center', label: '客观平均分', prop: 'objectiveAvg', width: 110 },
+  { align: 'center', label: '客观标准差', prop: 'objectiveStd', width: 104 },
+  { align: 'center', label: '重评/待确认', prop: 'reMarkUnConfirmCount', width: 120 },
+  { align: 'center', label: '抽查量', prop: 'checkCount', width: 90 },
+  { align: 'center', label: '抽查改正量', prop: 'checkCorrectCount', width: 110 },
+  { align: 'center', label: '相关系数', prop: 'xyRelate', width: 90 },
+  { align: 'center', label: '平均分', prop: 'avg', width: 80 },
+  { align: 'center', label: '标准差', prop: 'std', width: 80 },
+  { align: 'center', label: '近5分钟最高分', prop: 'scoreTop', width: 124 },
+  { align: 'center', label: '近5分钟最低分', prop: 'scoreLow', width: 124 },
+  { align: 'center', label: '近5分钟客主比', prop: 'objSubRate', width: 124 },
+  { align: 'center', label: '平均客主比', prop: 'objSubAvgRate', width: 110 },
   {
     align: 'center',
     label: '在线',
     prop: 'online',
-    width: 52,
-    formatter(row) {
+    width: 72,
+    formatter(row: any) {
       return row.online ? '在线' : '离线'
     },
   },
-  { align: 'center', label: '状态', prop: 'markingStatus', width: 80 },
-  { align: 'center', label: '速度', prop: 'markingRate', width: 46 },
-  { align: 'center', label: '综合系数', prop: 'integration', width: 70 },
-]
+  { align: 'center', label: '状态', prop: 'markingStatus', width: 100 },
+  { align: 'center', label: '速度', prop: 'markingRate', width: 66 },
+  { align: 'center', label: '综合系数', prop: 'integration', width: 90 },
+].map((col: any) => {
+  if (!['小组', '评卷员'].includes(col.label)) col.sortable = true
+  return col
+})
 const visable = ref(false)
 const rowContextmenu = (row: any, column: any, event: any) => {
   console.log(row, column, event)

+ 1 - 1
src/modules/analysis/personnel-statistics/index.vue

@@ -8,7 +8,7 @@
         </template>
       </base-form>
     </div>
-    <div class="flex-1 p-small">
+    <div v-loading="loading" class="flex-1 p-small">
       <component
         :is="fetchModel.expand ? StatisticsPersonnel : StatisticsGroup"
         :data="data"

+ 1 - 0
src/modules/bootstrap/change-password/index.vue

@@ -52,6 +52,7 @@ const rules: EpFormRules = {
           cb()
         }
       },
+      trigger: 'change',
     },
   ],
 }