diff --git a/project/xiushan/components/enterpriseDialog.vue b/project/xiushan/components/enterpriseDialog.vue
index ef6c67f3..8892c58d 100644
--- a/project/xiushan/components/enterpriseDialog.vue
+++ b/project/xiushan/components/enterpriseDialog.vue
@@ -5,7 +5,7 @@
- 下载报告
+ 下载报告
{
+ this.instance.post("/appcreditreport/downloadCreditReport", null, {
+ params: {id, type: 1}
+ }).then(res => {
+ if (res?.data) {
+ const link = document.createElement('a')
+ link.style.display = 'none'
+ link.href = res.data
+ link.setAttribute('download', this.info.name + '信用报告.pdf')
+ document.body.appendChild(link)
+ link.click()
+ document.body.removeChild(link)
+ }
+ })
+ }).catch(() => 0)
+
}
},
props: {
diff --git a/project/xiushan/components/personCreditReport.vue b/project/xiushan/components/personCreditReport.vue
index b65f8f34..06ee4d2d 100644
--- a/project/xiushan/components/personCreditReport.vue
+++ b/project/xiushan/components/personCreditReport.vue
@@ -14,7 +14,7 @@
-
下载报告
+
下载报告
@@ -115,6 +115,24 @@ export default {
this.info = res.data
}
})
+ },
+ handleDownload(id) {
+ this.$confirm("是否要下载报告?").then(() => {
+ this.instance.post("/appcreditreport/downloadCreditReport", null, {
+ params: {id, type: 0}
+ }).then(res => {
+ if (res?.data) {
+ const link = document.createElement('a')
+ link.style.display = 'none'
+ link.href = res.data
+ link.setAttribute('download', this.info.name + '信用报告.pdf')
+ document.body.appendChild(link)
+ link.click()
+ document.body.removeChild(link)
+ }
+ })
+ }).catch(() => 0)
+
}
},
props: {