update kkFile预览修改
This commit is contained in:
@@ -45,6 +45,8 @@ const columns = [
|
||||
width: 100
|
||||
}
|
||||
]
|
||||
// eslint-disable-next-line
|
||||
const Base64 = require('js-base64').Base64
|
||||
|
||||
export default {
|
||||
name: 'FileTable',
|
||||
@@ -137,7 +139,7 @@ export default {
|
||||
handlePreview(file) {
|
||||
if (file && file.id) {
|
||||
const fileFullUrl = `${window._CONFIG['domianWebSocketURL']}/sys/common/download/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.name}&type=view`
|
||||
let url = `${window._CONFIG['onlinePreviewDomainURL']}?url=${encodeURIComponent(fileFullUrl)}`
|
||||
let url = `${window._CONFIG['onlinePreviewDomainURL']}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
|
||||
// let url = `${window._CONFIG['onlinePreviewDomainURL']}?url=${encodeURIComponent(fileFullUrl)}`
|
||||
window.open(url)
|
||||
}
|
||||
|
||||
@@ -50,6 +50,9 @@ import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import { processingTimestamp } from '@/utils/util'
|
||||
|
||||
// eslint-disable-next-line
|
||||
const Base64 = require('js-base64').Base64
|
||||
|
||||
export default {
|
||||
name: 'UnderStudyFilesModal',
|
||||
props: {
|
||||
@@ -99,13 +102,13 @@ export default {
|
||||
if (this.isCommittee) {
|
||||
if (record && record.FILE_ID) {
|
||||
const fileFullUrl = `${window._CONFIG['domianWebSocketURL']}/payResearchProject/payResearchProject/download/?fileId=${record.FILE_ID}&token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.FILE_NAME}`
|
||||
let url = `${ window._CONFIG['onlinePreviewDomainURL'] }?url=${ encodeURIComponent(fileFullUrl) }`
|
||||
let url = `${ window._CONFIG['onlinePreviewDomainURL'] }?url=${ encodeURIComponent(Base64.encode(fileFullUrl)) }`
|
||||
window.open(url)
|
||||
}
|
||||
} else {
|
||||
if (record && record.fileId) {
|
||||
const fileFullUrl = `${ window._CONFIG['domianWebSocketURL'] }/sys/common/download/${ record.fileId }?token=${ Vue.ls.get(ACCESS_TOKEN) }&fullfilename=${ record.fileName }`
|
||||
let url = `${ window._CONFIG['onlinePreviewDomainURL'] }?url=${ encodeURIComponent(fileFullUrl) }`
|
||||
let url = `${ window._CONFIG['onlinePreviewDomainURL'] }?url=${ encodeURIComponent(Base64.encode(fileFullUrl)) }`
|
||||
window.open(url)
|
||||
}
|
||||
}
|
||||
@@ -120,4 +123,4 @@ export default {
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -43,7 +43,7 @@ import { getFileInfo } from '@api/api'
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
// eslint-disable-next-line
|
||||
// const Base64 = require('js-base64').Base64
|
||||
const Base64 = require('js-base64').Base64
|
||||
|
||||
export default {
|
||||
name: 'SubBidCommitteeDetail',
|
||||
@@ -129,7 +129,7 @@ export default {
|
||||
if (file && file.id) {
|
||||
const fileFullUrl = `${ window._CONFIG['domianWebSocketURL'] }/sys/common/download/${ file.id }?token=${ Vue.ls.get(ACCESS_TOKEN) }&fullfilename=${ file.name }`
|
||||
// let url = `${ window._CONFIG['onlinePreviewDomainURL'] }?url=${ encodeURIComponent(Base64.encode(fileFullUrl)) }`
|
||||
let url = `${ window._CONFIG['onlinePreviewDomainURL'] }?url=${ encodeURIComponent(fileFullUrl) }`
|
||||
let url = `${ window._CONFIG['onlinePreviewDomainURL'] }?url=${ encodeURIComponent(Base64.encode(fileFullUrl)) }`
|
||||
// let url = `${window._CONFIG['onlinePreviewDomainURL']}?url=${encodeURIComponent(fileFullUrl)}`
|
||||
window.open(url)
|
||||
}
|
||||
@@ -157,4 +157,4 @@ h3.title::before {
|
||||
color: #069f99;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user