diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/step5.vue b/src/pages/processCenter/pages/creatProcess/qbrk/step5.vue index 90adad6c8..e85771ce7 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/step5.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/step5.vue @@ -1444,11 +1444,9 @@ emitDataLoading(boo){ this.dataLoading = boo }, - previewShow(attId) { + previewShow(attId, label) { this.iframeLoading = true - console.log(attId); return new Promise((resolve, reject) => { - console.log(attId.indexOf('ATT_FILE')); if(attId.indexOf('ATT_FILE') === 0){ getBusStandFileByAttId({ attId @@ -1477,7 +1475,7 @@ }).then(res => { if(res){ const editFileInfo = res - const showName = '' + const showName = label const editFilePath = editFileInfo.editFilePath.split("/") editFileInfo.filePath = editFilePath[0]+'/'+editFilePath[1]+'/' editFileInfo.fileName = editFilePath[2] @@ -1487,36 +1485,37 @@ 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 - // window.open() this.iframeLoading = false + resolve(res) } }).catch(e => { }) - return - 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=>{ - console.log(e); - }) + // return + // 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'; + // // onlyOfficeUrl+'/editor?fileId='+editFileInfo.id+'&pid='+editFileInfo.pId+'&taskIds='+editFileInfo.taskId+'&editType='+editFileInfo.editType+'&oldFileName=' + showName + '&fileType=' + 'docx' + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id +'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName+'&userId='+editFileInfo.userId+'&userName='+editFileInfo.userName + // } + // this.iframeLoading = false + // this.$forceUpdate() + // resolve(history) + // } + // }).catch(e=>{ + // console.log(e); + // }) } }) @@ -1524,7 +1523,7 @@ previewIframe(targetName, action){ let attId = targetName.name this.iframeUrl = "" - this.previewShow(attId) + this.previewShow(attId, targetName.label) }, showDrawerClose () { this.showForm.modelNum = "" @@ -1722,7 +1721,7 @@ // } if(this.FBGBUSSFileList.length > 0){ this.editableTabsValue = this.FBGBUSSFileList[0].id - this.previewShow(this.FBGBUSSFileList[0].id) + this.previewShow(this.FBGBUSSFileList[0].id, this.FBGBUSSFileList[0].name) } this.showDrawer = true this.showDrawerTitle = "新增征求意见"