From e044c6207751808766285a65d03225d470baf7aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Fri, 7 Apr 2023 15:43:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9pdf=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/qbrk/step5.vue | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/step5.vue b/src/pages/processCenter/pages/creatProcess/qbrk/step5.vue index 955da075b..90adad6c8 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/step5.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/step5.vue @@ -893,6 +893,7 @@ import ProcessFooter from '../../components/ProcessFooter' import ProcessTitle from '../../components/ProcessTitle' import { onlyOfficeUrl,kkFileViewUrl } from '@/sysConfig' + import { processEditFile } from 'api/process' import {saveTaskForPub,changeAssigneeNew,saveTaskFirst, queryTaskFirst, getBusStandFileByAttId,inboundLiaisonDetail} from "api/process"; import {getEvaluationIndex} from "api/businessApi"; import TreeSelect from '@/components/treeSelect/treeSelect.vue'; @@ -1445,8 +1446,10 @@ }, previewShow(attId) { this.iframeLoading = true + console.log(attId); return new Promise((resolve, reject) => { - if(attId.indexOf('ATT_FILE') === 0){ + console.log(attId.indexOf('ATT_FILE')); + if(attId.indexOf('ATT_FILE') === 0){ getBusStandFileByAttId({ attId }).then(res => { @@ -1469,7 +1472,28 @@ }).catch(e => { }) }else{ - axios({ + processEditFile({ + id:attId + }).then(res => { + if(res){ + const editFileInfo = res + const showName = '' + 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 + // window.open() + this.iframeLoading = false + } + }).catch(e => { + }) + return + axios({ url: 'api/lawss/activiti/selectOnlineFile', method: 'get', params: attId @@ -1490,7 +1514,9 @@ this.$forceUpdate() resolve(history) } - }).catch(e=>{}) + }).catch(e=>{ + console.log(e); + }) } })