From 98b18eedc580a3d8d24d9644c11aa1061a3353d8 Mon Sep 17 00:00:00 2001 From: yunuo970428 <405378304@qq.com> Date: Mon, 6 Nov 2023 09:26:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E8=B4=B7=E5=89=8D=E4=BF=A1?= =?UTF-8?q?=E7=94=A8=E5=AE=A1=E6=A0=B8=E7=AE=A1=E7=90=86--=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E9=A1=B5=E9=9D=A2=E6=A8=A1=E6=9D=BF=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A8=A1=E6=9D=BF=E6=96=87=E4=BB=B6=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../creditauditmanagementAdd.vue | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/anrui-riskcenter-ui/src/views/creditauditmanagement/creditauditmanagementAdd.vue b/anrui-riskcenter-ui/src/views/creditauditmanagement/creditauditmanagementAdd.vue index 1449d1f9da..7f2b5aeaa5 100644 --- a/anrui-riskcenter-ui/src/views/creditauditmanagement/creditauditmanagementAdd.vue +++ b/anrui-riskcenter-ui/src/views/creditauditmanagement/creditauditmanagementAdd.vue @@ -132,7 +132,7 @@
公司要求材料
- 模板下载 + 模板下载
@@ -187,6 +187,7 @@ import req from '@/api/creditauditmanagement/creditauditmanagement' import uploadImg from '@/components/uploadFile/uploadImg' import { getOrgSidByPath, fetchBySid, selModelByUseOrgSid, selectCustomerList, typeValues, selectListByOrgPath } from '@/api/Common/dictcommons' +import {getStorage} from "@/utils/auth"; export default { name: 'CreditAuditManagementAdd', @@ -421,6 +422,28 @@ export default { this.dialogVisible = true this.list = row }, + downLoad(filePath) { + var xhr = new XMLHttpRequest() + xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + filePath + '&outFileName=' + '信息查询授权书', true) + xhr.setRequestHeader('token', getStorage()) + xhr.responseType = 'blob' + xhr.onload = function(e) { + // 如果请求执行成功 + var blob = this.response + var filename = '信息查询授权书.pdf' + var a = document.createElement('a') + // blob.type="application/octet-stream"; + // 创键临时url对象 + var url = URL.createObjectURL(blob) + a.href = url + a.download = filename + a.click() + // 释放之前创建的URL对象 + window.URL.revokeObjectURL(url) + } + // 发送请求 + xhr.send() + }, // 确定 handleConfirm() { if (this.accessory.policyImages.length > 0) {