From e04a867a23568c9ed5d33c53f8300eee69b1ff7f Mon Sep 17 00:00:00 2001
From: 祖安之光 <11848914+light-of-zuan@user.noreply.gitee.com>
Date: 星期二, 08 七月 2025 16:51:13 +0800
Subject: [PATCH] 修改新增

---
 src/views/build/conpanyFunctionConsult/digitalFileDep/techType/index.vue                |    7 ++-
 src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/recordSheets/index.vue |    7 ++-
 src/views/build/conpanyFunctionConsult/industryTemplate/index.vue                       |    7 ++-
 src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/workInstruct/index.vue |    7 ++-
 src/views/build/conpanyFunctionConsult/digitalFileDep/productType/index.vue             |    7 ++-
 src/views/build/conpanyFunctionConsult/standardSysTemp/appStandardModule/index.vue      |    7 ++-
 src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/appFile/index.vue      |    9 +++-
 src/views/build/conpanyFunctionConsult/standardSysTemp/techStandardModule/index.vue     |    7 ++-
 src/views/build/conpanyFunctionConsult/standardSysTemp/sysStandardModule/index.vue      |    7 ++-
 src/views/build/conpanyFunctionConsult/digitalFileDep/otherIntellFile/index.vue         |    7 ++-
 10 files changed, 52 insertions(+), 20 deletions(-)

diff --git a/src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/appFile/index.vue b/src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/appFile/index.vue
index d4e73a0..090f2a3 100644
--- a/src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/appFile/index.vue
+++ b/src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/appFile/index.vue
@@ -65,6 +65,8 @@
 import useUserStore from "@/store/modules/user";
 import {getStandardTemp,delStandardTemp} from "@/api/standardSys/standardSys";
 import {renderAsync} from "docx-preview";
+import {removeToken} from "@/utils/auth";
+import {isRelogin} from "@/utils/request";
 const userStore = useUserStore()
 const { proxy } = getCurrentInstance();
 const loading = ref(false);
@@ -101,8 +103,11 @@
 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 {
diff --git a/src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/recordSheets/index.vue b/src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/recordSheets/index.vue
index 92befbe..5fa3244 100644
--- a/src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/recordSheets/index.vue
+++ b/src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/recordSheets/index.vue
@@ -102,8 +102,11 @@
 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 {
diff --git a/src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/workInstruct/index.vue b/src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/workInstruct/index.vue
index 50d053b..0ee754d 100644
--- a/src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/workInstruct/index.vue
+++ b/src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/workInstruct/index.vue
@@ -101,8 +101,11 @@
 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 {
diff --git a/src/views/build/conpanyFunctionConsult/digitalFileDep/otherIntellFile/index.vue b/src/views/build/conpanyFunctionConsult/digitalFileDep/otherIntellFile/index.vue
index 4ab0215..d102607 100644
--- a/src/views/build/conpanyFunctionConsult/digitalFileDep/otherIntellFile/index.vue
+++ b/src/views/build/conpanyFunctionConsult/digitalFileDep/otherIntellFile/index.vue
@@ -101,8 +101,11 @@
 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 {
diff --git a/src/views/build/conpanyFunctionConsult/digitalFileDep/productType/index.vue b/src/views/build/conpanyFunctionConsult/digitalFileDep/productType/index.vue
index 9ab93a2..cfc2b1c 100644
--- a/src/views/build/conpanyFunctionConsult/digitalFileDep/productType/index.vue
+++ b/src/views/build/conpanyFunctionConsult/digitalFileDep/productType/index.vue
@@ -101,8 +101,11 @@
 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 {
diff --git a/src/views/build/conpanyFunctionConsult/digitalFileDep/techType/index.vue b/src/views/build/conpanyFunctionConsult/digitalFileDep/techType/index.vue
index e7b650b..955aabc 100644
--- a/src/views/build/conpanyFunctionConsult/digitalFileDep/techType/index.vue
+++ b/src/views/build/conpanyFunctionConsult/digitalFileDep/techType/index.vue
@@ -101,8 +101,11 @@
 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 {
diff --git a/src/views/build/conpanyFunctionConsult/industryTemplate/index.vue b/src/views/build/conpanyFunctionConsult/industryTemplate/index.vue
index 30a1763..56fe630 100644
--- a/src/views/build/conpanyFunctionConsult/industryTemplate/index.vue
+++ b/src/views/build/conpanyFunctionConsult/industryTemplate/index.vue
@@ -186,8 +186,11 @@
 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 {
diff --git a/src/views/build/conpanyFunctionConsult/standardSysTemp/appStandardModule/index.vue b/src/views/build/conpanyFunctionConsult/standardSysTemp/appStandardModule/index.vue
index 206097e..0b0660b 100644
--- a/src/views/build/conpanyFunctionConsult/standardSysTemp/appStandardModule/index.vue
+++ b/src/views/build/conpanyFunctionConsult/standardSysTemp/appStandardModule/index.vue
@@ -134,8 +134,11 @@
 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 {
diff --git a/src/views/build/conpanyFunctionConsult/standardSysTemp/sysStandardModule/index.vue b/src/views/build/conpanyFunctionConsult/standardSysTemp/sysStandardModule/index.vue
index 43bda94..0932de7 100644
--- a/src/views/build/conpanyFunctionConsult/standardSysTemp/sysStandardModule/index.vue
+++ b/src/views/build/conpanyFunctionConsult/standardSysTemp/sysStandardModule/index.vue
@@ -103,8 +103,11 @@
 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 {
diff --git a/src/views/build/conpanyFunctionConsult/standardSysTemp/techStandardModule/index.vue b/src/views/build/conpanyFunctionConsult/standardSysTemp/techStandardModule/index.vue
index cc12f74..4ec95ba 100644
--- a/src/views/build/conpanyFunctionConsult/standardSysTemp/techStandardModule/index.vue
+++ b/src/views/build/conpanyFunctionConsult/standardSysTemp/techStandardModule/index.vue
@@ -101,8 +101,11 @@
 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 {

--
Gitblit v1.9.2