From db8280d1bbe865e8577755bbf415182e1044d759 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 6 Sep 2023 13:11:18 +0700 Subject: [PATCH] no message --- .../components/1_Proposals/listProposals.vue | 13 +------------ .../07_insignia/components/2_Manage/listManage.vue | 13 ++++++++++--- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/modules/07_insignia/components/1_Proposals/listProposals.vue b/src/modules/07_insignia/components/1_Proposals/listProposals.vue index cb492c58b..7a47d7195 100644 --- a/src/modules/07_insignia/components/1_Proposals/listProposals.vue +++ b/src/modules/07_insignia/components/1_Proposals/listProposals.vue @@ -179,16 +179,6 @@ const getRequest = async (id: string) => { 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(""); @@ -385,9 +375,8 @@ const paginationLabel = (start: string, end: string, total: string) => { round color="light-blue-8" icon="mdi-file-download" - @click="downloadFile(props.row.period_doc)" + :href="props.row.period_doc" > - ดาวน์โหลดเอกสารประกอบ diff --git a/src/modules/07_insignia/components/2_Manage/listManage.vue b/src/modules/07_insignia/components/2_Manage/listManage.vue index 8b8f87fab..25728e56b 100644 --- a/src/modules/07_insignia/components/2_Manage/listManage.vue +++ b/src/modules/07_insignia/components/2_Manage/listManage.vue @@ -102,11 +102,13 @@ const fecthAgency = async () => { .get(config.API.insigniaAgency()) .then(async (res) => { DataStore.agency = res.data.result; + loadview.value = true; if (roleUser.value == "admin") { await fecthType(); } }) .catch((err) => { + console.log(err); messageError($q, err); }) .finally(() => { @@ -124,7 +126,6 @@ const fecthType = async () => { name: e.organizationName, })); DataStore.fetchOption(optiontypeOc.value); - loadview.value = true; }) .catch((err) => { messageError($q, err); @@ -165,10 +166,16 @@ const fecthInsigniaByOc = async ( await DataStore.fetchData(res.data.result.items); await DataStore.fetchDataInsignia(res.data.result); loading.value = true; - if (res.data.result.items.length !== 0) { - hideBottom.value = true; + if (res.data.result.items !== null) { + 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.requestId = await res.data.result.requestId; })