Browse Source

完善贷前信用审核管理--编辑页面模板下载增加模板文件下载

master
yunuo970428 2 years ago
parent
commit
98b18eedc5
  1. 25
      anrui-riskcenter-ui/src/views/creditauditmanagement/creditauditmanagementAdd.vue

25
anrui-riskcenter-ui/src/views/creditauditmanagement/creditauditmanagementAdd.vue

@ -132,7 +132,7 @@
<el-col :span="24">
<div class="span-sty">公司要求材料</div>
<el-form-item>
<el-button style="margin-left: 130px !important;" type="primary" size="small">模板下载</el-button>
<el-button style="margin-left: 130px !important;" type="primary" size="small" @click="downLoad('/template/信息查询授权书.pdf')">模板下载</el-button>
</el-form-item>
</el-col>
</el-row>
@ -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) {

Loading…
Cancel
Save