From aecdfb8c9f8c5f20dc9adb61adf0a9c1385b9f14 Mon Sep 17 00:00:00 2001
From: 王震 <10952869+daywangzhen@user.noreply.gitee.com>
Date: 星期三, 17 一月 2024 09:58:54 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before
---
src/views/plan/customerorder/index.vue | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/views/plan/customerorder/index.vue b/src/views/plan/customerorder/index.vue
index 1351e4d..7990386 100644
--- a/src/views/plan/customerorder/index.vue
+++ b/src/views/plan/customerorder/index.vue
@@ -879,8 +879,20 @@
this.$message.error("璇烽�夋嫨涓�鏉℃暟鎹�")
return
}
- downloadWordFile(ids).then(res=>{
- transform(res)
+ downloadWordFile(ids).then(response=>{
+ // 澶勭悊杩斿洖鐨勬枃浠舵祦
+ const blob = response.data
+ const link = document.createElement('a')
+ link.href = URL.createObjectURL(blob)
+ const disposition = response.headers["content-disposition"]
+ let temp = disposition.substring(disposition.lastIndexOf('=') + 1)
+ link.download = decodeURI(temp)
+ document.body.appendChild(link)
+ link.click()
+ window.setTimeout(function() {
+ URL.revokeObjectURL(blob)
+ document.body.removeChild(link)
+ }, 0)
}).catch(error=>{
console.error(error);
})
--
Gitblit v1.9.3