|
@@ -9,6 +9,7 @@
|
|
|
import { handleDocType } from './editor/editor.js'
|
|
import { handleDocType } from './editor/editor.js'
|
|
|
import { showView } from '@/api/platform/file/attachment'
|
|
import { showView } from '@/api/platform/file/attachment'
|
|
|
import { getToken } from '@/utils/auth'
|
|
import { getToken } from '@/utils/auth'
|
|
|
|
|
+import { SYSTEM_URL, BASE_API, INTRANET_URL } from '@/api/baseUrl'
|
|
|
export default {
|
|
export default {
|
|
|
name: 'editor',
|
|
name: 'editor',
|
|
|
props: {
|
|
props: {
|
|
@@ -36,12 +37,17 @@ export default {
|
|
|
deep: true
|
|
deep: true
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ created(){
|
|
|
|
|
+ this.option.url = INTRANET_URL() + SYSTEM_URL() + '/file/download?attachmentId=' + this.option.url.split('/file/download?attachmentId=')[1]
|
|
|
|
|
+ this.option.editUrl = INTRANET_URL() + SYSTEM_URL() + '/file/editCallback?fileName=' + this.option.url.split('/file/editCallback?fileName=')[1]
|
|
|
|
|
+ },
|
|
|
mounted () {
|
|
mounted () {
|
|
|
// 调用初始化方法 ,渲染wps
|
|
// 调用初始化方法 ,渲染wps
|
|
|
if (this.option.url) {
|
|
if (this.option.url) {
|
|
|
this.setEditor(this.option)
|
|
this.setEditor(this.option)
|
|
|
}
|
|
}
|
|
|
if (this.option.mode === 'edit') {
|
|
if (this.option.mode === 'edit') {
|
|
|
|
|
+ console.log(this.option,'this.optionthis.option')
|
|
|
// 编辑模式下轮询获取文件id
|
|
// 编辑模式下轮询获取文件id
|
|
|
this.timer = setInterval(() => {
|
|
this.timer = setInterval(() => {
|
|
|
if (this.configKey) {
|
|
if (this.configKey) {
|