| | |
| | | * @Author: 小明丶 |
| | | * @Date: 2019-10-25 10:17:56 |
| | | * @LastEditors: zhaoxiaoqiang 287285524@qq.com |
| | | * @LastEditTime: 2023-07-28 16:27:12 |
| | | * @LastEditTime: 2023-09-01 10:34:18 |
| | | * @Description: |
| | | */ |
| | | /** |
| | |
| | | downFile(blob, fileName); |
| | | }, |
| | | configDate2: function(res, parFilename, from) { |
| | | console.log(res); |
| | | // let fileNamet =/\.{1}[A-Za-z]{1,}$/.exec(res.headers['content-disposition']); |
| | | let blob = new Blob([res.data], {type: 'application/vnd.ms-excel'}); |
| | | let fileName = parFilename?parFilename:""; |
| | |
| | | if (window.navigator.msSaveOrOpenBlob) { |
| | | navigator.msSaveBlob(blob, fileName); |
| | | } else { |
| | | // let objectUrl = URL.createObjectURL(blob); |
| | | // window.location.href = objectUrl; |
| | | let link = document.createElement('a'); |
| | | link.href = window.URL.createObjectURL(blob); |
| | | link.download = fileName; |