[update] 预览调试

This commit is contained in:
lideqin
2024-10-12 14:18:12 +08:00
parent 91f9c7ee7a
commit a450805430
3 changed files with 8 additions and 9 deletions
-1
View File
@@ -215,7 +215,6 @@ export default {
query: {
id: 123456
},
// key 要改成传文件本身??
callbackUrl: `${this.callbackUrl}laws-chery/onlyOffice/receiveFile?fileId=${this.$route.query.fileId}&fileNm=${this.$route.query.fileName}&key=${key}&business=${this.$route.query.business}`,
user: {
id: this.$route.query.userId,
+6 -6
View File
@@ -11,7 +11,7 @@ export default {
return {
docEditor: null,
documentUrl: window._CONFIG.documentUrl,
currentFilePath: null // 当前页面展示文件的path
currentFileId: null // 当前页面展示文件的id
}
},
mounted () {
@@ -74,7 +74,7 @@ export default {
{
'version': 1,
'key': this.$route.query.attId,
'url': this.documentUrl + this.$route.query.filePath + this.$route.query.fileName
'url': this.documentUrl + this.$route.query.fileId + this.$route.query.fileName
}
] || null
this.docEditor.setHistoryData(historyData[version - 1])
@@ -134,13 +134,13 @@ export default {
let url = ''
let key = ''
if (fileInfo.id) {
url = this.documentUrl + fileInfo.filePath
url = this.documentUrl + fileInfo.id
key = this.$route.query.key + nowTime
this.currentFilePath = fileInfo.filePath
this.currentFileId = fileInfo.id
} else {
url = `${this.documentUrl}${this.$route.query.filePath}`
url = `${this.documentUrl}${this.$route.query.fileId}`
key = this.$route.query.key + nowTime
this.currentFilePath = this.$route.query.filePath
this.currentFileId = this.$route.query.fileId
}
this.docEditor = new DocsAPI.DocEditor('iframeEditor', {
width: '100%',
+2 -2
View File
@@ -64,7 +64,7 @@ export default {
{
'version': 1,
'key': this.$route.query.key,
'url': this.documentUrl + this.$route.query.filePath
'url': this.documentUrl + this.$route.query.fileId
}
] || null
this.docEditor.setHistoryData(historyData[version - 1])
@@ -124,7 +124,7 @@ export default {
token: '',
document: {
title: this.$route.query.fileName,
url: `${this.documentUrl}${this.$route.query.filePath}`,
url: `${this.documentUrl}${this.$route.query.fileId}`,
fileType: this.$route.query.fileType,
key: this.$route.query.key,
permissions: {