รายการทั้งหมด / เพิ่มฟิล
This commit is contained in:
parent
f5c935b5df
commit
061cb27c41
5 changed files with 54 additions and 48 deletions
|
|
@ -22,7 +22,7 @@ import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore";
|
|||
const mixin = useCounterMixin();
|
||||
const workStore = useWorklistDataStore();
|
||||
const { date2Thai, dateToISO, showLoader, hideLoader, messageError } = mixin;
|
||||
|
||||
const total = ref<number>(0);
|
||||
const $q = useQuasar(); //ใช้ noti quasar
|
||||
|
||||
/** ตัวแปร querySting*/
|
||||
|
|
@ -137,6 +137,7 @@ async function fetchListTimeRecord() {
|
|||
`?startDate=${querySting.startDate}&endDate=${querySting.startDate}&status=${querySting.status}&page=${querySting.page}&pageSize=${querySting.pageSize}&keyword=${querySting.keyword}`
|
||||
)
|
||||
.then((res) => {
|
||||
total.value = res.data.result.total;
|
||||
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
||||
const datalist: TableRowsTime[] = res.data.result.data.map(
|
||||
(e: DataResTime) => ({
|
||||
|
|
@ -200,6 +201,7 @@ onMounted(async () => {
|
|||
<template>
|
||||
<ToolBar :filetStatus="filetStatus" @update:pagination="updatePaging" />
|
||||
<TableList
|
||||
:total="total"
|
||||
:rows="rows.length > 0 ? rows : []"
|
||||
:page="page"
|
||||
:rowsPerPage="rowsPerPage"
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import TableList from "@/modules/09_leave/components/1_Work/TableList.vue";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore";
|
||||
/** useStore */
|
||||
const total = ref<number>(0);
|
||||
const mixin = useCounterMixin();
|
||||
const workStore = useWorklistDataStore();
|
||||
const { date2Thai, dateToISO, showLoader, hideLoader, messageError } = mixin;
|
||||
|
|
@ -110,6 +111,7 @@ async function fetchListLogRecord() {
|
|||
}&pageSize=${rowsPerPage.value}&keyword=${keyword.value}`
|
||||
)
|
||||
.then((res) => {
|
||||
total.value = res.data.result.total;
|
||||
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
||||
let datalist: TableRows[] = res.data.result.data.map((e: DataResLog) => ({
|
||||
id: e.id,
|
||||
|
|
@ -160,6 +162,7 @@ onMounted(async () => {
|
|||
<ToolBarDate :keyword="keyword" @update:pagination="updatePagingProp" />
|
||||
|
||||
<TableList
|
||||
:total="total"
|
||||
:rows="rows.length > 0 ? rows : []"
|
||||
:page="page"
|
||||
:rowsPerPage="rowsPerPage"
|
||||
|
|
|
|||
|
|
@ -35,6 +35,10 @@ const props = defineProps({
|
|||
type: Number,
|
||||
require: true,
|
||||
},
|
||||
total: {
|
||||
type: Number,
|
||||
require: true,
|
||||
},
|
||||
tab: {
|
||||
type: String,
|
||||
require: true,
|
||||
|
|
@ -188,6 +192,7 @@ onMounted(() => {
|
|||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:pagination="scope">
|
||||
ทั้งหมด {{ total }} รายการ
|
||||
<q-pagination
|
||||
v-model="currentPage"
|
||||
active-color="primary"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue