From 86a3520ecb79a8d1001f2a7d6ec846be71e46a44 Mon Sep 17 00:00:00 2001 From: bestlee Date: Wed, 23 Sep 2026 13:45:06 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86=E4=B8=8B=E8=BD=BD=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=8A=9F=E8=83=BD=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/common.ts | 2 +- src/views/changeLedger/modules/list.vue | 2 +- src/views/details/approval/index.vue | 13 +++++----- src/views/details/closeDoc/index.vue | 26 +++++++++++-------- src/views/details/index/index.vue | 15 +++++------ .../my/initiateChange/modules/changeApply.vue | 10 ++++--- 6 files changed, 36 insertions(+), 32 deletions(-) diff --git a/src/utils/common.ts b/src/utils/common.ts index bc029f6..aab50f4 100644 --- a/src/utils/common.ts +++ b/src/utils/common.ts @@ -238,8 +238,8 @@ export function getTimeRangeStamp(timeRange: string){ export function downloadFileFun(url: string, name: string) { const a = document.createElement('a'); a.href = url; - a.target = '_blank'; a.download = name; + a.style.display = 'none'; document.body.appendChild(a) a.click() document.body.removeChild(a); diff --git a/src/views/changeLedger/modules/list.vue b/src/views/changeLedger/modules/list.vue index 9585535..e384c74 100644 --- a/src/views/changeLedger/modules/list.vue +++ b/src/views/changeLedger/modules/list.vue @@ -223,7 +223,7 @@ const revokeSave = async () => { const downloadFiles = (r:any,type:string) => { // 下载申请表 if(type==='apply'){ - + } // 下载已验收待关闭 if(type==='accepted'){ diff --git a/src/views/details/approval/index.vue b/src/views/details/approval/index.vue index c8f6a8a..7bcf717 100644 --- a/src/views/details/approval/index.vue +++ b/src/views/details/approval/index.vue @@ -4,7 +4,7 @@ import { Icon } from '@iconify/vue' import { useThemeStore } from '@/store/modules/theme'; import { useRouterPush } from '@/hooks/common/router'; import { useRoute } from 'vue-router'; -import { getColorWithOpacity, tagTextColor, tagBgColor, tagBorderColor } from '@/utils/common'; +import { getColorWithOpacity, tagTextColor, tagBgColor, tagBorderColor, downloadFileFun } from '@/utils/common'; import { AiError, aiTypeJudge } from "@/service/api/ai"; import { systemConfigApi } from '@/service/api/system'; import { getChangeDetailApi } from '@/service/api/change'; @@ -268,12 +268,11 @@ const exportFile = (type: string) => { }; // 变更附带资料下载/一键下载 -const downloadFile = (type: string) => { - window.$message?.info('还差接口') +const downloadFile = (file:any,type: string) => { if(type === 'all'){ - window.$message?.success('打包下载全部附件'); + window.$message?.info('还差接口') }else{ - window.$message?.success('下载当前附件成功'); + downloadFileFun(file?.file_url, file?.doc_name || file?.file_name); } }; // 变更附带资料预览 @@ -560,7 +559,7 @@ onMounted(() => { class="rounded-sm bg-[var(--theme-color)] px-3 py-1 text-xs font-semibold text-white" :style="{'--theme-color': themeStore.themeColor}" >变更附带资料

- 一键下载 + 一键下载 @@ -587,7 +586,7 @@ onMounted(() => {
预览 - 下载 + 下载
diff --git a/src/views/details/closeDoc/index.vue b/src/views/details/closeDoc/index.vue index 97cdb08..50e347f 100644 --- a/src/views/details/closeDoc/index.vue +++ b/src/views/details/closeDoc/index.vue @@ -1,10 +1,10 @@