Kaynağa Gözat

仲裁卷,问题卷,重评卷,雷同卷改为分页,100行一页

刘洋 1 yıl önce
ebeveyn
işleme
66db537239

+ 15 - 9
src/modules/marking/arbitration/index.vue

@@ -47,11 +47,12 @@
               <el-button :disabled="loading" :loading="loading" type="primary" @click="onSearch">查询</el-button>
             </template>
           </base-form>
-          <div>
+          <div class="flex items-center justify-between detail-info-table-header">
             <el-button custom-1 size="small" class="detail-info-label">
               <span class="">仲裁卷: 共</span>
-              <span class="m-l-extra-small detail-info-label-num">{{ tableData.length }}</span>
+              <span class="m-l-extra-small detail-info-label-num">{{ pagination.total }}</span>
             </el-button>
+            <btn-pagination v-model="currentPage" :pagination="pagination"></btn-pagination>
           </div>
           <div class="flex-1 scroll-y-auto m-t-mini">
             <base-table
@@ -101,13 +102,14 @@ import BaseTable from '@/components/element/BaseTable.vue'
 import MarkHistoryList from '@/components/shared/MarkHistoryList.vue'
 import RightButton from '@/components/shared/RightButton.vue'
 import ImagePreview from '@/components/shared/ImagePreview.vue'
-
+import BtnPagination from '@/components/common/BtnPagination.vue'
 import type { SetImgBgOption } from '@/hooks/useSetImgBg'
 import type { ExtractApiParams, ExtractMultipleApiResponse } from '@/api/api'
 import type { MarkHeaderInstance, EpFormItem, EpTableColumn } from 'global-type'
 import { Splitpanes, Pane } from 'splitpanes'
 import { setPaneSize } from '@/utils/common'
 import useMainStore from '@/store/main'
