|
@ -225,12 +225,18 @@ export default { |
|
|
this.isShowAddNew = true; |
|
|
this.isShowAddNew = true; |
|
|
}, |
|
|
}, |
|
|
onExport() { |
|
|
onExport() { |
|
|
|
|
|
let url = ''; |
|
|
|
|
|
if (this.activeName == '-1') { |
|
|
|
|
|
url = '/business/warning/export' |
|
|
|
|
|
} else { |
|
|
|
|
|
url = '/dc/system/event/export'; |
|
|
|
|
|
} |
|
|
let loadingInstance = Loading.service({ |
|
|
let loadingInstance = Loading.service({ |
|
|
fullscreen: true, |
|
|
fullscreen: true, |
|
|
background: "#00000052", |
|
|
background: "#00000052", |
|
|
text: "文件正在下载...", |
|
|
text: "文件正在下载...", |
|
|
}); |
|
|
}); |
|
|
request.post('/dc/system/event/export', {}, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, responseType: 'blob' }) |
|
|
request.post(url, {}, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, responseType: 'blob' }) |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
console.log(res); |
|
|
console.log(res); |
|
|
const url = window.URL.createObjectURL(new Blob([res])); |
|
|
const url = window.URL.createObjectURL(new Blob([res])); |
|
|