From 5b248a9716688d8132cfb02b4ba0abecd4060b06 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期三, 20 五月 2026 11:49:08 +0800
Subject: [PATCH] 审批模板流程化
---
src/plugins/download.js | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/plugins/download.js b/src/plugins/download.js
index 2705310..35ac92f 100644
--- a/src/plugins/download.js
+++ b/src/plugins/download.js
@@ -82,6 +82,16 @@
saveAs(text, name, opts) {
saveAs(text, name, opts);
},
+ byUrl(url, filename) {
+ // 灏哢RL涓殑preview鏇挎崲鎴恉ownload
+ const downloadUrl = url.replace(/preview/g, 'download')
+ const link = document.createElement('a')
+ link.href = downloadUrl
+ link.download = filename || ''
+ document.body.appendChild(link)
+ link.click()
+ document.body.removeChild(link)
+ },
async printErrMsg(data) {
const resText = await data.text();
const rspObj = JSON.parse(resText);
--
Gitblit v1.9.3