[update] 企标制修订和企标更改流程在线编辑查看改成跳转在线编辑查看页面
This commit is contained in:
@@ -81,3 +81,20 @@ export const onlineEditor = async (params, fileId) => {
|
|||||||
window.open(url, '_blank')
|
window.open(url, '_blank')
|
||||||
return fileInfo.id
|
return fileInfo.id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 跳转在线编辑查看
|
||||||
|
export const onlineEditorView = async (fileId) => {
|
||||||
|
let fileInfo
|
||||||
|
if (fileId) {
|
||||||
|
fileInfo = await queryFileInfo(fileId)
|
||||||
|
}
|
||||||
|
if (!fileInfo) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
// 获取用户信息
|
||||||
|
const userInfo = Vue.ls.get(USER_INFO)
|
||||||
|
// 截取文件后缀名
|
||||||
|
const fileSuffix = (fileInfo.fileName ? fileInfo.fileName.split('.')[fileInfo.fileName.split('.').length - 1] : '').toLowerCase()
|
||||||
|
const url = `${window._CONFIG.onlyOfficeUrl}/previewHistoryPage?filePath=${fileInfo.editFilePath}&fileName=${fileInfo.fileName}&fileType=${fileSuffix}&fileId=${fileInfo.id}&key=${fileInfo.id}&userId=${userInfo.id}&userName=${userInfo.realname}&fileInfo={}`
|
||||||
|
window.open(url, '_blank')
|
||||||
|
}
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ import { ACCESS_TOKEN } from '@/store/mutation-types'
|
|||||||
import { kkFilePreview } from '@/utils/kkFilePreview'
|
import { kkFilePreview } from '@/utils/kkFilePreview'
|
||||||
import { queryFileInfoByEditId } from '../../../../api/workCenter'
|
import { queryFileInfoByEditId } from '../../../../api/workCenter'
|
||||||
import { Base64 } from 'js-base64'
|
import { Base64 } from 'js-base64'
|
||||||
|
import { onlineEditorView } from '../../../../utils/onlyOfficeUtils'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ApproveBaseInfo',
|
name: 'ApproveBaseInfo',
|
||||||
@@ -185,18 +186,9 @@ export default {
|
|||||||
if (!this.onEditFile) {
|
if (!this.onEditFile) {
|
||||||
this.$message.warning(this.$t('workCenter.enStandardRevision.noStandardTextLook'))
|
this.$message.warning(this.$t('workCenter.enStandardRevision.noStandardTextLook'))
|
||||||
return
|
return
|
||||||
|
} else {
|
||||||
|
onlineEditorView(this.onEditFile)
|
||||||
}
|
}
|
||||||
queryFileInfoByEditId({ id: this.onEditFile }).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')
|
|
||||||
} else {
|
|
||||||
this.$message.warning(res.message)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -181,11 +181,12 @@ import {
|
|||||||
enStandardEditGetDataDraft,
|
enStandardEditGetDataDraft,
|
||||||
enStandardEditReject,
|
enStandardEditReject,
|
||||||
enStandardEditSave,
|
enStandardEditSave,
|
||||||
enStandardEditTurnTo
|
enStandardEditTurnTo,
|
||||||
|
queryFileInfoByEditId
|
||||||
} from '@/api/workCenter'
|
} from '@/api/workCenter'
|
||||||
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
||||||
import { queryFileInfoByEditId } from '../../../api/workCenter'
|
|
||||||
import { Base64 } from 'js-base64'
|
import { Base64 } from 'js-base64'
|
||||||
|
import { onlineEditorView } from '../../../utils/onlyOfficeUtils'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'EnterpriseStandardRevisionFlow',
|
name: 'EnterpriseStandardRevisionFlow',
|
||||||
@@ -716,20 +717,9 @@ export default {
|
|||||||
onlineEditView (fileId) {
|
onlineEditView (fileId) {
|
||||||
if (!fileId) {
|
if (!fileId) {
|
||||||
this.$message.warning(this.$t('workCenter.enStandardRevision.noStandardTextLook'))
|
this.$message.warning(this.$t('workCenter.enStandardRevision.noStandardTextLook'))
|
||||||
return
|
} else {
|
||||||
|
onlineEditorView(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))}`
|
|
||||||
console.log(this.documentUrl + file.editFilePath + '&fullfilename=' + fileName)
|
|
||||||
window.open(url, '_blank')
|
|
||||||
} else {
|
|
||||||
this.$message.warning(res.message)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user