no message

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-09-06 13:11:18 +07:00
parent 1b3218eade
commit db8280d1bb
2 changed files with 11 additions and 15 deletions

View file

@ -179,16 +179,6 @@ const getRequest = async (id: string) => {
await fetchData(); await fetchData();
}); });
}; };
// filename: string
const downloadFile = (response: any) => {
const link = document.createElement("a");
var fileName = "filename";
link.href = window.URL.createObjectURL(new Blob([response.data]));
link.setAttribute("download", fileName);
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
};
// //
const filterKeyword = ref<string>(""); const filterKeyword = ref<string>("");
@ -385,9 +375,8 @@ const paginationLabel = (start: string, end: string, total: string) => {
round round
color="light-blue-8" color="light-blue-8"
icon="mdi-file-download" icon="mdi-file-download"
@click="downloadFile(props.row.period_doc)" :href="props.row.period_doc"
> >
<!-- :href="props.row.period_doc" -->
<q-tooltip>ดาวนโหลดเอกสารประกอบ </q-tooltip> <q-tooltip>ดาวนโหลดเอกสารประกอบ </q-tooltip>
</q-btn> </q-btn>
</q-td> </q-td>

View file

@ -102,11 +102,13 @@ const fecthAgency = async () => {
.get(config.API.insigniaAgency()) .get(config.API.insigniaAgency())
.then(async (res) => { .then(async (res) => {
DataStore.agency = res.data.result; DataStore.agency = res.data.result;
loadview.value = true;
if (roleUser.value == "admin") { if (roleUser.value == "admin") {
await fecthType(); await fecthType();
} }
}) })
.catch((err) => { .catch((err) => {
console.log(err);
messageError($q, err); messageError($q, err);
}) })
.finally(() => { .finally(() => {
@ -124,7 +126,6 @@ const fecthType = async () => {
name: e.organizationName, name: e.organizationName,
})); }));
DataStore.fetchOption(optiontypeOc.value); DataStore.fetchOption(optiontypeOc.value);
loadview.value = true;
}) })
.catch((err) => { .catch((err) => {
messageError($q, err); messageError($q, err);
@ -165,10 +166,16 @@ const fecthInsigniaByOc = async (
await DataStore.fetchData(res.data.result.items); await DataStore.fetchData(res.data.result.items);
await DataStore.fetchDataInsignia(res.data.result); await DataStore.fetchDataInsignia(res.data.result);
loading.value = true; loading.value = true;
if (res.data.result.items.length !== 0) { if (res.data.result.items !== null) {
hideBottom.value = true; if (res.data.result.items.length !== 0) {
hideBottom.value = true;
}
} }
// if (res.data.result.items.length !== 0) {
// hideBottom.value = true;
// }
// DataStore.isLock = await res.data.result.isLock; // DataStore.isLock = await res.data.result.isLock;
// DataStore.requestId = await res.data.result.requestId; // DataStore.requestId = await res.data.result.requestId;
}) })