feat: There is no way the, LXD

This commit is contained in:
super_liu
2022-01-18 14:40:25 +08:00
parent f9d586b51e
commit 59760a8dc5
10 changed files with 392 additions and 3 deletions
+13 -1
View File
@@ -6,6 +6,8 @@ import base64 from './base64'
import dateFormat from './date'
import hasPermission from './hasPermission'
import preview from './preview'
import onlineEdit from './onlineEdit'
import onlinePreview from './onlinePreview'
// 表单验证
import verify from './verify'
@@ -38,7 +40,17 @@ const install = function (Vue) {
get () {
return preview
}
}
},
$onlinePreview: {
get () {
return onlinePreview
}
},
$onlineEdit: {
get () {
return onlineEdit
}
},
})
}
export default {
+27
View File
@@ -0,0 +1,27 @@
/**
* 在线编辑
*/
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
}
const nowTime = new Date().getTime()
window.open(onlyOfficeUrl+'/editor?pid='+editFileInfo.pId+'&taskIds='+editFileInfo.taskId+'&editType='+editFileInfo.editType+'&oldFileName=' + showName + '&fileType=' + 'docx' + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName+'&userId='+editFileInfo.userId+'&userName='+editFileInfo.userName)
}
}).catch(e => {
})
}
+17
View File
@@ -0,0 +1,17 @@
/**
* 工作流文件预览
*/
import { onlyOfficeUrl,kkFileViewUrl } from '@/sysConfig'
import { processEditFile } from 'api/process'
let Base64 = require('js-base64').Base64;
export default id => {
processEditFile({
id
}).then(res => {
if(res){
const editFileInfo = res
window.open(kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)));
}
}).catch(e => {
})
}