From 3482181646ed311cef42350624d6a927902f09f0 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Tue, 19 Apr 2022 10:00:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E9=A1=B9=E7=9B=AE=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E7=9A=84=E6=B3=95=E8=A7=84=E6=B8=85=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/listOfRegulations.vue | 60 ++++++++++++------- 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/jero-web/src/views/projectManagement/components/listOfRegulations.vue b/jero-web/src/views/projectManagement/components/listOfRegulations.vue index 0d93a4bcf..c6c9d9d4d 100644 --- a/jero-web/src/views/projectManagement/components/listOfRegulations.vue +++ b/jero-web/src/views/projectManagement/components/listOfRegulations.vue @@ -10,8 +10,8 @@
{{$t('standard')}}
- + @@ -19,8 +19,8 @@
{{$t('title')}}
- +
@@ -28,8 +28,8 @@
{{$t('subtitle')}}
- +
@@ -90,11 +90,11 @@
- + {{$t('submit')}}
- + {{$t('overrule')}}
@@ -702,6 +703,23 @@ downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id }) } }, + pdfPreviewClick(name, id) { + let fileName = name + let index1 = fileName.lastIndexOf('.') + let index2 = fileName.length + let fileSuffix = fileName.substring(index1, index2) + if (fileSuffix == '.pdf') { + window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + id)) + } else if (fileSuffix == '.docx') { + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix) + window.open(url, '_blank') + } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix) + window.open(url, '_blank') + } else { + downloadFile('/sys/common/downLoadFile', name, { id: id }) + } + }, download(item) { downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id }) },