From 90c6afa461b1076fdb7be82b03ec1749cdd12b9d Mon Sep 17 00:00:00 2001 From: Superman_Main <396572590@qq.com> Date: Sun, 28 Nov 2021 10:16:21 +0800 Subject: [PATCH] feat:FOTON release --- public/static/onlyOffice/editor.html | 2 +- public/static/onlyOffice/onlinePreview.html | 4 ++-- src/components/CustomFormComponents/File.vue | 13 ++++++------- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/public/static/onlyOffice/editor.html b/public/static/onlyOffice/editor.html index d15be8054..2da648f3d 100644 --- a/public/static/onlyOffice/editor.html +++ b/public/static/onlyOffice/editor.html @@ -38,7 +38,7 @@ var filePath = GetQueryValue('filePath') var fileName = GetQueryValue('fileName') var fileUrl = GetQueryValue('fileUrl') - var standNo = GetQueryValue('standNo') + var oldFileName = GetQueryValue('oldFileName') var key = GetQueryValue('key') // var attId = GetQueryValue('attId') var fileSuffix = GetQueryValue('fileType') diff --git a/public/static/onlyOffice/onlinePreview.html b/public/static/onlyOffice/onlinePreview.html index 60e734cfc..013abf4a9 100644 --- a/public/static/onlyOffice/onlinePreview.html +++ b/public/static/onlyOffice/onlinePreview.html @@ -35,7 +35,7 @@ var fileName = GetQueryValue('fileName') var filePath = GetQueryValue('filePath') var fileUrl = GetQueryValue('fileUrl') - var standNo = GetQueryValue('standNo') + var oldFileName = GetQueryValue('oldFileName') var key = GetQueryValue('key') // var attId = GetQueryValue('attId') var fileSuffix = GetQueryValue('fileType') @@ -101,7 +101,7 @@ }, "fileType": fileSuffix, "key": key, - "title": fileName, + "title": oldFileName, "url": fileUrl }, "documentType": documentType, diff --git a/src/components/CustomFormComponents/File.vue b/src/components/CustomFormComponents/File.vue index c4a98dc58..edae0c06e 100644 --- a/src/components/CustomFormComponents/File.vue +++ b/src/components/CustomFormComponents/File.vue @@ -336,7 +336,12 @@ export default { handlePreview(file) { const attId = file.response.data.id if (this.preview) { - + if (attId) { + window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + attId + } else { + this.$message.warning('文件不存在,下载失败') + } + } else { this.getBusStandFileByAttId(attId) .then(res => { console.log(res) @@ -368,12 +373,6 @@ export default { console.log(e) this.$message.warning('文件不存在,预览失败') }) - } else { - if (attId) { - window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + attId - } else { - this.$message.warning('文件不存在,下载失败') - } } },