diff --git a/public/dev_api_config.js b/public/dev_api_config.js
index 7ccaa2e..bf1401f 100644
--- a/public/dev_api_config.js
+++ b/public/dev_api_config.js
@@ -5,5 +5,3 @@ window._CONFIG.documentUrl = 'http://10.0.1.19:8184/laws-sinotruk/onlyOffice/dow
window._CONFIG.callbackUrl = 'http://10.0.1.19:8184/'
// onlyOffice自定义编辑器的地址(plugins的前端路径,最后一个/是必须的)
window._CONFIG.configUrl = 'http://10.0.1.19:8082/'
-// 预览文件地址
-window._CONFIG.onlinePreviewDomainURL = 'http://127.0.0.1:8012/onlinePreview'
diff --git a/public/prod_api_config.js b/public/prod_api_config.js
index 089b346..33f7efb 100644
--- a/public/prod_api_config.js
+++ b/public/prod_api_config.js
@@ -5,5 +5,3 @@ window._CONFIG.documentUrl = 'http://laws-sinotruk-server-kmc2c.yf-grp:8080/laws
window._CONFIG.callbackUrl = 'http://laws-sinotruk-server-kmc2c.yf-grp:8080/'
// onlyOffice自定义编辑器的地址(plugins的前端路径,最后一个/是必须的)
window._CONFIG.configUrl = 'http://srms-test.sinotruk.com/onlyofficeplugins/'
-// 预览文件地址
-window._CONFIG.onlinePreviewDomainURL = 'http://srms-test.sinotruk.com/kkfileview/onlinePreview'
diff --git a/src/router/index.js b/src/router/index.js
index 29ce94b..364389c 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -32,6 +32,11 @@ const routes = [
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import('../views/EditorPage.vue')
+ },
+ {
+ path: '/previewHistoryPage',
+ name: 'PreviewHistoryPage',
+ component: () => import('../views/PreviewHistoryPage')
}
]
diff --git a/src/views/EditorPage.vue b/src/views/EditorPage.vue
index 99091c3..2719a9f 100644
--- a/src/views/EditorPage.vue
+++ b/src/views/EditorPage.vue
@@ -300,10 +300,11 @@ export default {
* @param file
*/
viewFileClick (file) {
- const filePaths = file.filePath.split('/')
- const fileName = filePaths[filePaths.length - 1]
- const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}`
- window.open(url, '_blank')
+ const { href } = this.$router.resolve({
+ path: '/previewHistoryPage',
+ query: this.$route.query
+ })
+ window.open(href, '_blank')
},
/**
* 确定回滚到某个版本
diff --git a/src/views/PreviewHistoryPage.vue b/src/views/PreviewHistoryPage.vue
new file mode 100644
index 0000000..53a3d91
--- /dev/null
+++ b/src/views/PreviewHistoryPage.vue
@@ -0,0 +1,205 @@
+
+
+
+
+
+
+