From 4c4fe478fabb409c904802d53f121db090ec3dca Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 25 二月 2026 14:44:30 +0800
Subject: [PATCH] 业务管理:1.原材料标签打印内容调整;2.成品抽样页面优化;3.页面刷新保留筛选条件

---
 src/plugins/download.js |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/plugins/download.js b/src/plugins/download.js
index 97dc59a..17bcf96 100644
--- a/src/plugins/download.js
+++ b/src/plugins/download.js
@@ -89,7 +89,13 @@
         if (state) {
           url1 = Vue.prototype.javaApi + '/img/' + text;
         } else {
-          url1 = Vue.prototype.javaApi + '/word/' + text
+          if (text.startsWith("/word/")) {
+            url1 = Vue.prototype.javaApi + text
+          } else if (text.startsWith("word/")) {
+            url1 = Vue.prototype.javaApi + '/' + text
+          } else {
+            url1 = Vue.prototype.javaApi + '/word/' + text
+          }
         }
         // 浣跨敤 fetch 鑾峰彇鏂囦欢
         const response = await fetch(url1);
@@ -99,7 +105,7 @@
         // 灏嗘枃浠惰浆鎹负 Blob
         const blob = await response.blob();
         // 浣跨敤 saveAs 淇濆瓨鏂囦欢
-        saveAs(blob, filename);
+        saveAs(blob, name);
         Message.success("鏁版嵁瀵煎嚭鎴愬姛");
       } catch (error) {
         Message.error(error);

--
Gitblit v1.9.3