刘洋 пре 1 година
родитељ
комит
1707aa6b34

+ 1 - 0
src/constants/dicts.ts

@@ -45,4 +45,5 @@ export const TaskTypeOption = [
   { label: 'CET成绩导出', value: 'CET_SCORE_EXPORT' },
   { label: '考生导入', value: 'STUDENT_IMPORT' },
   { label: '用户姓名导入', value: 'USER_NAME_IMPORT' },
+  { label: '人机仲裁大题任务同步', value: 'ARBITRATION_TASK_SYNC' },
 ]

+ 15 - 7
src/hooks/useTable.ts

@@ -1,4 +1,4 @@
-import { reactive, ref, computed, watch, unref } from 'vue'
+import { reactive, ref, computed, watch, unref, onUnmounted } from 'vue'
 import { typeOf } from '@/utils/common'
 import useFetch from '@/hooks/useFetch'
 import useSection from '@/hooks/useSection'
@@ -132,32 +132,40 @@ const useTable = <
   })
 
   const pagination = computed(() => {
-    return Object.assign(DEFAULT_PAGINATION, {
+    return Object.assign({}, DEFAULT_PAGINATION, {
       pageSize: baseParams.pageSize,
       pageCount: pageCount.value,
       total: total.value,
     })
   })
   const isLastPage = computed(() => {
-    return currentPage.value * baseParams.pageSize + 1 > total.value
+    // return currentPage.value * baseParams.pageSize + 1 > total.value
+    return pageCount.value == currentPage.value
   })
-  bus.on('toNextTablePage', () => {
+
+  const busFunc1 = () => {
     // if (isLastPage.value) {
     //   ElMessage.warning('当前页已是最后一页')
     // } else {
     currentPage.value = Number(currentPage.value) + 1
     // }
-  })
+  }
+  bus.on('toNextTablePage', busFunc1)
 
-  bus.on('atBottomRowFromUseTableCheck', () => {
+  const busFunc2 = () => {
+    console.log('pageCount.value == currentPage.value', pageCount.value, currentPage.value)
     //被useTableCheck告知到了最后一行
     if (isLastPage.value) {
       ElMessage.warning('当前页已是最后一页')
     } else {
       mainStore.setRowNextBottomDialogStatus(true)
     }
+  }
+  bus.on('atBottomRowFromUseTableCheck', busFunc2)
+  onUnmounted(() => {
+    bus.off('toNextTablePage', busFunc1)
+    bus.off('atBottomRowFromUseTableCheck', busFunc2)
   })
-
   return {
     tableRef,
     elTableRef,

+ 2 - 2
src/modules/admin-data/export/index.vue

@@ -16,7 +16,7 @@
           v-model:current-page="currentPage"
           background
           right
-          :hide-on-single-page="true"
+          layout="total,pager"
         ></el-pagination>
       </div>
     </div>
@@ -81,7 +81,7 @@ const items = computed<EpFormItem[]>(() => {
   ]
 })
 
-const { pagination, currentPage, loading, data, fetchTable } = useTable('getCetScoreList', model)
+const { pagination, currentPage, loading, data, fetchTable } = useTable('getCetScoreList', model, { pageSize: 20 })
 
 const columns: EpTableColumn[] = [
   { label: '准考证号', prop: 'examNumber', minWidth: 160, fixed: 'left' },

+ 11 - 7
src/modules/analysis/view-marked-detail/index.vue

@@ -82,6 +82,7 @@
           <div class="flex-1 scroll-auto m-t-mini">
             <base-table
               ref="tableRef"
+              v-loading="loading"
               border
               stripe
               size="small"
@@ -247,13 +248,16 @@ const columns: EpTableColumn<RowType>[] = [
   { label: '评卷时间', prop: 'markTime', minWidth: 130 },
 ]
 
-const { pagination, currentPage, data, fetchTable } = useTable('getPersonalMarkDetail', {
-  markerId: props.markerId,
-  score: (query.score as string) || '',
-  pageSize: 100,
-  subjectCode: query.subjectCode as string,
-  mainNumber: query.questionMainNumber as string,
-})
+const { pagination, currentPage, data, fetchTable, loading } = useTable(
+  'getPersonalMarkDetail',
+  {
+    markerId: props.markerId,
+    score: (query.score as string) || '',
+    subjectCode: query.subjectCode as string,
+    mainNumber: query.questionMainNumber as string,
+  },
+  { pageSize: 100 }
+)
 
 const queryPosition: any = query.markScore
   ? { markScore: query.markScore }

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

@@ -61,7 +61,7 @@
               <span class="">自定义抽查卷共:</span>
               <span class="m-l-extra-small detail-info-label-num">{{ pagination.total }}</span>
             </el-button>
-            <el-pagination
+            <!-- <el-pagination
               v-bind="pagination"
               v-model:current-page="currentPage"
               size="small"
@@ -71,11 +71,13 @@
               hide-on-single-page
               :pager-count="3"
               small
-            ></el-pagination>
+            ></el-pagination> -->
+            <btn-pagination v-model="currentPage" :pagination="pagination"></btn-pagination>
           </div>
           <div class="flex-1 scroll-auto m-t-mini">
             <base-table
               ref="tableRef"
+              v-loading="loading"
               border
               stripe
               size="small"
@@ -167,6 +169,7 @@ import type { MarkHeaderInstance, EpTableColumn, EpFormItem } from 'global-type'
 import { Splitpanes, Pane } from 'splitpanes'
 import { setPaneSize } from '@/utils/common'
 import useMainStore from '@/store/main'
+import BtnPagination from '@/components/common/BtnPagination.vue'
 const mainStore = useMainStore()
 const paneSize = computed(() => {
   return mainStore.paneSizeConfig[location.pathname] || 60
@@ -308,7 +311,7 @@ const transformQuery = (query: Record<string, string>) => {
   return params
 }
 
-const { pagination, currentPage, data, fetchTable } = useTable(
+const { pagination, currentPage, data, fetchTable, loading } = useTable(
   'getCustomQueryTasks',
   transformQuery(query as Record<string, string>),
   { pageSize: 100 }

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

@@ -53,7 +53,7 @@
             @load="imgLoaded"
           />
         </div> -->
-        <div ref="imgWrap" class="img-wrap scroll-auto flex-1 p-base">
+        <div ref="imgWrap" class="img-wrap scroll-auto flex-1 p-base" :class="{ 'text-center': center }">
           <img
             ref="paperImg"
             :src="dataUrl"

+ 4 - 2
src/modules/monitor/system-check/index.vue

@@ -67,7 +67,7 @@
               <span class="">系统抽查卷: 共</span>
               <span class="m-l-extra-small detail-info-label-num">{{ total }}</span>
             </el-button>
-            <el-pagination
+            <!-- <el-pagination
               v-bind="pagination"
               v-model:current-page="currentPage"
               size="small"
@@ -77,7 +77,8 @@
               hide-on-single-page
               :pager-count="3"
               small
-            ></el-pagination>
+            ></el-pagination> -->
+            <btn-pagination v-model="currentPage" :pagination="pagination"></btn-pagination>
           </div>
           <div class="flex-1 scroll-auto m-t-mini">
             <base-table
@@ -144,6 +145,7 @@ import type { MarkHeaderInstance, EpFormItem, EpTableColumn } from 'global-type'
 import { Splitpanes, Pane } from 'splitpanes'
 import { setPaneSize } from '@/utils/common'
 import useMainStore from '@/store/main'
+import BtnPagination from '@/components/common/BtnPagination.vue'
 const mainStore = useMainStore()
 const paneSize = computed(() => {
   return mainStore.paneSizeConfig[location.pathname] || 60