From 88f0e0401be2f7f8ba0a4e8762e71252782387e3 Mon Sep 17 00:00:00 2001 From: fengachen <373943794@qq.com> Date: Thu, 17 Nov 2022 14:21:19 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=94=B6=E8=B4=B9=E9=80=9A=E7=9F=A5=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feehandle/FeeHandle.vue | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/views/standardsAssociation/feehandle/FeeHandle.vue b/src/views/standardsAssociation/feehandle/FeeHandle.vue index e79c4fc..1383a23 100644 --- a/src/views/standardsAssociation/feehandle/FeeHandle.vue +++ b/src/views/standardsAssociation/feehandle/FeeHandle.vue @@ -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}`