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('文件不存在,下载失败')
- }
}
},