kkfileview预览
This commit is contained in:
@@ -4,13 +4,14 @@
|
|||||||
import { onlyOfficeUrl,kkFileViewUrl } from '@/sysConfig'
|
import { onlyOfficeUrl,kkFileViewUrl } from '@/sysConfig'
|
||||||
import { processEditFile } from 'api/process'
|
import { processEditFile } from 'api/process'
|
||||||
let Base64 = require('js-base64').Base64;
|
let Base64 = require('js-base64').Base64;
|
||||||
|
import store from '@/store'
|
||||||
export default id => {
|
export default id => {
|
||||||
processEditFile({
|
processEditFile({
|
||||||
id
|
id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if(res){
|
if(res){
|
||||||
const editFileInfo = res
|
const editFileInfo = res
|
||||||
window.open(kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)) + '&watermarkTxt=' + encodeURIComponent(this.$store.getters.userInfo.userName));
|
window.open(kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)) + '&watermarkTxt=' + encodeURIComponent(store.getters.userInfo.userName));
|
||||||
}
|
}
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
import { onlyOfficeUrl,kkFileViewUrl } from '@/sysConfig'
|
import { onlyOfficeUrl,kkFileViewUrl } from '@/sysConfig'
|
||||||
import { getBusStandFileByAttId } from 'api/process'
|
import { getBusStandFileByAttId } from 'api/process'
|
||||||
let Base64 = require('js-base64').Base64;
|
let Base64 = require('js-base64').Base64;
|
||||||
|
import store from '@/store'
|
||||||
export default attId => {
|
export default attId => {
|
||||||
getBusStandFileByAttId({
|
getBusStandFileByAttId({
|
||||||
attId
|
attId
|
||||||
@@ -17,7 +18,7 @@ export default attId => {
|
|||||||
}else {
|
}else {
|
||||||
const nowTime = new Date().getTime()
|
const nowTime = new Date().getTime()
|
||||||
// window.open(onlyOfficeUrl+'/onlyOffice?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
|
// window.open(onlyOfficeUrl+'/onlyOffice?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
|
||||||
window.open(kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)) + '&watermarkTxt=' + encodeURIComponent(this.$store.getters.userInfo.userName));
|
window.open(kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)) + '&watermarkTxt=' + encodeURIComponent(store.getters.userInfo.userName));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user