downloadFile(filename, filepath) {
var params = new URLSearchParams()
params.append('reportYearMonth', this.ruleForm.reportYearMonth)
this.$axios.post(GlobalUrl.sjangcb + `/package/downloadFile`, params).then((res) => {
if (res.data.code === 200) {
const blob = new Blob([GlobalUrl.sjangcb + res.data.data.filepath], { type: 'application/zip' })
if ('download' in document.createElement('a')) {
const url = window.URL.createObjectURL(blob)
const link = document.createElement('a')
link.setAttribute("download", res.data.data.filename);
link.href = url
link.download = res.data.data.filename
// console.log("123",res.data.data.filename)
link.click()
// 释放内存
URL.revokeObjectURL(url)
} else {
// ie10下载
navigator.msSaveOrOpenBlob(blob, res.data.data.filename)
}
}
})
},