【修改】修改收费通知预览方式

This commit is contained in:
fengachen
2022-11-17 14:21:19 +08:00
parent 778935053f
commit 88f0e0401b
@@ -30,9 +30,9 @@
import CertificateInfo from '@views/standardsAssociation/PaymentInfo/CertificateInfo'
import MemberInfo from '@views/standardsAssociation/PaymentInfo/MemberInfo'
import {downNewestNotice} from '@api/standardsAssociationApi'
import {ACCESS_TOKEN} from '@/store/mutation-types'
import Vue from 'vue'
// import {previewPdf} from "@api/standardsAssociationApi";
// import {ACCESS_TOKEN} from '@/store/mutation-types'
// import Vue from 'vue'
import {previewPdf} from '@api/standardsAssociationApi'
export default {
name: 'FeeHandle',
@@ -57,19 +57,11 @@ export default {
},
methods: {
handlePreview() {
const file = {
id:this.newestNoticeInfo.chargeNoticeFileId,
name:this.newestNoticeInfo.chargeNoticeName
}
// eslint-disable-next-line no-unreachable
if (file ) {
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(fileFullUrl)}`
console.log(url)
console.log(fileFullUrl)
// let url = `${window._CONFIG['onlinePreviewDomainURL']}?url=${encodeURIComponent(fileFullUrl)}`
window.open(url)
const fileInfo = {
id: this.newestNoticeInfo.chargeNoticeFileId,
url: `/${this.newestNoticeInfo.chargeNoticeName}`
}
window.open(previewPdf(fileInfo))
},
getFileUrl(fileId) {
return `${window._CONFIG['domianURL']}/sys/common/download/${fileId}`