+import useTable from '@/hooks/useTable'
 const mainStore = useMainStore()
 const paneSize = computed(() => {
   return mainStore.paneSizeConfig[location.pathname] || 60
@@ -169,11 +171,11 @@ const { subjectList, mainQuestionList, dataModel, changeModelValue, onOptionInit
   'question',
 ])
 
-const formModel = reactive<ExtractApiParams<'getArbitrationList'>>({
+const formModel = reactive<any>({
   mainNumber: dataModel.question,
   status: 'INITIAL',
-  pageNumber: 1,
-  pageSize: 9999999,
+  // pageNumber: 1,
+  // pageSize: 9999999,
   subjectCode: dataModel.subject,
 })
 
@@ -241,7 +243,10 @@ const columns: EpTableColumn[] = [
   { label: '大组长客主比', prop: 'chiefRatio', minWidth: 125, sortable: true },
 ]
 
-const { fetch: getArbitrationList, result: arbitrationList, loading } = useFetch('getArbitrationList')
+// const { fetch: getArbitrationList, result: arbitrationList, loading } = useFetch('getArbitrationList')
+const { pagination, currentPage, data, fetchTable, loading } = useTable('getArbitrationList', formModel, {
+  pageSize: 100,
+})
 
 const {
   tableRef,
@@ -252,7 +257,7 @@ const {
   visibleHistory,
   onDbClick,
   onCurrentChange,
-} = useTableCheck(arbitrationList)
+} = useTableCheck(data)
 
 const { fetch: viewArbitrationPaper } = useFetch('viewArbitrationPaper')
 
@@ -263,7 +268,8 @@ watch(currentArbitration, () => {
 })
 
 const onSearch = async () => {
-  getArbitrationList(formModel)
+  // getArbitrationList(formModel)
+  fetchTable()
 }
 
 /** 仲裁卷打分 */

+ 15 - 9
src/modules/marking/problem/index.vue

@@ -60,11 +60,12 @@
               <el-button :loading="loading" type="primary" @click="onSearch">查询</el-button>
             </template>
           </base-form>
-          <div>
+          <div class="flex items-center justify-between detail-info-table-header">
             <el-button custom-1 size="small" class="detail-info-label">
               <span class="">问题卷: 共</span>
-              <span class="m-l-extra-small detail-info-label-num">{{ tableData.length }}</span>
+              <span class="m-l-extra-small detail-info-label-num">{{ pagination.total }}</span>
             </el-button>
+            <btn-pagination v-model="currentPage" :pagination="pagination"></btn-pagination>
           </div>
           <div class="flex-1 scroll-auto m-t-mini">
             <base-table
@@ -116,7 +117,8 @@ import MarkHistoryList from '@/components/shared/MarkHistoryList.vue'
 import SendBackMark from '@/components/shared/SendBackMark.vue'
 import RightButton from '@/components/shared/RightButton.vue'
 import ImagePreview from '@/components/shared/ImagePreview.vue'
-
+import BtnPagination from '@/components/common/BtnPagination.vue'
+import useTable from '@/hooks/useTable'
 import type { SetImgBgOption } from '@/hooks/useSetImgBg'
 import type { ExtractApiParams, ExtractApiResponse, ExtractMultipleApiResponse } from '@/api/api'
 import type { MarkHeaderInstance, EpFormItem, EpTableColumn } from 'global-type'
@@ -201,12 +203,12 @@ const { subjectList, mainQuestionList, dataModel, changeModelValue, onOptionInit
   'question',
 ])
 
-const formModel = reactive<ExtractApiParams<'getProblemHistory'>>({
+const formModel = reactive<any>({
   mainNumber: dataModel.question,
   problemType: '',
   status: 'INITIAL',
-  pageNumber: 1,
-  pageSize: 9999999,
+  // pageNumber: 1,
+  // pageSize: 9999999,
   subjectCode: dataModel.subject,
 })
 
@@ -285,7 +287,10 @@ const columns: EpTableColumn[] = [
   { label: '处理时间', prop: 'solveTime', minWidth: 160 },
 ]
 
-const { fetch: getProblemHistory, result: problemHistory, loading } = useFetch('getProblemHistory')
+// const { fetch: getProblemHistory, result: problemHistory, loading } = useFetch('getProblemHistory')
+const { pagination, currentPage, data, fetchTable, loading } = useTable('getProblemHistory', formModel, {
+  pageSize: 100,
+})
 
 const {
   tableRef,
@@ -296,7 +301,7 @@ const {
   visibleHistory,
   onDbClick,
   onCurrentChange,
-} = useTableCheck(problemHistory)
+} = useTableCheck(data)
 
 const showScoreBoard = ref(false)
 watch(currentProblem, () => {
@@ -314,7 +319,8 @@ watch(currentProblem, () => {
 })
 
 const onSearch = async () => {
-  getProblemHistory(formModel)
+  // getProblemHistory(formModel)
+  fetchTable()
 }
 
 /** 问题卷打分 */

+ 15 - 8
src/modules/marking/repeat/index.vue

@@ -55,11 +55,12 @@
               <el-button :loading="loading" type="primary" @click="onSearch">查询</el-button>
             </template>
           </base-form>
-          <div>
+          <div class="flex items-center justify-between detail-info-table-header">
             <el-button custom-1 size="small" class="detail-info-label">
               <span class="">重评卷: 共</span>
-              <span class="m-l-extra-small detail-info-label-num">{{ tableData.length }}</span>
+              <span class="m-l-extra-small detail-info-label-num">{{ pagination.total }}</span>
             </el-button>
+            <btn-pagination v-model="currentPage" :pagination="pagination"></btn-pagination>
           </div>
           <div class="flex-1 scroll-auto m-t-mini">
             <base-table
@@ -109,6 +110,8 @@ import BaseTable from '@/components/element/BaseTable.vue'
 import MarkHistoryList from '@/components/shared/MarkHistoryList.vue'
 import RightButton from '@/components/shared/RightButton.vue'
 import ImagePreview from '@/components/shared/ImagePreview.vue'
+import BtnPagination from '@/components/common/BtnPagination.vue'
+import useTable from '@/hooks/useTable'
 
 import type { SetImgBgOption } from '@/hooks/useSetImgBg'
 import type { ExtractApiParams, ExtractMultipleApiResponse } from '@/api/api'
@@ -179,11 +182,11 @@ const { subjectList, mainQuestionList, dataModel, changeModelValue, onOptionInit
   'question',
 ])
 
-const formModel = reactive<ExtractApiParams<'getReMarkPaperList'>>({
+const formModel = reactive<any>({
   mainNumber: dataModel.question,
   confirm: false,
-  pageNumber: 1,
-  pageSize: 9999999,
+  // pageNumber: 1,
+  // pageSize: 9999999,
   subjectCode: dataModel.subject,
 })
 
@@ -248,7 +251,10 @@ const columns: EpTableColumn[] = [
   { label: '重评时间', prop: 'reMarkTime', minWidth: 130 },
 ]
 
-const { fetch: getReMarkPaperList, result: reMarkPaperList, loading } = useFetch('getReMarkPaperList')
+// const { fetch: getReMarkPaperList, result: reMarkPaperList, loading } = useFetch('getReMarkPaperList')
+const { pagination, currentPage, data, fetchTable, loading } = useTable('getReMarkPaperList', formModel, {
+  pageSize: 100,
+})
 
 const {
   tableRef,
@@ -259,7 +265,7 @@ const {
   visibleHistory,
   onDbClick,
   onCurrentChange,
-} = useTableCheck(reMarkPaperList)
+} = useTableCheck(data)
 watch(currentReMarkPaper, () => {
   if (currentReMarkPaper.value) {
     modelScore.value = JSON.parse(JSON.stringify(currentReMarkPaper.value.markScores || []))
@@ -269,7 +275,8 @@ watch(currentReMarkPaper, () => {
   }
 })
 const onSearch = async () => {
-  getReMarkPaperList(formModel)
+  // getReMarkPaperList(formModel)
+  fetchTable()
 }
 
 const { fetch: confirmReMarkPaper } = useFetch('confirmReMarkPaper')

+ 15 - 8
src/modules/marking/similar/index.vue

@@ -31,11 +31,12 @@
               <el-button :loading="loading" type="primary" @click="onSearch">查询</el-button>
             </template>
           </base-form>
-          <div>
+          <div class="flex items-center justify-between detail-info-table-header">
             <el-button custom-1 size="small" class="detail-info-label">
               <span class="">雷同卷: 共</span>
-              <span class="m-l-extra-small detail-info-label-num">{{ tableData.length }}</span>
+              <span class="m-l-extra-small detail-info-label-num">{{ pagination.total }}</span>
             </el-button>
+            <btn-pagination v-model="currentPage" :pagination="pagination"></btn-pagination>
           </div>
           <div class="flex-1 scroll-auto m-t-mini">
             <base-table
@@ -80,6 +81,8 @@ import BaseTable from '@/components/element/BaseTable.vue'
 import MarkHistoryList from '@/components/shared/MarkHistoryList.vue'
 import RightButton from '@/components/shared/RightButton.vue'
 import MarkHeader from '@/components/shared/MarkHeader.vue'
+import BtnPagination from '@/components/common/BtnPagination.vue'
+import useTable from '@/hooks/useTable'
 
 import type { SetImgBgOption } from '@/hooks/useSetImgBg'
 import type { ExtractMultipleApiResponse, ExtractApiParams } from '@/api/api'
@@ -115,11 +118,11 @@ const { subjectList, mainQuestionList, dataModel, changeModelValue, onOptionInit
   'question',
 ])
 
-const formModel = reactive<ExtractApiParams<'getSimilarPaperList'>>({
+const formModel = reactive<any>({
   mainNumber: dataModel.question,
   status: '',
-  pageNumber: 1,
-  pageSize: 9999999,
+  // pageNumber: 1,
+  // pageSize: 9999999,
   subjectCode: dataModel.subject,
 })
 
@@ -186,7 +189,10 @@ const columns: EpTableColumn<RowType>[] = [
   },
 ]
 
-const { fetch: getSimilarPaperList, result: similarPaperList, loading } = useFetch('getSimilarPaperList')
+// const { fetch: getSimilarPaperList, result: similarPaperList, loading } = useFetch('getSimilarPaperList')
+const { pagination, currentPage, data, fetchTable, loading } = useTable('getSimilarPaperList', formModel, {
+  pageSize: 100,
+})
 
 const {
   tableRef,
@@ -197,7 +203,7 @@ const {
   visibleHistory,
   onDbClick,
   onCurrentChange,
-} = useTableCheck(similarPaperList)
+} = useTableCheck(data)
 watch(currentSamePaper, () => {
   if (imgWrap1.value) {
     imgWrap1.value.scrollTop = 0
@@ -208,7 +214,8 @@ watch(currentSamePaper, () => {
 })
 const onSearch = async () => {
   formModel.status === '' && (formModel.status = null)
-  getSimilarPaperList(formModel)
+  // getSimilarPaperList(formModel)
+  fetchTable()
 }
 
 /** 是否雷同 */