fix select filter ระบบลา
This commit is contained in:
parent
123a74e911
commit
1f80bda5ff
3 changed files with 55 additions and 37 deletions
|
|
@ -38,23 +38,32 @@ const maxPage = ref<number>(1);
|
|||
|
||||
//** เรียกข้อมูลจาก API*/
|
||||
async function fecthLeaveList() {
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.leaveListDelete(), querySting)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
console.log(data);
|
||||
querySting.status = await (querySting.status == null
|
||||
? "ALL"
|
||||
: querySting.status);
|
||||
querySting.type = await (querySting.type == null
|
||||
? "00000000-0000-0000-0000-000000000000"
|
||||
: querySting.type);
|
||||
|
||||
maxPage.value = Math.ceil(data.total / querySting.pageSize);
|
||||
console.log(maxPage.value);
|
||||
fetchListLeaveReject(data.data); /** ส่งข้อมูลไป stores*/
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
if (querySting.status != null && querySting.type != null) {
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.leaveListDelete(), querySting)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
console.log(data);
|
||||
|
||||
maxPage.value = Math.ceil(data.total / querySting.pageSize);
|
||||
console.log(maxPage.value);
|
||||
fetchListLeaveReject(data.data); /** ส่งข้อมูลไป stores*/
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
// const data = APIDATA.data;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue