[update] 修改预览调公用方法不止word文件,其他能预览的都调

This commit is contained in:
lideqin
2024-01-04 15:58:22 +08:00
parent 2a2af242d4
commit 881bad1d51
7 changed files with 42 additions and 52 deletions
+2 -8
View File
@@ -96,7 +96,6 @@ import Vue from 'vue'
import { ACCESS_TOKEN } from '../store/mutation-types.js'
import { downloadFile, getFileAccessHttpUrl, getAction } from '../api/manage.js'
import { previewPdf } from '../utils/previewPdf.js'
import { Base64 } from 'js-base64'
import FlowChartModal from './FlowChartModal.vue'
import UploadFile from './UploadFile'
import { filterObj } from '../utils/util'
@@ -318,13 +317,8 @@ export default {
window.open(url)
return
}
// word用KKfile预览
if (canPreview && (fileSuffix === 'doc' || fileSuffix === 'docx')) {
kkFilePreview(fileFullUrl)
return
}
// 如果都不能预览就下载
downloadFile(`/sys/common/download/${file.id}`, file.fileName)
// 其余可预览文件仍使用KKFile进行预览
kkFilePreview(fileFullUrl)
}
}
}