소스 검색

修改onlyoffice文件编辑路径修改

cyy 3 달 전
부모
커밋
36b6c29b35
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      src/business/platform/file/attachment/editFile/editor.vue

+ 6 - 0
src/business/platform/file/attachment/editFile/editor.vue

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