From a45080543074540eeaccefe832e5631f999faa98 Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Sat, 12 Oct 2024 14:18:12 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E9=A2=84=E8=A7=88=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/EditorPage.vue | 1 - src/views/PreviewHistoryPage.vue | 12 ++++++------ src/views/PreviewPage.vue | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/views/EditorPage.vue b/src/views/EditorPage.vue index 5a10fc9..e06bf60 100644 --- a/src/views/EditorPage.vue +++ b/src/views/EditorPage.vue @@ -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, diff --git a/src/views/PreviewHistoryPage.vue b/src/views/PreviewHistoryPage.vue index 5ae506a..ee802a3 100644 --- a/src/views/PreviewHistoryPage.vue +++ b/src/views/PreviewHistoryPage.vue @@ -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%', diff --git a/src/views/PreviewPage.vue b/src/views/PreviewPage.vue index 86bed85..9c3d4bf 100644 --- a/src/views/PreviewPage.vue +++ b/src/views/PreviewPage.vue @@ -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: {