refactor(reportOrg): change getReport API method from GET to POST
This commit is contained in:
parent
1de7a11721
commit
3f5a4783c1
1 changed files with 8 additions and 11 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue