修改上传文件的双语
This commit is contained in:
@@ -162,32 +162,31 @@
|
|||||||
this.myfileList = info.fileList
|
this.myfileList = info.fileList
|
||||||
// this.$message.success(`${info.file.name} 文件上传成功。`);
|
// this.$message.success(`${info.file.name} 文件上传成功。`);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
resetFileList() {
|
||||||
resetFileList() {
|
this.myfileList = []
|
||||||
this.myfileList = []
|
this.fileList = []
|
||||||
this.fileList = []
|
},
|
||||||
},
|
preview(file) {
|
||||||
preview(file) {
|
let fileQuery = file.response ? file.response.result : file
|
||||||
let fileQuery = file.response ? file.response.result : file
|
let fileName = fileQuery.fileName
|
||||||
let fileName = fileQuery.fileName
|
let index1 = fileName.lastIndexOf('.')
|
||||||
let index1 = fileName.lastIndexOf('.')
|
let index2 = fileName.length
|
||||||
let index2 = fileName.length
|
let fileSuffix = fileName.substring(index1, index2)
|
||||||
let fileSuffix = fileName.substring(index1, index2)
|
if (fileSuffix === '.pdf') {
|
||||||
if (fileSuffix === '.pdf') {
|
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
|
||||||
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
|
} else if (fileSuffix === '.docx') {
|
||||||
} else if (fileSuffix === '.docx') {
|
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
||||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
window.open(url, '_blank')
|
||||||
window.open(url, '_blank')
|
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
|
||||||
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
|
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
||||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
window.open(url, '_blank')
|
||||||
window.open(url, '_blank')
|
} else {
|
||||||
} else {
|
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
|
||||||
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
Reference in New Issue
Block a user