From 1e0802acdae2db6377e97823f10cfe95ca19c17c Mon Sep 17 00:00:00 2001 From: Julian Krauser Date: Wed, 19 Mar 2025 15:18:58 +0100 Subject: [PATCH] execute printing and display --- src/stores/admin/club/listprint.ts | 40 +++++++++++ src/views/admin/club/listprint/ListPrint.vue | 76 ++++++++++++++++---- 2 files changed, 103 insertions(+), 13 deletions(-) create mode 100644 src/stores/admin/club/listprint.ts diff --git a/src/stores/admin/club/listprint.ts b/src/stores/admin/club/listprint.ts new file mode 100644 index 0000000..65f6cff --- /dev/null +++ b/src/stores/admin/club/listprint.ts @@ -0,0 +1,40 @@ +import { defineStore } from "pinia"; +import { http } from "@/serverCom"; + +export const useListPrintStore = defineStore("listprint", { + actions: { + async printList({ + title, + queryStore, + headerId, + bodyId, + footerId, + headerHeight, + footerHeight, + }: { + title: string; + queryStore: string; + headerId?: string; + bodyId?: string; + footerId?: string; + headerHeight?: number; + footerHeight?: number; + }) { + return http.post( + `/admin/listprint`, + { + title, + queryStore, + headerId, + bodyId, + footerId, + headerHeight, + footerHeight, + }, + { + responseType: "blob", + } + ); + }, + }, +}); diff --git a/src/views/admin/club/listprint/ListPrint.vue b/src/views/admin/club/listprint/ListPrint.vue index 6c82e27..7b66e98 100644 --- a/src/views/admin/club/listprint/ListPrint.vue +++ b/src/views/admin/club/listprint/ListPrint.vue @@ -6,15 +6,18 @@