| | |
| | | exportArr[`attrIdIndexMap[${index}]`] = item |
| | | }) |
| | | exportCode({codeClassifyOid:this.codeClassifyOid,'conditionMap[oid]':ids,...exportArr}).then(res=>{ |
| | | console.log(res) |
| | | console.log('res',res) |
| | | const filename = '下载.xlsx'; // 下载的文件名 |
| | | const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' }); |
| | | const a = document.createElement('a'); |
| | | const url = window.URL.createObjectURL(blob); |
| | | a.href = url; |
| | | a.download = filename; |
| | | a.style.display = 'none'; |
| | | document.body.appendChild(a); |
| | | a.click(); |
| | | document.body.removeChild(a); |
| | | window.URL.revokeObjectURL(url); |
| | | |
| | | // const filename = '下载.xlsx'; // 下载的文件名 |
| | | // const blob = new Blob([response.data], { type: 'application/vnd.ms-excel' }); |
| | | // |
| | | // const url = window.URL.createObjectURL(blob); |
| | | // const link = document.createElement('a'); |
| | | // link.href = url; |
| | | // link.setAttribute('download', filename); |
| | | // document.body.appendChild(link); |
| | | // link.click(); |
| | | // document.body.removeChild(link); |
| | | // URL.revokeObjectURL(url); |
| | | }) |
| | | |
| | | } |
| | | }; |
| | | }, |