Merge remote-tracking branch 'origin/fourthStage-onlyoffice' into fourthStage
This commit is contained in:
@@ -205,6 +205,7 @@ export default {
|
||||
name: fileInfo.fileName,
|
||||
status: 'done',
|
||||
url: fileInfo.url,
|
||||
pdfId: fileInfo.pdfId,
|
||||
// response用于下载和预览
|
||||
response: {
|
||||
success: true,
|
||||
@@ -299,6 +300,13 @@ export default {
|
||||
if (!file || !file.url) {
|
||||
return
|
||||
}
|
||||
console.log(file)
|
||||
if (file.pdfId) {
|
||||
// 说明是onlyOffice生成的
|
||||
const url = previewPdf(file.pdfId)
|
||||
window.open(url)
|
||||
return
|
||||
}
|
||||
// 截取文件后缀名
|
||||
const fileSuffix = (file.name ? file.name.split('.')[file.name.split('.').length - 1] : '').toLowerCase()
|
||||
const canPreview = CAN_PREVIEW_FILE_SUFFIX.some(tt => fileSuffix === tt)
|
||||
|
||||
@@ -394,6 +394,14 @@ export default {
|
||||
}
|
||||
console.log('seletedFile', file)
|
||||
|
||||
// 是onlyOffice生成的,预览关联的pdf文件
|
||||
if (file.pdfId) {
|
||||
// 说明是onlyOffice生成的
|
||||
const url = previewPdf(file.pdfId)
|
||||
window.open(url)
|
||||
return
|
||||
}
|
||||
|
||||
// 预览选择的文件
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.name}`
|
||||
console.log(fileFullUrl)
|
||||
@@ -410,7 +418,10 @@ export default {
|
||||
*/
|
||||
async selectNewestFile (fileList) {
|
||||
if (!fileList || fileList.length === 0) return null
|
||||
if (fileList.length === 1) return fileList[0]
|
||||
if (fileList.length === 1) {
|
||||
const res = await getFileInfo(fileList[0])
|
||||
return { ...fileList[0], ...res.result }
|
||||
}
|
||||
const newFileList = []
|
||||
// 获取时间信息
|
||||
for (const file of fileList) {
|
||||
|
||||
@@ -618,6 +618,14 @@ export default {
|
||||
}
|
||||
console.log('seletedFile', file)
|
||||
|
||||
// 是onlyOffice生成的,预览关联的pdf文件
|
||||
if (file.pdfId) {
|
||||
// 说明是onlyOffice生成的
|
||||
const url = previewPdf(file.pdfId)
|
||||
window.open(url)
|
||||
return
|
||||
}
|
||||
|
||||
// 预览选择的文件
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.name}`
|
||||
console.log(fileFullUrl)
|
||||
@@ -634,7 +642,10 @@ export default {
|
||||
*/
|
||||
async selectNewestFile (fileList) {
|
||||
if (!fileList || fileList.length === 0) return null
|
||||
if (fileList.length === 1) return fileList[0]
|
||||
if (fileList.length === 1) {
|
||||
const res = await getFileInfo(fileList[0])
|
||||
return { ...fileList[0], ...res.result }
|
||||
}
|
||||
const newFileList = []
|
||||
// 获取时间信息
|
||||
for (const file of fileList) {
|
||||
|
||||
@@ -828,6 +828,14 @@ export default {
|
||||
}
|
||||
console.log('seletedFile', file)
|
||||
|
||||
// 是onlyOffice生成的,预览关联的pdf文件
|
||||
if (file.pdfId) {
|
||||
// 说明是onlyOffice生成的
|
||||
const url = previewPdf(file.pdfId)
|
||||
window.open(url)
|
||||
return
|
||||
}
|
||||
|
||||
// 预览选择的文件
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.name}`
|
||||
console.log(fileFullUrl)
|
||||
@@ -844,7 +852,10 @@ export default {
|
||||
*/
|
||||
async selectNewestFile (fileList) {
|
||||
if (!fileList || fileList.length === 0) return null
|
||||
if (fileList.length === 1) return fileList[0]
|
||||
if (fileList.length === 1) {
|
||||
const res = await getFileInfo(fileList[0])
|
||||
return { ...fileList[0], ...res.result }
|
||||
}
|
||||
const newFileList = []
|
||||
// 获取时间信息
|
||||
for (const file of fileList) {
|
||||
|
||||
@@ -287,6 +287,12 @@ export default {
|
||||
if (!file || !file.url) {
|
||||
return
|
||||
}
|
||||
if (file.pdfId) {
|
||||
// 说明是onlyOffice生成的
|
||||
const url = previewPdf(file.pdfId)
|
||||
window.open(url)
|
||||
return
|
||||
}
|
||||
// 截取文件后缀名
|
||||
const fileSuffix = file.fileName ? file.fileName.split('.')[file.fileName.split('.').length - 1] : ''
|
||||
const canPreview = CAN_PREVIEW_FILE_SUFFIX.some(tt => fileSuffix.toLowerCase() === tt)
|
||||
|
||||
Reference in New Issue
Block a user