refactor(reportOrg): change getReport API method from GET to POST

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-04-09 10:05:42 +07:00
parent 1de7a11721
commit 3f5a4783c1

View file

@ -111,17 +111,16 @@ async function fetchSummary() {
* งก DownloadReport
* @param list รายงานทองการดาวนโหลด
*/
async function getReport(list: string) {
const listFind = baseDocument.value.find(
(item: DataDocument) => item.val == list
)?.val;
const newReport = listFind === "report2" ? "report2-history" : listFind;
async function getReport(valReport: string) {
pdfSrc.value = undefined;
page.value = 1;
isLoadPDF.value = true;
if (newReport) {
if (valReport) {
await http
.get(config.API.orgReport(newReport) + `/${organizationId.value}`)
.post(config.API.orgReport(valReport), {
node: 0,
nodeId: organizationId.value,
})
.then(async (res) => {
const data = res.data.result;
detailReport.value = data;
@ -414,10 +413,8 @@ onMounted(async () => {
color="primary"
icon="download"
>
<q-tooltip>
ดาวนโหลดรายงาน
</q-tooltip>
<q-tooltip> ดาวนโหลดรายงาน </q-tooltip>
<q-menu>
<q-list style="min-width: 150px">
<q-item