diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/step5.vue b/src/pages/processCenter/pages/creatProcess/qbrk/step5.vue index b7f4e76ac..955da075b 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/step5.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/step5.vue @@ -898,6 +898,7 @@ import TreeSelect from '@/components/treeSelect/treeSelect.vue'; import TreeSelectNew from '@/components/treeSelect/treeSelectNew.vue'; let Base64 = require('js-base64').Base64; + import axios from '@/common/axiosV2' export default { name: "bussLibrary5", @@ -1445,27 +1446,53 @@ previewShow(attId) { this.iframeLoading = true return new Promise((resolve, reject) => { + if(attId.indexOf('ATT_FILE') === 0){ getBusStandFileByAttId({ - attId + attId }).then(res => { - if(res){ - const history = res; - const editFileInfo = res.data - 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() - // window.open(onlyOfficeUrl+'/onlyOffice?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName) - this.iframeUrl = kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl))+'&office.preview.type=pdf'; - } - this.iframeLoading = false - this.$forceUpdate() - resolve(history) + if(res){ + const history = res; + const editFileInfo = res.data + 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() + // window.open(onlyOfficeUrl+'/onlyOffice?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName) + this.iframeUrl = kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl))+'&office.preview.type=pdf'; } + this.iframeLoading = false + this.$forceUpdate() + resolve(history) + } }).catch(e => { }) + }else{ + axios({ + url: 'api/lawss/activiti/selectOnlineFile', + method: 'get', + params: attId + }).then(res=>{ + if(res){ + const history = res; + const editFileInfo = res.data + 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() + // window.open(onlyOfficeUrl+'/onlyOffice?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName) + this.iframeUrl = kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl))+'&office.preview.type=pdf'; + } + this.iframeLoading = false + this.$forceUpdate() + resolve(history) + } + }).catch(e=>{}) + } + }) }, previewIframe(targetName, action){