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