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 }) },