40 lines
777 B
TypeScript
40 lines
777 B
TypeScript
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",
|
|
}
|
|
);
|
|
},
|
|
},
|
|
});
|