技术标准(征求意见)-创建条款

This commit is contained in:
zyn
2023-04-06 00:32:10 +08:00
parent 5457bb6d51
commit ec9514ee63
@@ -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){