From ceec89801ad69708c33babb90d4f9d9ebfd8e3f9 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期四, 27 八月 2026 16:20:42 +0800
Subject: [PATCH] fix(order): -移除英文字段验证 - 删除与OA流程相关的无用代码和组件 - 移除系统用户管理中的获取三方人员功能 - 更新设备二维码链接使用动态API地址 - 清理不合格处理页面中的OA相关功能和字段 - 移除登录页面的集团集成登录按钮 - 删除未使用的API接口和组件引用
---
src/utils/file.js | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/src/utils/file.js b/src/utils/file.js
index 9c7e99e..ac6ad7b 100644
--- a/src/utils/file.js
+++ b/src/utils/file.js
@@ -80,3 +80,26 @@
});
},
};
+
+export function transformExcel(response, tempName) {
+ const relType = ['application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.ms-excel;charset=UTF-8']
+ let type = response.type
+ if (relType.includes(type)) {
+ const blob = new Blob([response], {type: 'application/vnd.ms-excel'})
+ let temp = tempName
+ if(response.headers){
+ const disposition = response.headers["Content-Disposition"]
+ temp = disposition.substring(disposition.lastIndexOf('=') + 1)
+ }
+ let filename = decodeURI(temp)
+ // 鍒涘缓涓�涓秴閾炬帴锛屽皢鏂囦欢娴佽祴杩涘幓锛岀劧鍚庡疄鐜拌繖涓秴閾炬帴鐨勫崟鍑讳簨浠�
+ const elink = document.createElement('a')
+ elink.download = filename
+ elink.style.display = 'none'
+ elink.href = URL.createObjectURL(blob)
+ document.body.appendChild(elink)
+ elink.click()
+ URL.revokeObjectURL(elink.href) // 閲婃斁URL 瀵硅薄
+ document.body.removeChild(elink)
+ }
+}
--
Gitblit v1.9.3