| | |
| | | responseType: 'blob', |
| | | headers: { 'Authorization': 'Bearer ' + getToken() } |
| | | }).then((res) => { |
| | | const isBlob = blobValidate(res.data); |
| | | const isBlob = blobValidate(res.index); |
| | | if (isBlob) { |
| | | const blob = new Blob([res.data]) |
| | | const blob = new Blob([res.index]) |
| | | this.saveAs(blob, decodeURIComponent(res.headers['download-filename'])) |
| | | } else { |
| | | this.printErrMsg(res.data); |
| | | this.printErrMsg(res.index); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | responseType: 'blob', |
| | | headers: { 'Authorization': 'Bearer ' + getToken() } |
| | | }).then((res) => { |
| | | const isBlob = blobValidate(res.data); |
| | | const isBlob = blobValidate(res.index); |
| | | if (isBlob) { |
| | | const blob = new Blob([res.data]) |
| | | const blob = new Blob([res.index]) |
| | | this.saveAs(blob, decodeURIComponent(res.headers['download-filename'])) |
| | | } else { |
| | | this.printErrMsg(res.data); |
| | | this.printErrMsg(res.index); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | responseType: 'blob', |
| | | headers: { 'Authorization': 'Bearer ' + getToken() } |
| | | }).then((res) => { |
| | | const isBlob = blobValidate(res.data); |
| | | const isBlob = blobValidate(res.index); |
| | | if (isBlob) { |
| | | const blob = new Blob([res.data], { type: 'application/zip' }) |
| | | const blob = new Blob([res.index], { type: 'application/zip' }) |
| | | this.saveAs(blob, name) |
| | | } else { |
| | | this.printErrMsg(res.data); |
| | | this.printErrMsg(res.index); |
| | | } |
| | | downloadLoadingInstance.close(); |
| | | }).catch((r) => { |