แก้ไขชื่อไฟล์ตอน โหลดไฟล

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-10-03 09:24:29 +07:00
parent f70a20497d
commit 77e4294ec5

View file

@ -66,7 +66,7 @@ const fecthlistRound = async () => {
year: e.period_year,
name: e.period_name,
}));
filterOtion.value = optionsList.value
filterOtion.value = optionsList.value;
})
.catch((err) => {
messageError($q, err);
@ -119,7 +119,10 @@ const downloadReport = async (
})
.then(async (res) => {
if (download) {
downloadFile(res, `${titleReport} ${selectList.value.name}.${type}`);
downloadFile(
res,
`${titleReport.value} ${selectList.value.name}.${type}`
);
} else {
const url = URL.createObjectURL(new Blob([res.data]));
showDocument(url);
@ -135,15 +138,13 @@ const downloadReport = async (
const filterSelector = (val: any, update: Function, name: any) => {
update(() => {
const needle = val.toLowerCase();
if (name === 'selectList') {
if (name === "selectList") {
filterOtion.value = optionsList.value.filter(
(v: any) => v.name.toLowerCase().indexOf(needle) > -1
);
(v: any) => v.name.toLowerCase().indexOf(needle) > -1
);
}
}
)
}
});
};
</script>
<template>
@ -166,7 +167,7 @@ const filterSelector = (val: any, update: Function, name: any) => {
<q-toolbar style="padding: 0">
<q-form ref="myForm" class="row items-center">
<q-select
style="width: 400px;"
style="width: 400px"
class="q-pa-none"
use-input
fill-input