update kkfile预览
This commit is contained in:
@@ -76,7 +76,8 @@
|
||||
</div>
|
||||
<div class="detail-page-process-manuscript-file-operate">
|
||||
<!-- 下载-->
|
||||
<a-button type="link" icon="download" v-has="btnPermission.download" @click="handleWatermarkedDownload(file)">{{ $t('download') }}
|
||||
<a-button type="link" icon="download" v-has="btnPermission.download" @click="handleWatermarkedDownload(file)">
|
||||
{{ $t('download') }}
|
||||
</a-button>
|
||||
<!-- 无水印下载-->
|
||||
<a-button type="link" v-has="btnPermission.unwatermarkedDownload" @click="handleDownload(file)">
|
||||
@@ -164,8 +165,9 @@ const OverseasApi = {
|
||||
}
|
||||
|
||||
// 支持预览的文件后缀
|
||||
const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'raw', 'pdf', 'docx', 'doc']
|
||||
const CAN_PREVIEW_FILE_SUFFIX = ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'mp3', 'mp4', 'flv', 'pdf', 'jpg', 'jpeg', 'png', 'raw']
|
||||
const FILE_TYPE_PDF = 'pdf'
|
||||
const FILE_TYPE_IMGS = ['jpg', 'jpeg', 'png', 'raw']
|
||||
|
||||
export default {
|
||||
name: 'StandardDetailPage',
|
||||
@@ -366,6 +368,7 @@ export default {
|
||||
return
|
||||
}
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
console.log(fileFullUrl)
|
||||
// 图片预览,使用自己添加的组件
|
||||
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) {
|
||||
this.imageUrl = getFileAccessHttpUrl(file.id)
|
||||
|
||||
Reference in New Issue
Block a user