feat: There is no way the, plan lxd

This commit is contained in:
super_liu
2022-01-18 16:13:56 +08:00
parent 68471bda31
commit dae0e83a6c
5 changed files with 110 additions and 3 deletions
+6
View File
@@ -8,6 +8,7 @@ import hasPermission from './hasPermission'
import preview from './preview'
import onlineEdit from './onlineEdit'
import onlinePreview from './onlinePreview'
import onlineEditPreview from './onlineEditPreview'
// 表单验证
import verify from './verify'
@@ -46,6 +47,11 @@ const install = function (Vue) {
return onlinePreview
}
},
$onlineEditPreview: {
get () {
return onlineEditPreview
}
},
$onlineEdit: {
get () {
return onlineEdit
+29
View File
@@ -0,0 +1,29 @@
/**
* 工作流文件在线编辑预览
*/
import { onlyOfficeUrl,kkFileViewUrl } from '@/sysConfig'
import { processEditFile } from 'api/process'
let Base64 = require('js-base64').Base64;
export default (id,nodeName,userId,userName) => {
processEditFile({
id
}).then(res => {
if(res){
const editFileInfo = res
const showName = nodeName
const editFilePath = editFileInfo.editFilePath.split("/")
editFileInfo.filePath = editFilePath[0]+'/'+editFilePath[1]+'/'
editFileInfo.fileName = editFilePath[2]
editFileInfo.userId = userId
editFileInfo.userName = userName
if(editFileInfo.pid){
editFileInfo.pId = editFileInfo.pid
}
editFileInfo.fileSuffix = 'docx'
const nowTime = new Date().getTime()
window.open(onlyOfficeUrl+'/onlyOffice?oldFileName=' + showName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
}
}).catch(e => {
})
}