diff --git a/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue b/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue index 31fdb3b8..16854f90 100644 --- a/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue +++ b/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue @@ -61,19 +61,22 @@ - + - + - + - + - + - + - + @@ -84,7 +87,7 @@ - + @@ -182,6 +185,8 @@ import { enStandardEditTurnTo } from '@/api/workCenter' import { WorkCenterMixin } from '@/mixins/WorkCenterMixin' +import { queryFileInfoByEditId } from '../../../api/workCenter' +import { Base64 } from 'js-base64' export default { name: 'EnterpriseStandardRevisionFlow', @@ -364,7 +369,8 @@ export default { }, flowInitType: 'newProcess', // 流程发起类型,是自动发起(auto)的还是从新建流程发起的(newProcess) rejectBtnDisabled: false, // 驳回按钮是否置灰 - agreeBtnDisabled: false // 同意按钮是否置灰 + agreeBtnDisabled: false, // 同意按钮是否置灰 + documentUrl: window._CONFIG.documentUrl } }, methods: { @@ -544,6 +550,8 @@ export default { param.data.otherDraftUserVOS = data.otherDraftUserVOS // 企标计划id param.data.espId = data.formInline.espId + // 在线编辑的文件id + param.data.onEditFile = data.onEditFile // data的id param.data.id = this.model.data ? this.model.data.id : '' let func @@ -694,6 +702,18 @@ export default { } }) }) + }, + // 在线编辑的查看 + onlineEditView (fileId) { + queryFileInfoByEditId({ id: fileId }).then(res => { + if (res.success) { + const file = res.result + const filePaths = file.editFilePath.split('/') + const fileName = filePaths[filePaths.length - 1] + const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.editFilePath + '&fullfilename=' + fileName))}` + window.open(url, '_blank') + } + }) } } } diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/CheckContentProcessModal.vue b/src/views/workCenter/enterpriseStandardRevision/modules/CheckContentProcessModal.vue index c02317b5..5e022ece 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/CheckContentProcessModal.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/CheckContentProcessModal.vue @@ -82,7 +82,8 @@ export default { } }, index: undefined, // 编辑的表格的下标 - iframeSrc: '' // 左侧预览的路径 + iframeSrc: '', // 左侧预览的路径 + documentUrl: window._CONFIG.documentUrl } }, methods: { @@ -118,9 +119,9 @@ export default { }) }, handlePreview (file) { - const filePaths = file.filePath.split('/') + const filePaths = file.editFilePath.split('/') const fileName = filePaths[filePaths.length - 1] - const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}` + const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.editFilePath + '&fullfilename=' + fileName))}` this.iframeSrc = url }, close () { diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/CommentModal.vue b/src/views/workCenter/enterpriseStandardRevision/modules/CommentModal.vue index e09a53cb..ffef021e 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/CommentModal.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/CommentModal.vue @@ -121,7 +121,8 @@ export default { }, index: undefined, // 编辑的表格的下标 iframeSrc: '', // 左侧预览的路径 - isAdd: false // 是否是新增,新增才有提交并新增按钮 + isAdd: false, // 是否是新增,新增才有提交并新增按钮 + documentUrl: window._CONFIG.documentUrl } }, methods: { @@ -158,9 +159,9 @@ export default { }) }, handlePreview (file) { - const filePaths = file.filePath.split('/') + const filePaths = file.editFilePath.split('/') const fileName = filePaths[filePaths.length - 1] - const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}` + const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.editFilePath + '&fullfilename=' + fileName))}` this.iframeSrc = url }, close () { diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue index 9f4573be..0843ccce 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue @@ -210,15 +210,7 @@ export default { }, // 在线编辑的查看 onlineEditView () { - queryFileInfoByEditId({ id: this.onEditFile }).then(res => { - if (res.success) { - const file = res.result - 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') - } - }) + this.$emit('onlineEditView', this.onEditFile) } } } diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/ConfirmWhetherCommentBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/ConfirmWhetherCommentBaseInfo.vue index 571dee82..b271dd76 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/ConfirmWhetherCommentBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/ConfirmWhetherCommentBaseInfo.vue @@ -130,15 +130,7 @@ export default { }, // 在线编辑的查看 onlineEditView () { - queryFileInfoByEditId({ id: this.onEditFile }).then(res => { - if (res.success) { - const file = res.result - 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') - } - }) + this.$emit('onlineEditView', this.onEditFile) } } } diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonCollectBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonCollectBaseInfo.vue index dd01a98e..9898a600 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonCollectBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonCollectBaseInfo.vue @@ -238,15 +238,7 @@ export default { }, // 在线编辑的查看 onlineEditView () { - queryFileInfoByEditId({ id: this.onEditFile }).then(res => { - if (res.success) { - const file = res.result - 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') - } - }) + this.$emit('onlineEditView', this.onEditFile) } } } diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue index f0984468..be8451fc 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue @@ -149,15 +149,7 @@ export default { }, // 在线编辑的查看 onlineEditView () { - queryFileInfoByEditId({ id: this.onEditFile }).then(res => { - if (res.success) { - const file = res.result - 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') - } - }) + this.$emit('onlineEditView', this.onEditFile) } } } diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonLeaderApproveBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonLeaderApproveBaseInfo.vue index 6702325c..0ab59fe6 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonLeaderApproveBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonLeaderApproveBaseInfo.vue @@ -219,15 +219,7 @@ export default { }, // 在线编辑的查看 onlineEditView () { - queryFileInfoByEditId({ id: this.onEditFile }).then(res => { - if (res.success) { - const file = res.result - 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') - } - }) + this.$emit('onlineEditView', this.onEditFile) } } } diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterProofreadBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterProofreadBaseInfo.vue index 7ff91050..ed1f999c 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterProofreadBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterProofreadBaseInfo.vue @@ -50,15 +50,7 @@ export default { }, // 在线编辑的查看 onlineEditView () { - queryFileInfoByEditId({ id: this.onEditFile }).then(res => { - if (res.success) { - const file = res.result - 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') - } - }) + this.$emit('onlineEditView', this.onEditFile) } } } diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterUploadStandardBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterUploadStandardBaseInfo.vue index 0ee49c85..9a2008b2 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterUploadStandardBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterUploadStandardBaseInfo.vue @@ -219,6 +219,19 @@ export default { } - diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/ScorerMarkBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/ScorerMarkBaseInfo.vue index f60b06da..ba621e63 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/ScorerMarkBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/ScorerMarkBaseInfo.vue @@ -398,15 +398,7 @@ export default { }, // 在线编辑的查看 onlineEditView () { - queryFileInfoByEditId({ id: this.onEditFile }).then(res => { - if (res.success) { - const file = res.result - 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') - } - }) + this.$emit('onlineEditView', this.onEditFile) } } } diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/StandardizationAuditBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/StandardizationAuditBaseInfo.vue index a55c71c7..b0d59efb 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/StandardizationAuditBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/StandardizationAuditBaseInfo.vue @@ -120,6 +120,7 @@ import { kkFilePreview } from '@/utils/kkFilePreview' import { ACCESS_TOKEN } from '@/store/mutation-types' import { queryFileInfoByEditId } from '../../../../api/workCenter' import { Base64 } from 'js-base64' +import { onlineEditor } from '../../../../utils/onlyOfficeUtils' export default { name: 'StandardizationAuditBaseInfo', @@ -168,6 +169,7 @@ export default { } ] }, + documentUrl: window._CONFIG.documentUrl, onEditFile: '' // 在线编辑的文件id } }, @@ -221,15 +223,7 @@ export default { }, // 在线编辑的查看 onlineEditView () { - queryFileInfoByEditId({ id: this.onEditFile }).then(res => { - if (res.success) { - const file = res.result - 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') - } - }) + this.$emit('onlineEditView', this.onEditFile) } } }