feat:FOTON release
This commit is contained in:
@@ -336,26 +336,21 @@ export default {
|
|||||||
handlePreview(file) {
|
handlePreview(file) {
|
||||||
const attId = file.response.data.id
|
const attId = file.response.data.id
|
||||||
if (this.preview) {
|
if (this.preview) {
|
||||||
if (attId) {
|
|
||||||
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + attId
|
this.getBusStandFileByAttId(attId)
|
||||||
} else {
|
.then(res => {
|
||||||
this.$message.warning('文件不存在,下载失败')
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.getBusStandFileByAttId(attId)
|
|
||||||
.then(res => {
|
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if(res){
|
if(res){
|
||||||
const editFileInfo = res
|
const editFileInfo = res
|
||||||
console.log(editFileInfo)
|
console.log(editFileInfo)
|
||||||
if(editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG'){
|
if(editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG'){
|
||||||
window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl)
|
window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl)
|
||||||
}else {
|
}else {
|
||||||
const nowTime = new Date().getTime()
|
const nowTime = new Date().getTime()
|
||||||
// window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)));
|
// window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)));
|
||||||
window.open('/static/onlyOffice/onlinePreview.html?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
|
window.open('/static/onlyOffice/onlinePreview.html?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
|
||||||
}
|
}
|
||||||
// window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id))
|
// window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id))
|
||||||
}
|
}
|
||||||
// switch (res.convertState) {
|
// switch (res.convertState) {
|
||||||
// case 'ERROR':
|
// case 'ERROR':
|
||||||
@@ -369,10 +364,16 @@ export default {
|
|||||||
// window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + convertFileInfo.id))
|
// window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + convertFileInfo.id))
|
||||||
// break
|
// break
|
||||||
// }
|
// }
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
this.$message.warning('文件不存在,预览失败')
|
this.$message.warning('文件不存在,预览失败')
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
if (attId) {
|
||||||
|
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + attId
|
||||||
|
} else {
|
||||||
|
this.$message.warning('文件不存在,下载失败')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user