fix download file log

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-11-19 09:32:32 +07:00
parent 1288a7b08f
commit 658fd6705e
3 changed files with 13 additions and 9 deletions

View file

@ -462,17 +462,17 @@ function onSendCSV() {
.finally(() => {});
}
function downloadTxt() {
async function downloadTxt() {
const queryString = {
id: currentlogData.value?.id,
};
http
await http
.get(`${config.API.log}/report/logsDetail`, {
params: queryString,
})
.then((res) => {
.then(async (res) => {
const data = res.data;
generateTxt(data, `LOG_${date2Thai(new Date(startDate.value))}`);
await generateTxt(data, `LOG_${date2Thai(new Date(startDate.value))}`);
})
.catch((e) => {
messageError($q, e);