แก้ไขให้ดึง month เเละ year มาจากวันนี้
This commit is contained in:
parent
7ca4d66516
commit
ef21947250
1 changed files with 4 additions and 3 deletions
|
|
@ -40,8 +40,9 @@ export const useSpecialTimeStore = defineStore("LeaveSpecialTime", () => {
|
||||||
const checkOutStatus = ref<String>("ปกติ");
|
const checkOutStatus = ref<String>("ปกติ");
|
||||||
|
|
||||||
// paging
|
// paging
|
||||||
const year = ref<number>(2023);
|
const toDay = ref<Date>(new Date());
|
||||||
const month = ref<number>(11);
|
const month = toDay.value.getMonth();
|
||||||
|
const year = toDay.value.getFullYear();
|
||||||
const page = ref<number>(1);
|
const page = ref<number>(1);
|
||||||
const total = ref<number>(0);
|
const total = ref<number>(0);
|
||||||
const pageSize = ref<number>(10);
|
const pageSize = ref<number>(10);
|
||||||
|
|
@ -56,7 +57,7 @@ export const useSpecialTimeStore = defineStore("LeaveSpecialTime", () => {
|
||||||
await http
|
await http
|
||||||
.get(
|
.get(
|
||||||
config.API.specialTime() +
|
config.API.specialTime() +
|
||||||
`?year=${year.value}&month=${month.value}&page=${page.value}&pageSize=${pageSize.value}&keyword=${filter.value}`
|
`?year=${year}&month=${month}&page=${page.value}&pageSize=${pageSize.value}&keyword=${filter.value}`
|
||||||
)
|
)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
let data = res.data.result.data;
|
let data = res.data.result.data;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue