From 4cf50898cd0e7227ae59f1c46264596205ad08c4 Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期六, 16 十二月 2023 09:10:10 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/crm_Version' into crm_Version
---
src/main/webapp/static/js/contract/contract.js | 44 +++++++++++++++++++++-----------------------
1 files changed, 21 insertions(+), 23 deletions(-)
diff --git a/src/main/webapp/static/js/contract/contract.js b/src/main/webapp/static/js/contract/contract.js
index 564887d..48362f9 100644
--- a/src/main/webapp/static/js/contract/contract.js
+++ b/src/main/webapp/static/js/contract/contract.js
@@ -432,30 +432,28 @@
headers: {'token': localStorage.getItem('token')},
data: data,
method: 'GET',
- xhrFields: {
- responseType: "blob" // 璁剧疆鍝嶅簲绫诲瀷涓轰簩杩涘埗鏁版嵁
- },
success: function (res) {
- // 鍒涘缓涓�涓复鏃剁殑涓嬭浇閾炬帴
- const url = window.URL.createObjectURL(res);
- // 鍒涘缓涓�涓殣钘忕殑 <a> 鍏冪礌骞惰缃笅杞介摼鎺�
- const a = document.createElement("a");
- a.style.display = "none";
- a.href = url;
-
- let list = data.filepath.split(".")
- let suffix = "." + list[list.length - 1]//鑾峰彇鍚庣紑鍚�
- a.download = data.name + suffix; // 鎸囧畾涓嬭浇鐨勬枃浠跺悕
- document.body.appendChild(a);
-
- // 瑙﹀彂鐐瑰嚮浜嬩欢浠ュ紑濮嬩笅杞�
- a.click();
-
- // 娓呯悊涓存椂璧勬簮
- setTimeout(function () {
- window.URL.revokeObjectURL(url);
- document.body.removeChild(a);
- }, 100);
+ location.href = res.data
+ // // 鍒涘缓涓�涓复鏃剁殑涓嬭浇閾炬帴
+ // const url = window.URL.createObjectURL(res);
+ // // 鍒涘缓涓�涓殣钘忕殑 <a> 鍏冪礌骞惰缃笅杞介摼鎺�
+ // const a = document.createElement("a");
+ // a.style.display = "none";
+ // a.href = url;
+ //
+ // let list = data.filepath.split(".")
+ // let suffix = "." + list[list.length - 1]//鑾峰彇鍚庣紑鍚�
+ // a.download = data.name + suffix; // 鎸囧畾涓嬭浇鐨勬枃浠跺悕
+ // document.body.appendChild(a);
+ //
+ // // 瑙﹀彂鐐瑰嚮浜嬩欢浠ュ紑濮嬩笅杞�
+ // a.click();
+ //
+ // // 娓呯悊涓存椂璧勬簮
+ // setTimeout(function () {
+ // window.URL.revokeObjectURL(url);
+ // document.body.removeChild(a);
+ // }, 100);
}
});
}
--
Gitblit v1.9.1