|
@@ -495,8 +495,10 @@ export default {
|
|
|
this.templateOption.editorConfig.mode = mode
|
|
this.templateOption.editorConfig.mode = mode
|
|
|
// 新标签页打开
|
|
// 新标签页打开
|
|
|
if (openType === '_blank') {
|
|
if (openType === '_blank') {
|
|
|
- localStorage.setItem('templateOption', JSON.stringify(this.templateOption))
|
|
|
|
|
- window.open('#/templateView', '_blank')
|
|
|
|
|
|
|
+ const path = this.templateOption.document.title
|
|
|
|
|
+ // localStorage.setItem('templateOption', JSON.stringify(this.templateOption))
|
|
|
|
|
+ sessionStorage.setItem(path, JSON.stringify(this.templateOption))
|
|
|
|
|
+ window.open(`#/templateView?path=${encodeURIComponent(path)}`, '_blank')
|
|
|
} else {
|
|
} else {
|
|
|
// 表单内打开
|
|
// 表单内打开
|
|
|
this.showFile = true
|
|
this.showFile = true
|
|
@@ -552,11 +554,10 @@ export default {
|
|
|
*/
|
|
*/
|
|
|
getPreview (index) {
|
|
getPreview (index) {
|
|
|
// 1、获取文件数据 及下载流接口
|
|
// 1、获取文件数据 及下载流接口
|
|
|
- const api = BASE_API('', 'intranet') + SYSTEM_URL()
|
|
|
|
|
// 下载地址
|
|
// 下载地址
|
|
|
- this.optionFileView.url = api + '/file/download?attachmentId=' + this.attachment.id
|
|
|
|
|
|
|
+ this.optionFileView.url = this.$onlyofficeApi + '/file/download?attachmentId=' + this.attachment.id
|
|
|
// 回调接口url
|
|
// 回调接口url
|
|
|
- this.optionFileView.editUrl = api + '/file/editCallback?fileName=' + this.attachment.fileName + '&fileType=' + this.attachment.ext
|
|
|
|
|
|
|
+ this.optionFileView.editUrl = this.$onlyofficeApi + '/file/editCallback?fileName=' + this.attachment.fileName + '&fileType=' + this.attachment.ext
|
|
|
this.optionFileView.title = this.attachment.fileName // 文件名称
|
|
this.optionFileView.title = this.attachment.fileName // 文件名称
|
|
|
this.optionFileView.fileType = this.attachment.ext // 类型
|
|
this.optionFileView.fileType = this.attachment.ext // 类型
|
|
|
this.optionFileView.data = this.attachment // 记录编制的位置,需要替换。
|
|
this.optionFileView.data = this.attachment // 记录编制的位置,需要替换。
|