update kkFile预览修改
This commit is contained in:
@@ -9,7 +9,7 @@ window._CONFIG["staticDomainURL"] = window._CONFIG["domianURL"] + "/sys/common/d
|
||||
window._CONFIG["pdfDomainURL"] = window._CONFIG["domianURL"] + "/sys/common/pdf/pdfPreviewIframe";
|
||||
window._CONFIG["casPrefixUrl"] = "http://cas.example.org:8443/cas";
|
||||
// 预览文件地址
|
||||
window._CONFIG["onlinePreviewDomainURL"] = "http://cwp.catarc.org.cn:8092/onlinePreview";
|
||||
window._CONFIG["onlinePreviewDomainURL"] = "http://cwp.catarc.org.cn:8092/perview/onlinePreview";
|
||||
|
||||
// 会议管理报名二维码地址
|
||||
window._CONFIG["singUpQRCodeURL"] = "https://cwp.catarc.org.cn/signupentrance"
|
||||
@@ -29,4 +29,4 @@ window._CONFIG["sendPostCode"] = "300300"
|
||||
window._CONFIG["lookExpressDomainURL"] = "http://cwp.catarc.org.cn/lookExpressInfo"
|
||||
|
||||
// 来款内部部署的ip
|
||||
window._CONFIG["intranetUrl"] = "http://10.12.8.1/";
|
||||
window._CONFIG["intranetUrl"] = "http://10.12.8.1/";
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import { getFileAccessHttpUrl } from '@/api/manage'
|
||||
import {getFileInfo} from '@api/api'
|
||||
import {isExternalTerminal} from '../../utils/util'
|
||||
import { isExternalTerminal } from '../../utils/util'
|
||||
// eslint-disable-next-line
|
||||
const Base64 = require('js-base64').Base64
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
created(){
|
||||
const token = Vue.ls.get(ACCESS_TOKEN)
|
||||
this.headers = {
|
||||
'X-Access-Token': token,
|
||||
'X-Access-Token':token,
|
||||
'externalTerminalShow': isExternalTerminal ? 'external' : 'inside'
|
||||
}
|
||||
},
|
||||
@@ -236,7 +236,7 @@
|
||||
if (file && file.url) {
|
||||
var fileFullUrl = `${window._CONFIG['domianWebSocketURL']}/sys/common/download/${file.response.result.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.previewName || 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))}`
|
||||
window.open(url)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -55,9 +55,8 @@ import {ACCESS_TOKEN} from '@/store/mutation-types'
|
||||
import {getFileAccessHttpUrl, downloadFile} from '@/api/manage'
|
||||
import {getFileInfo} from '@/api/api'
|
||||
import {isExternalTerminal} from '../../utils/util'
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
// const Base64 = require('js-base64').Base64
|
||||
const Base64 = require('js-base64').Base64
|
||||
|
||||
const FILE_TYPE_ALL = 'all'
|
||||
const FILE_TYPE_IMG = 'image'
|
||||
@@ -393,7 +392,8 @@ export default {
|
||||
// eslint-disable-next-line no-unreachable
|
||||
if (file && file.url) {
|
||||
const fileFullUrl = `${window._CONFIG['domianWebSocketURL']}/sys/common/download/${file.response.result.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.previewName}`
|
||||
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)
|
||||
}
|
||||
@@ -447,7 +447,7 @@ export default {
|
||||
myPreview(file) {
|
||||
if (file && file.url) {
|
||||
const fileFullUrl = `${window._CONFIG['domianWebSocketURL']}/sys/common/download/${file.response.result.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.previewName}`
|
||||
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)
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import {ACCESS_TOKEN} from '@/store/mutation-types'
|
||||
import {getFileInfo} from '@/api/api'
|
||||
import {downloadFile} from '@api/manage'
|
||||
// eslint-disable-next-line
|
||||
// const Base64 = require('js-base64').Base64
|
||||
const Base64 = require('js-base64').Base64
|
||||
|
||||
|
||||
export default {
|
||||
@@ -88,7 +88,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.previewName}`
|
||||
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)
|
||||
}
|
||||
@@ -105,4 +105,4 @@ export default {
|
||||
.m-l-4 {
|
||||
margin-left: 4px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -79,7 +79,7 @@ import { downloadFile } from '../../../../api/manage'
|
||||
import { ACCESS_TOKEN } from '../../../../store/mutation-types'
|
||||
import { Modal } from 'ant-design-vue'
|
||||
import store from '@/store'
|
||||
import {isExternalTerminal} from '../../../../utils/util'
|
||||
import { isExternalTerminal } from '../../../../utils/util'
|
||||
const FILE_TYPE_ALL = 'all'
|
||||
|
||||
const columns = [
|
||||
@@ -106,6 +106,9 @@ const columns = [
|
||||
}
|
||||
]
|
||||
|
||||
// eslint-disable-next-line
|
||||
const Base64 = require('js-base64').Base64
|
||||
|
||||
export default {
|
||||
name: 'UploadMeetFileModal',
|
||||
components: {
|
||||
@@ -343,7 +346,7 @@ export default {
|
||||
const previewName = previewUrl.substring(previewUrl.lastIndexOf(fileNameNotType))
|
||||
|
||||
const fileFullUrl = `${window._CONFIG['domianWebSocketURL']}/sys/common/download/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${previewName}`
|
||||
let url = `${window._CONFIG['onlinePreviewDomainURL']}?url=${encodeURIComponent(fileFullUrl)}`
|
||||
let url = `${window._CONFIG['onlinePreviewDomainURL']}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
|
||||
window.open(url)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -535,7 +535,7 @@ export default {
|
||||
if (file && file.url) {
|
||||
const fileFullUrl = `${ window._CONFIG['domianWebSocketURL'] }/sys/common/download/${ file.id }?token=${ Vue.ls.get(ACCESS_TOKEN) }&fullfilename=${ file.fileName }`
|
||||
// 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)) }`
|
||||
window.open(url)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -67,6 +67,9 @@ const columns = [
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
]
|
||||
// eslint-disable-next-line
|
||||
const Base64 = require('js-base64').Base64
|
||||
|
||||
export default {
|
||||
name: 'CommitteeUnderStudyFilesModal',
|
||||
data() {
|
||||
@@ -99,7 +102,7 @@ export default {
|
||||
handlePreview(record) {
|
||||
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))}`
|
||||
// let url = `${window._CONFIG['onlinePreviewDomainURL']}?url=${encodeURIComponent(fileFullUrl)}`
|
||||
window.open(url)
|
||||
}
|
||||
@@ -114,4 +117,4 @@ export default {
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user