From 771942c89a7c876699509a7e151959297a910345 Mon Sep 17 00:00:00 2001
From: 祖安之光 <11848914+light-of-zuan@user.noreply.gitee.com>
Date: 星期五, 11 七月 2025 16:31:21 +0800
Subject: [PATCH] 修改新增
---
src/views/build/conpanyFunctionConsult/digitalFileDep/otherIntellFile/index.vue | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/views/build/conpanyFunctionConsult/digitalFileDep/otherIntellFile/index.vue b/src/views/build/conpanyFunctionConsult/digitalFileDep/otherIntellFile/index.vue
index 4ab0215..a8eb2a0 100644
--- a/src/views/build/conpanyFunctionConsult/digitalFileDep/otherIntellFile/index.vue
+++ b/src/views/build/conpanyFunctionConsult/digitalFileDep/otherIntellFile/index.vue
@@ -101,16 +101,19 @@
const openFile = async(path)=>{
const ext = path.split('.').pop().toLowerCase();
if (ext === 'doc') {
- alert('暂不支持.doc文件预览,请下载后打开');
- window.open(`${import.meta.env.VITE_APP_BASE_API}/${path}`, '_blank');
+ ElMessageBox.confirm('暂不支持线上预览.doc文件,是否下载查看?', '提示', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
+ window.open(`${import.meta.env.VITE_APP_BASE_API}/${path}`, '_blank');
+ }).catch(() => {
+ console.log('取消预览')
+ });
return
}
try {
// 1. 获取文件
const response = await fetch(import.meta.env.VITE_APP_BASE_API + '/' + path);
- const arrayBuffer = await response.arrayBuffer();
+ const arrayBuffer = await response.arrayBuffer()
// 2. 创建新窗口
- const win = window.open('', '_blank');
+ const win = window.open('', '_blank')
win.document.write(`
<!DOCTYPE html>
<html>
--
Gitblit v1.9.2