From 94adfa0b1aeb7e3262eaba2dfefed89b7b7eb423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Thu, 8 Jun 2023 11:40:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=89=8B=E6=9C=BA=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/utils/kkfileView.js | 8 ++-- jero-web/src/views/phoneView/taskData.vue | 45 +++++++++++++++-------- 2 files changed, 34 insertions(+), 19 deletions(-) diff --git a/jero-web/src/utils/kkfileView.js b/jero-web/src/utils/kkfileView.js index 4b46d7783..a27529f3b 100644 --- a/jero-web/src/utils/kkfileView.js +++ b/jero-web/src/utils/kkfileView.js @@ -1,9 +1,11 @@ import { Base64 } from 'js-base64' import { Toast } from 'vant' + window._CONFIG['domianPreviewURL'] = 'http://localhost:8082/jero-boot' window._CONFIG['domianWebImgURL'] = 'http://localhost:8082/jero-boot' let downLoadFileUrl = window._CONFIG['domianPreviewURL'] + '/sys/common/download' let downLoadImgUrl = window._CONFIG['domianWebImgURL'] + '/sys/common/download' + export function kkFileView(fileName, fileId) { let index1 = fileName.lastIndexOf('.') let index2 = fileName.length @@ -11,11 +13,11 @@ export function kkFileView(fileName, fileId) { window._CONFIG['onlinePreviewDomainURL'] = 'http://localhost:8012/onlinePreview' if (fileSuffix == '.docx' || fileSuffix == '.doc' || fileSuffix == '.pdf' || fileSuffix == '.xlsx' || fileSuffix == '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(downLoadFileUrl + '/' + fileId + fileSuffix) - window.open(url, '_blank') + window.open(url) } else if (fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(downLoadImgUrl + '/' + fileId + fileSuffix) - window.open(url, '_blank') - }else { + window.open(url) + } else { Toast('当前格式不支持预览') } } \ No newline at end of file diff --git a/jero-web/src/views/phoneView/taskData.vue b/jero-web/src/views/phoneView/taskData.vue index 4263d0ebe..bb33a2938 100644 --- a/jero-web/src/views/phoneView/taskData.vue +++ b/jero-web/src/views/phoneView/taskData.vue @@ -17,7 +17,7 @@ {{$t('regulationListIssuance')}}