Browse Source

doc可以预览

master
han\hanst 2 days ago
parent
commit
9c5eab9b96
  1. 6
      src/views/modules/erf/components/erfAttachmentManager.vue
  2. 6
      src/views/modules/erf/expApplyApproval.vue
  3. 5
      src/views/modules/oss/ossComponents.vue
  4. 5
      src/views/modules/oss/ossProjectComponents.vue

6
src/views/modules/erf/components/erfAttachmentManager.vue

@ -432,8 +432,8 @@ export default {
type = 'excel' type = 'excel'
} }
// Word
if (fileType === 'docx') {
// Worddoc docx PDF
if (fileType === 'docx' || fileType === 'doc') {
type = 'word' type = 'word'
} }
@ -443,7 +443,7 @@ export default {
} }
// Office // Office
if (fileType === 'doc' || fileType === 'ppt' || fileType === 'pptx') {
if (fileType === 'ppt' || fileType === 'pptx') {
this.$message.warning('该文件格式暂不支持预览,请下载后查看') this.$message.warning('该文件格式暂不支持预览,请下载后查看')
return return
} }

6
src/views/modules/erf/expApplyApproval.vue

@ -923,13 +923,13 @@ export default {
type = 'excel' type = 'excel'
} }
// Word
if (fileType === 'docx') {
// Worddoc docx PDF
if (fileType === 'docx' || fileType === 'doc') {
type = 'word' type = 'word'
} }
// Office // Office
if (fileType === 'doc' || fileType === 'ppt' || fileType === 'pptx') {
if (fileType === 'ppt' || fileType === 'pptx') {
this.$message.warning('该文件格式暂不支持预览,请下载后查看') this.$message.warning('该文件格式暂不支持预览,请下载后查看')
return return
} }

5
src/views/modules/oss/ossComponents.vue

@ -162,7 +162,7 @@ export default {
if (txt.includes(row.fileType.toLowerCase())){ if (txt.includes(row.fileType.toLowerCase())){
type = 'text/plain;charset=utf-8'; type = 'text/plain;charset=utf-8';
} }
let office = ['doc', 'ppt', 'pptx'];
let office = ['ppt', 'pptx'];
if (office.includes(row.fileType.toLowerCase())){ if (office.includes(row.fileType.toLowerCase())){
this.$message.warning(`该文件格式暂不支持预览`) this.$message.warning(`该文件格式暂不支持预览`)
return return
@ -172,7 +172,8 @@ export default {
if (excel.includes(row.fileType.toLowerCase())){ if (excel.includes(row.fileType.toLowerCase())){
type = 'excel'; type = 'excel';
} }
let word = ['docx'];
// doc docx PDF
let word = ['docx', 'doc'];
if (word.includes(row.fileType.toLowerCase())){ if (word.includes(row.fileType.toLowerCase())){
type = 'word' type = 'word'
} }

5
src/views/modules/oss/ossProjectComponents.vue

@ -176,7 +176,7 @@ export default {
if (txt.includes(row.fileType.toLowerCase())){ if (txt.includes(row.fileType.toLowerCase())){
type = 'text/plain;charset=utf-8'; type = 'text/plain;charset=utf-8';
} }
let office = ['doc', 'ppt', 'pptx'];
let office = ['ppt', 'pptx'];
if (office.includes(row.fileType.toLowerCase())){ if (office.includes(row.fileType.toLowerCase())){
this.$message.warning(`该文件格式暂不支持预览`) this.$message.warning(`该文件格式暂不支持预览`)
return return
@ -186,7 +186,8 @@ export default {
if (excel.includes(row.fileType.toLowerCase())){ if (excel.includes(row.fileType.toLowerCase())){
type = 'excel'; type = 'excel';
} }
let word = ['docx'];
// doc docx PDF
let word = ['docx', 'doc'];
if (word.includes(row.fileType.toLowerCase())){ if (word.includes(row.fileType.toLowerCase())){
type = 'word' type = 'word'
} }

Loading…
Cancel
Save