Browse Source

删除没用的东西

xiaochan 8 months ago
parent
commit
6ae848aef0
1 changed files with 0 additions and 32 deletions
  1. 0 32
      src/api/emr-control/pdf-api.ts

+ 0 - 32
src/api/emr-control/pdf-api.ts

@@ -1,32 +0,0 @@
-import axios from "axios";
-import env from "@/utils/setting";
-//@ts-ignore
-let api = "http://" + env.VITE_EMR_CONTROL_URL;
-let iframe = null;
-
-interface pdfParam {
-  url: string;
-  data: any;
-  method: "post" | "get";
-}
-
-export function pdfPreviewThePrint(data: pdfParam) {
-  axios({
-    url: api + "/pdf/" + data.url,
-    method: data.method,
-    data: data.data,
-    responseType: "blob",
-  }).then(res => {
-    if (iframe != null) {
-      document.body.removeChild(iframe);
-    }
-    iframe = document.createElement("iframe");
-    let blob = new Blob([res.data], { type: "application/pdf" });
-    // 预览 blob 并打印
-    iframe.src = URL.createObjectURL(blob);
-    // 打印 iframe
-    iframe.style.display = "none";
-    document.body.appendChild(iframe);
-    iframe.contentWindow.print();
-  });
-}