From 9d34add4aa6231699048329915aff5e8eb882054 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期四, 03 四月 2025 20:05:34 +0800
Subject: [PATCH] 任务列表无数据修改
---
rsf-admin/src/page/components/ImportModal.jsx | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/rsf-admin/src/page/components/ImportModal.jsx b/rsf-admin/src/page/components/ImportModal.jsx
index 70f84cf..703a018 100644
--- a/rsf-admin/src/page/components/ImportModal.jsx
+++ b/rsf-admin/src/page/components/ImportModal.jsx
@@ -79,6 +79,22 @@
reset();
};
+ const downloadTemplate = async (type) => {
+ const res = await request.post(`/${value}/template/download`, {}, {
+ responseType: "blob",
+ })
+ const url = window.URL.createObjectURL(
+ new Blob([res.data], { type: res.headers["content-type"] }),
+ );
+
+ const link = document.createElement("a");
+ link.href = url;
+ link.setAttribute("download", `${value}.xlsx`);
+ document.body.appendChild(link);
+ link.click();
+ link.remove();
+ }
+
return (
<Dialog open={open} maxWidth="md" fullWidth>
<DialogCloseButton onClose={handleClose} />
@@ -230,14 +246,7 @@
);
}
{/**涓嬭浇鎵撳嵃妯℃澘锛屼紶鍏ype绫诲瀷锛岃皟鐢ㄤ笅杞芥ā鏉挎帴鍙� */ }
-const downloadTemplate = (type) => {
- // 涓嬭浇鐗╂枡妯℃澘
- if (type != undefined && type == 'matnr') {
- }
- console.log('======>');
- console.log(type);
-}
function millisecondsToTime(ms) {
var seconds = Math.floor((ms / 1000) % 60);
--
Gitblit v1.9.1