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/plugins/download.js | 35 ++++++++++++++++++++++++++++++-----
1 files changed, 30 insertions(+), 5 deletions(-)
diff --git a/src/plugins/download.js b/src/plugins/download.js
index 62b21b8..17bcf96 100644
--- a/src/plugins/download.js
+++ b/src/plugins/download.js
@@ -4,6 +4,7 @@
import { getToken } from "@/utils/auth";
import errorCode from "@/utils/errorCode";
import { blobValidate } from "@/utils/ruoyi";
+import Vue from "vue";
const baseURL = process.env.VUE_APP_BASE_API;
let downloadLoadingInstance;
@@ -80,11 +81,35 @@
downloadLoadingInstance.close();
});
},
- saveAs(text, name, opts) {
+ async saveAs(text, name, opts) {
if (typeof text === "string") {
- // 璺緞涓嬭浇
- saveAs(text, name, opts);
- Message.success("鏁版嵁瀵煎嚭鎴愬姛");
+ try {
+ let state = /\.(jpg|jpeg|png|gif)$/i.test(text) // 鍒ゆ柇鏄惁涓哄浘鐗�
+ let url1 = ''
+ if (state) {
+ url1 = Vue.prototype.javaApi + '/img/' + text;
+ } else {
+ 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);
+ if (!response.ok) {
+ throw new Error('鏂囦欢涓嬭浇澶辫触: ' + response.statusText);
+ }
+ // 灏嗘枃浠惰浆鎹负 Blob
+ const blob = await response.blob();
+ // 浣跨敤 saveAs 淇濆瓨鏂囦欢
+ saveAs(blob, name);
+ Message.success("鏁版嵁瀵煎嚭鎴愬姛");
+ } catch (error) {
+ Message.error(error);
+ }
} else {
// 娴佷笅杞�
blobToText(text)
@@ -113,7 +138,7 @@
fileReader.onload = function () {
try {
const result = JSON.parse(this.result);
- if (result && result["code"] === 500) {
+ if (result && result["code"] !== 200) {
resolve(result);
} else {
reject();
--
Gitblit v1.9.3