修改pdf预览

This commit is contained in:
范强强
2023-04-07 15:43:41 +08:00
parent 3abb5364b4
commit e044c62077
@@ -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);
})
}
})