Merge branch 'fix_20240123_UAT' into 'master'
Fix 20240123 uat See merge request laws-foton-slrs/foton-laws-system-front!156
This commit is contained in:
@@ -29,6 +29,10 @@ async function preview (attId, type) {
|
|||||||
}
|
}
|
||||||
const res = await getBusStandFileByAttId({ attId })
|
const res = await getBusStandFileByAttId({ attId })
|
||||||
if (res.ok && res.data) {
|
if (res.ok && res.data) {
|
||||||
|
let viewer = '/static/pdf/web/viewer.html?file='
|
||||||
|
if (isMobile()) {
|
||||||
|
viewer = '/static/pdf_old/web/viewer.html?file='
|
||||||
|
}
|
||||||
const file = res.data
|
const file = res.data
|
||||||
let url = ''
|
let url = ''
|
||||||
if (file.fileSuffix.toLowerCase() === 'pdg') {
|
if (file.fileSuffix.toLowerCase() === 'pdg') {
|
||||||
@@ -39,13 +43,13 @@ async function preview (attId, type) {
|
|||||||
url = 'book://ssreader/e0?url=' + file.downLoadUrl
|
url = 'book://ssreader/e0?url=' + file.downLoadUrl
|
||||||
}
|
}
|
||||||
} else if (file.fileSuffix.toLowerCase() === 'pdf') {
|
} else if (file.fileSuffix.toLowerCase() === 'pdf') {
|
||||||
url = './static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + file.id)
|
url = viewer + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + file.id)
|
||||||
} else {
|
} else {
|
||||||
// onlyoffice在线编辑文件转换为pdf预览 -> kkfileview预览乱码
|
// onlyoffice在线编辑文件转换为pdf预览 -> kkfileview预览乱码
|
||||||
if (file.onlined && file.onlined === 1) {
|
if (file.onlined && file.onlined === 1) {
|
||||||
const res = await queryConvertAtt({ attId })
|
const res = await queryConvertAtt({ attId })
|
||||||
if (res.ok && res.data) {
|
if (res.ok && res.data) {
|
||||||
url = '/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + res.data.attId)
|
url = viewer + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + res.data.attId)
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('文档未转换成功或本地读取不到该文档')
|
this.$message.error('文档未转换成功或本地读取不到该文档')
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user