[update] 企标制修订和企标更改流程左侧预览改成在线编辑预览

This commit is contained in:
lideqin
2024-04-24 15:09:46 +08:00
parent a3f60b207b
commit 386b99a97b
3 changed files with 34 additions and 51 deletions
+17
View File
@@ -98,3 +98,20 @@ export const onlineEditorView = async (fileId) => {
const url = `${window._CONFIG.onlyOfficeUrl}/previewHistoryPage?filePath=${fileInfo.editFilePath}&fileName=${fileInfo.fileName}&fileType=${fileSuffix}&fileId=${fileInfo.id}&key=${fileInfo.id}&userId=${userInfo.id}&userName=${userInfo.realname}&fileInfo={}`
window.open(url, '_blank')
}
// 根据文件id获取在线编辑查看路径
export const onlineEditorGetUrl = async (fileId) => {
let fileInfo
if (fileId) {
fileInfo = await queryFileInfo(fileId)
}
if (!fileInfo) {
return false
}
// 获取用户信息
const userInfo = Vue.ls.get(USER_INFO)
// 截取文件后缀名
const fileSuffix = (fileInfo.fileName ? fileInfo.fileName.split('.')[fileInfo.fileName.split('.').length - 1] : '').toLowerCase()
const url = `${window._CONFIG.onlyOfficeUrl}/previewHistoryPage?filePath=${fileInfo.editFilePath}&fileName=${fileInfo.fileName}&fileType=${fileSuffix}&fileId=${fileInfo.id}&key=${fileInfo.id}&userId=${userInfo.id}&userName=${userInfo.realname}&fileInfo={}`
return url
}