Merge branch 'develop' into devTee
This commit is contained in:
commit
8664a904eb
7 changed files with 55 additions and 28 deletions
|
|
@ -28,7 +28,7 @@ const $q = useQuasar(); //ใช้ noti quasar
|
|||
/** ตัวแปร querySting*/
|
||||
const keyword = ref<string>("");
|
||||
const page = ref<number>(1);
|
||||
const rowsPerPage = ref<number>(3);
|
||||
const rowsPerPage = ref<number>(10);
|
||||
const maxPage = ref<number>(1);
|
||||
const filetStatus = ref<string>("ALL");
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ const rows = ref<TableRows[]>([]);
|
|||
/** ตัวแปร QueryString*/
|
||||
const keyword = ref<string>("");
|
||||
const page = ref<number>(1);
|
||||
const rowsPerPage = ref<number>(2);
|
||||
const rowsPerPage = ref<number>(10);
|
||||
const maxPage = ref<number>(1);
|
||||
|
||||
/** function เรียกข้อมูลรายการลงเวลาปฏิบัติงาน (รายการลงเวลา) */
|
||||
|
|
|
|||
|
|
@ -84,6 +84,11 @@ function closeDetail() {
|
|||
watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
||||
updateProp(pagination.value, currentPage.value);
|
||||
});
|
||||
|
||||
function updateRowsPerPagen(newPagination: any) {
|
||||
pagination.value.rowsPerPage = newPagination.rowsPerPage;
|
||||
currentPage.value = 1;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -98,7 +103,8 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
|||
class="custom-header-table"
|
||||
:visible-columns="workStore.visibleColumns"
|
||||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
v-model:pagination="pagination"
|
||||
:pagination="pagination"
|
||||
@update:pagination="updateRowsPerPagen"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
import type { DateFilter } from "@/modules/09_leave/interface/request/leave";
|
||||
import type {
|
||||
|
|
@ -106,6 +108,14 @@ const optionStatusMain = ref<DataOption[]>(
|
|||
|
||||
async function fetchOption() {
|
||||
console.log("loadOption รอ API");
|
||||
// await http
|
||||
// .get(config.API.leaveType())
|
||||
// .then((res) => {
|
||||
// console.log(res);
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// console.log(err);
|
||||
// });
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -69,12 +69,13 @@ function resetFilter() {
|
|||
filterRef.value.focus();
|
||||
}
|
||||
|
||||
function updateRowsPerPage(newPagination: any) {
|
||||
pagination.value = newPagination;
|
||||
currentPage.value = 1;
|
||||
}
|
||||
|
||||
function filterFn() {
|
||||
updatePaging(
|
||||
currentPage.value,
|
||||
Number(pagination.value.rowsPerPage),
|
||||
filter.value
|
||||
);
|
||||
updatePaging(1, Number(pagination.value.rowsPerPage), filter.value);
|
||||
}
|
||||
|
||||
function updatePaging(p: number, pS: number, key: string) {
|
||||
|
|
@ -82,7 +83,12 @@ function updatePaging(p: number, pS: number, key: string) {
|
|||
}
|
||||
|
||||
watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
||||
filterFn();
|
||||
emit(
|
||||
"update:queryString",
|
||||
currentPage.value,
|
||||
Number(pagination.value.rowsPerPage),
|
||||
filter.value
|
||||
);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -109,7 +115,6 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
|||
ref="filterRef"
|
||||
@keydown.enter.prevent="filterFn"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
style="max-width: 200px"
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
|
|
@ -148,8 +153,9 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
|||
virtual-scroll
|
||||
:virtual-scroll-sticky-size-start="48"
|
||||
dense
|
||||
v-model:pagination="pagination"
|
||||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
:pagination="pagination"
|
||||
@update:pagination="updateRowsPerPage"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue