From 9c5eab9b964dd5a8f237c6c0040ecd04c3f774f1 Mon Sep 17 00:00:00 2001 From: "han\\hanst" Date: Wed, 4 Mar 2026 16:00:01 +0800 Subject: [PATCH] =?UTF-8?q?doc=E5=8F=AF=E4=BB=A5=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/erf/components/erfAttachmentManager.vue | 6 +++--- src/views/modules/erf/expApplyApproval.vue | 6 +++--- src/views/modules/oss/ossComponents.vue | 5 +++-- src/views/modules/oss/ossProjectComponents.vue | 5 +++-- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/views/modules/erf/components/erfAttachmentManager.vue b/src/views/modules/erf/components/erfAttachmentManager.vue index f1bf153..7b09219 100644 --- a/src/views/modules/erf/components/erfAttachmentManager.vue +++ b/src/views/modules/erf/components/erfAttachmentManager.vue @@ -432,8 +432,8 @@ export default { type = 'excel' } - // Word类型 - if (fileType === 'docx') { + // Word类型(doc 和 docx 均转 PDF 预览) + if (fileType === 'docx' || fileType === 'doc') { type = 'word' } @@ -443,7 +443,7 @@ export default { } // Office文件不支持预览 - if (fileType === 'doc' || fileType === 'ppt' || fileType === 'pptx') { + if (fileType === 'ppt' || fileType === 'pptx') { this.$message.warning('该文件格式暂不支持预览,请下载后查看') return } diff --git a/src/views/modules/erf/expApplyApproval.vue b/src/views/modules/erf/expApplyApproval.vue index 989d7bb..a753539 100644 --- a/src/views/modules/erf/expApplyApproval.vue +++ b/src/views/modules/erf/expApplyApproval.vue @@ -923,13 +923,13 @@ export default { type = 'excel' } - // Word类型 - if (fileType === 'docx') { + // Word类型(doc 和 docx 均转 PDF 预览) + if (fileType === 'docx' || fileType === 'doc') { type = 'word' } // Office文件不支持预览 - if (fileType === 'doc' || fileType === 'ppt' || fileType === 'pptx') { + if (fileType === 'ppt' || fileType === 'pptx') { this.$message.warning('该文件格式暂不支持预览,请下载后查看') return } diff --git a/src/views/modules/oss/ossComponents.vue b/src/views/modules/oss/ossComponents.vue index 96e71ef..05b3185 100644 --- a/src/views/modules/oss/ossComponents.vue +++ b/src/views/modules/oss/ossComponents.vue @@ -162,7 +162,7 @@ export default { if (txt.includes(row.fileType.toLowerCase())){ type = 'text/plain;charset=utf-8'; } - let office = ['doc', 'ppt', 'pptx']; + let office = ['ppt', 'pptx']; if (office.includes(row.fileType.toLowerCase())){ this.$message.warning(`该文件格式暂不支持预览`) return @@ -172,7 +172,8 @@ export default { if (excel.includes(row.fileType.toLowerCase())){ type = 'excel'; } - let word = ['docx']; + // doc 和 docx 均转 PDF 预览 + let word = ['docx', 'doc']; if (word.includes(row.fileType.toLowerCase())){ type = 'word' } diff --git a/src/views/modules/oss/ossProjectComponents.vue b/src/views/modules/oss/ossProjectComponents.vue index 5ec2696..a93cf32 100644 --- a/src/views/modules/oss/ossProjectComponents.vue +++ b/src/views/modules/oss/ossProjectComponents.vue @@ -176,7 +176,7 @@ export default { if (txt.includes(row.fileType.toLowerCase())){ type = 'text/plain;charset=utf-8'; } - let office = ['doc', 'ppt', 'pptx']; + let office = ['ppt', 'pptx']; if (office.includes(row.fileType.toLowerCase())){ this.$message.warning(`该文件格式暂不支持预览`) return @@ -186,7 +186,8 @@ export default { if (excel.includes(row.fileType.toLowerCase())){ type = 'excel'; } - let word = ['docx']; + // doc 和 docx 均转 PDF 预览 + let word = ['docx', 'doc']; if (word.includes(row.fileType.toLowerCase())){ type = 'word' }