From 4e24f0f9cd68560da1532a3ad8e065b5335723cc Mon Sep 17 00:00:00 2001 From: yunuo970428 <405378304@qq.com> Date: Wed, 18 Oct 2023 17:59:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=AC=A0=E6=AC=BE=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E5=A4=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../delinquentcustomerfilingAdd.vue | 30 +++++++++++++++++-- .../delinquentcustomerfilingEdit.vue | 30 +++++++++++++++++-- 2 files changed, 56 insertions(+), 4 deletions(-) diff --git a/anrui-riskcenter-ui/src/views/delinquentcustomerfiling/delinquentcustomerfilingAdd.vue b/anrui-riskcenter-ui/src/views/delinquentcustomerfiling/delinquentcustomerfilingAdd.vue index 0e88c951bb..fa1ea2f926 100644 --- a/anrui-riskcenter-ui/src/views/delinquentcustomerfiling/delinquentcustomerfilingAdd.vue +++ b/anrui-riskcenter-ui/src/views/delinquentcustomerfiling/delinquentcustomerfilingAdd.vue @@ -95,7 +95,7 @@
证件地址
- +
@@ -188,7 +188,10 @@
-
附件清单
+
+
附件清单
+ 信息查询授权书模板下载 +
营业执照
@@ -238,6 +241,7 @@ import req from '@/api/delinquentcustomerfiling/delinquentcustomerfiling' import { selectOrgList, selectMangerByDeptSid, selectCustomerList, typeValues, selectInvoingByOrgPath } from '@/api/Common/dictcommons' import uploadImg from '@/components/uploadFile/uploadImg' +import { getStorage } from '@/utils/auth' export default { name: 'DelinquentCustomerFilingAdd', @@ -523,6 +527,28 @@ export default { this.formobj.address = '' } }, + 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() + }, save() { this.$refs['dataForm'].validate((valid) => { if (valid) { diff --git a/anrui-riskcenter-ui/src/views/workFlow/qiankuanbeianFlow/delinquentcustomerfilingEdit.vue b/anrui-riskcenter-ui/src/views/workFlow/qiankuanbeianFlow/delinquentcustomerfilingEdit.vue index 594bef41a8..adc6c541b5 100644 --- a/anrui-riskcenter-ui/src/views/workFlow/qiankuanbeianFlow/delinquentcustomerfilingEdit.vue +++ b/anrui-riskcenter-ui/src/views/workFlow/qiankuanbeianFlow/delinquentcustomerfilingEdit.vue @@ -94,7 +94,7 @@
证件地址
- +
@@ -187,7 +187,10 @@
-
附件清单
+
+
附件清单
+ 信息查询授权书模板下载 +
营业执照
@@ -237,6 +240,7 @@ import req from '@/api/delinquentcustomerfiling/delinquentcustomerfiling' import { selectOrgList, selectMangerByDeptSid, selectCustomerList, typeValues, selectInvoingByOrgPath } from '@/api/Common/dictcommons' import uploadImg from '@/components/uploadFile/uploadImg' +import { getStorage } from '@/utils/auth' export default { name: 'DelinquentCustomerFilingEdit', @@ -519,6 +523,28 @@ export default { this.formobj.address = '' } }, + 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() + }, save() { this.$refs['dataForm'].validate((valid) => { if (valid) {