fix bug Loading หน้า Logs
This commit is contained in:
parent
f033d88fbb
commit
4c1c2c6084
1 changed files with 11 additions and 6 deletions
|
|
@ -243,6 +243,7 @@ async function selectedOrg(id: string) {
|
||||||
* ฟังชั่นสำหรับดึงไอดีโครงสร้างปัจจุบัน
|
* ฟังชั่นสำหรับดึงไอดีโครงสร้างปัจจุบัน
|
||||||
*/
|
*/
|
||||||
async function fetchOrganizationActive() {
|
async function fetchOrganizationActive() {
|
||||||
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.activeOrganization)
|
.get(config.API.activeOrganization)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
|
@ -253,6 +254,9 @@ async function fetchOrganizationActive() {
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -279,9 +283,7 @@ async function fatchOrg(id: string) {
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
hideLoader();
|
});
|
||||||
})
|
|
||||||
.finally(() => {});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*** scroll และโหลดข้อมูลรายการ Logs เพิ่ม */
|
/*** scroll และโหลดข้อมูลรายการ Logs เพิ่ม */
|
||||||
|
|
@ -441,6 +443,7 @@ function updateDate() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSendCSV() {
|
function onSendCSV() {
|
||||||
|
showLoader();
|
||||||
const queryString = {
|
const queryString = {
|
||||||
rootId: qureyBody.rootId ?? undefined,
|
rootId: qureyBody.rootId ?? undefined,
|
||||||
// size: size.value ?? undefined,
|
// size: size.value ?? undefined,
|
||||||
|
|
@ -455,14 +458,16 @@ function onSendCSV() {
|
||||||
.get(config.API.reportLog, {
|
.get(config.API.reportLog, {
|
||||||
params: queryString,
|
params: queryString,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
genReportXLSX(data, `LOG_${date2Thai(new Date(startDate.value))}`);
|
await genReportXLSX(data, `LOG_${date2Thai(new Date(startDate.value))}`);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {});
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function downloadTxt() {
|
async function downloadTxt() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue