แก้ไข paging สรรหา > รายชื่อคัดเลือก
This commit is contained in:
parent
0939d490df
commit
5d361bcbfc
2 changed files with 25 additions and 18 deletions
|
|
@ -48,9 +48,9 @@
|
|||
<q-card flat bordered class="col-12 q-pt-sm">
|
||||
<TableCandidate style="max-height: 80vh" :rows="rows" :columns="columns" :filter="filter"
|
||||
:visible-columns="visibleColumns" v-model:inputfilter="filter" v-model:inputvisible="visibleColumns"
|
||||
v-model:inputvisibleFilter="status" v-model:optionsFilter="optionsStatus"
|
||||
:nornmalData="true" :paging="true" :titleText="''" :statusPayment="statusPayment" :setSeat="setSeat"
|
||||
:fetchData="fetchDataCom" :history="true" :page-size="page_size" :total="total" :page="page" :changePage="changePage" :max-page="maxPage">
|
||||
v-model:inputvisibleFilter="status" v-model:optionsFilter="optionsStatus" :nornmalData="true" :paging="true"
|
||||
:titleText="''" :statusPayment="statusPayment" :setSeat="setSeat" :fetchData="fetchDataCom" :history="true"
|
||||
:page-size="page_size" :total="total" :page="page" :changePage="changePage" :max-page="maxPage">
|
||||
<template #columns="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td auto-width>
|
||||
|
|
@ -100,11 +100,11 @@
|
|||
</div>
|
||||
</div>
|
||||
<div v-else-if="col.name == 'status'" :class="props.row.status == 'checkRegister' ||
|
||||
props.row.status == 'checkPayment' ||
|
||||
props.row.status == 'checkSeat' ||
|
||||
props.row.status == 'checkPoint'
|
||||
? 'text-blue'
|
||||
: ''
|
||||
props.row.status == 'checkPayment' ||
|
||||
props.row.status == 'checkSeat' ||
|
||||
props.row.status == 'checkPoint'
|
||||
? 'text-blue'
|
||||
: ''
|
||||
">
|
||||
{{ statusCandidate(props.row.status) }}
|
||||
</div>
|
||||
|
|
@ -395,7 +395,7 @@ const fetchDataCom = async () => {
|
|||
|
||||
// paging
|
||||
const page = ref<number>(1)
|
||||
const page_size = ref<number>(5)
|
||||
const page_size = ref<number>(25)
|
||||
const total = ref<number>(0)
|
||||
const maxPage = ref<number>(1)
|
||||
|
||||
|
|
@ -409,10 +409,10 @@ const fetchData = async (loading: boolean = true) => {
|
|||
loading === true ?? showLoader()
|
||||
await http
|
||||
.get(config.API.candidateOfPeriodExam(status.value, examId.value) + `?page=${page.value}&pageSize=${page_size.value}&keyword=${filter.value}`)
|
||||
.then((res) => {
|
||||
.then(async (res) => {
|
||||
const data = res.data.result;
|
||||
total.value = data.total
|
||||
maxPage.value = Math.ceil(data.total / page_size.value)
|
||||
maxPage.value = await Math.ceil(data.total / page_size.value)
|
||||
rows.value = [];
|
||||
data.data.map((r: any) => {
|
||||
rows.value.push({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue