From 3aedad63dd01f1fc5154cb520af32edab967d6e0 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周一, 12 5月 2025 09:15:26 +0800
Subject: [PATCH] Merge branch 'master' of http://222.71.245.114:9086/r/HIA24016N_PipeLineDemo

---
 PipeLineLems/pipelinelems_web/src/widgets/OrderManagement-main/hooks/exports.ts |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/PipeLineLems/pipelinelems_web/src/widgets/OrderManagement-main/hooks/exports.ts b/PipeLineLems/pipelinelems_web/src/widgets/OrderManagement-main/hooks/exports.ts
new file mode 100644
index 0000000..3cd476f
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/OrderManagement-main/hooks/exports.ts
@@ -0,0 +1,15 @@
+//涓嬭浇
+export const download = (file: any, fileName: string) => {
+  const blob = new Blob([file])
+  // 鍏煎涓嶅悓娴忚鍣ㄧ殑URL瀵硅薄
+  const url: any = window.URL || window.webkitURL
+  // 鍒涘缓涓嬭浇閾炬帴
+  const downloadHref = url.createObjectURL(blob)
+  // 鍒涘缓a鏍囩骞朵负鍏舵坊鍔犲睘鎬�
+  const downloadLink = document.createElement('a')
+  downloadLink.href = downloadHref
+  downloadLink.download = fileName
+  // 瑙﹀彂鐐瑰嚮浜嬩欢鎵ц涓嬭浇
+  downloadLink.click()
+  window.URL.revokeObjectURL(url)
+}

--
Gitblit v1.9.3