แก้ไขความถูกต้องรายการลงเวลาพิเศษ
This commit is contained in:
parent
eb08a9f209
commit
cd2c03d461
2 changed files with 15 additions and 8 deletions
|
|
@ -104,6 +104,7 @@ export const useSpecialTimeStore = defineStore("LeaveSpecialTime", () => {
|
|||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
console.log(month.value);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -118,6 +119,7 @@ export const useSpecialTimeStore = defineStore("LeaveSpecialTime", () => {
|
|||
console.log(pageSize.value);
|
||||
|
||||
fetchData();
|
||||
console.log("page");
|
||||
}
|
||||
|
||||
//--------------|ฟิลเตอร์|--------------------------------------//
|
||||
|
|
|
|||
|
|
@ -140,12 +140,6 @@ function filterFn() {
|
|||
dataSpecialTime.fetchData();
|
||||
}
|
||||
|
||||
/**Hook */
|
||||
onMounted(async () => {
|
||||
console.log("test");
|
||||
await dataSpecialTime.fetchData();
|
||||
});
|
||||
|
||||
/** Function Date */
|
||||
const dateMonth = ref<any>({
|
||||
month: new Date().getMonth(),
|
||||
|
|
@ -159,10 +153,22 @@ const updateMonth = async (e: DataDateMonthObject) => {
|
|||
dataSpecialTime.month = dateMonth.value.month + 1;
|
||||
dataSpecialTime.year = dateMonth.value.year;
|
||||
// filterKeyword.value = "";
|
||||
await dataSpecialTime.fetchData();
|
||||
console.log(dateMonth);
|
||||
}
|
||||
await dataSpecialTime.fetchData();
|
||||
};
|
||||
|
||||
/**Hook */
|
||||
onMounted(async () => {
|
||||
//อัพเดทเป็นวันปัจจุบันเมื่อเข้าหน้านี้
|
||||
const toDay = ref<Date>(new Date());
|
||||
const monthToday = toDay.value.getMonth();
|
||||
const yearToday = toDay.value.getFullYear();
|
||||
dataSpecialTime.month = monthToday + 1;
|
||||
dataSpecialTime.year = yearToday;
|
||||
await dataSpecialTime.fetchData();
|
||||
});
|
||||
|
||||
//แปลงเดือนเป็นไทย
|
||||
const monthYearThai = (val: any) => {
|
||||
if (val == null) return "";
|
||||
|
|
@ -255,7 +261,6 @@ const monthYearThai = (val: any) => {
|
|||
<d-table
|
||||
:columns="dataSpecialTime.columns"
|
||||
:rows="dataSpecialTime.rows"
|
||||
:filter="filterKeyword"
|
||||
row-key="tb-list"
|
||||
flat
|
||||
bordered
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue