diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/step5.vue b/src/pages/processCenter/pages/creatProcess/qbrk/step5.vue index e85771ce7..78f088bcf 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/step5.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/step5.vue @@ -1474,18 +1474,31 @@ id:attId }).then(res => { if(res){ - const editFileInfo = res - const showName = label - const editFilePath = editFileInfo.editFilePath.split("/") - editFileInfo.filePath = editFilePath[0]+'/'+editFilePath[1]+'/' - editFileInfo.fileName = editFilePath[2] - if(editFileInfo.pid){ - editFileInfo.pId = editFileInfo.pid - } - editFileInfo.fileSuffix = 'docx' + // const editFileInfo = res + // const showName = label + // const editFilePath = editFileInfo.editFilePath.split("/") + // editFileInfo.filePath = editFilePath[0]+'/'+editFilePath[1]+'/' + // editFileInfo.fileName = editFilePath[2] + // if(editFileInfo.pid){ + // editFileInfo.pId = editFileInfo.pid + // } + // editFileInfo.fileSuffix = 'docx' + // const nowTime = new Date().getTime() + // this.iframeUrl = onlyOfficeUrl+'/onlyOffice?oldFileName=' + showName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName + // this.iframeLoading = false + + const editFileInfo = res + const _index = editFileInfo.downLoadUrl.lastIndexOf('.') + editFileInfo.fileSuffix = editFileInfo.downLoadUrl.slice(_index + 1) + if(editFileInfo.fileSuffix.toLowerCase() === 'pdg'){ + this.iframeUrl = 'book://ssreader/e0?url='+editFileInfo.downLoadUrl + }else if(editFileInfo.fileSuffix.toLowerCase() === 'pdf'){ + this.iframeUrl = './static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id) + }else { const nowTime = new Date().getTime() - this.iframeUrl = onlyOfficeUrl+'/onlyOffice?oldFileName=' + showName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName - this.iframeLoading = false + this.iframeUrl = kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl))+'&office.preview.type=pdf'; + } + this.iframeLoading = false resolve(res) } }).catch(e => {