fix(organiztion): download file
- แก้ไขจาก get เป็น post - เปลี่ยนจากส่ง rootId เป็น nodeId และ nodelevel
This commit is contained in:
parent
a30e3bbdd1
commit
08b42a6406
1 changed files with 11 additions and 16 deletions
|
|
@ -181,7 +181,8 @@ const document = computed(() => {
|
|||
return baseDocument.value;
|
||||
} else {
|
||||
return baseDocument.value.filter(
|
||||
(e: DataDocument) => e.val === "report2" || e.val === "report4"
|
||||
(e: DataDocument) =>
|
||||
e.val === "report2" || e.val === "report4" || e.val === "report1"
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
@ -538,17 +539,17 @@ function getSummary() {
|
|||
}
|
||||
|
||||
/**
|
||||
* function DownloadReport
|
||||
* function ดาวน์โหลดรายงาน
|
||||
* @param val ประเภทเอกสาร
|
||||
* @param name ชื่อเอกสาร
|
||||
*/
|
||||
async function onClickDownloadReport(val: string, name: string) {
|
||||
const newReport =
|
||||
store.typeOrganizational !== "draft" && val === "report2"
|
||||
? "report2-history"
|
||||
: val;
|
||||
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.orgReport(newReport) + `/${orgRootId.value}`)
|
||||
.post(config.API.orgReport(val), {
|
||||
node: orgLevel.value,
|
||||
nodeId: treeId.value,
|
||||
})
|
||||
.then(async (res) => {
|
||||
const data = res.data.result;
|
||||
if (data) {
|
||||
|
|
@ -691,14 +692,8 @@ watch(
|
|||
</div>
|
||||
|
||||
<!-- v-if="store.typeOrganizational === 'draft'" -->
|
||||
<q-btn
|
||||
v-if="orgLevel == 0"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="deep-purple"
|
||||
icon="save_alt"
|
||||
>
|
||||
<!-- v-if="orgLevel == 0" -->
|
||||
<q-btn flat round dense color="deep-purple" icon="save_alt">
|
||||
<q-menu>
|
||||
<q-list
|
||||
dense
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue