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) {