exportFileHandle (name) { this.$http({ url: this.$http.adornUrl('/preschool/export/zip'), method: 'get', responseType: 'blob', params: this.$http.adornParams({ 'fileName': name }) }).then(({data}) => { let nowDate = new Date() //const blob = new Blob([data],{type: 'application/vnd.ms-excel'}) //let filename = name + '.xls' const blob = new Blob([data],{type: 'application/zip'}) let filename = '期末总结' + dateFilter(nowDate,1) + '.zip' const elink = document.createElement('a') elink.download = filename elink.style.display = 'none' elink.href = URL.createObjectURL(blob) document.body.appendChild(elink) elink.click() URL.revokeObjectURL(elink.href) // 释放URL 对象 document.body.removeChild(elink) }) }