| | |
| | | import * as DateFormatter from '@/utils/DateFormatter'; |
| | | import {mapGetters} from 'vuex'; |
| | | import * as dataExport from "@/api/exportExcel" |
| | | import {downLoad} from "@/utils/base"; |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | dataExport[api](params) |
| | | .then((res) => { |
| | | const blob = new Blob([res], {type: 'application/vnd.ms-excel'}); |
| | | if ('download' in document.createElement('a')) { |
| | | /*if ('download' in document.createElement('a')) { |
| | | // 非IE下载 |
| | | const elink = document.createElement('a'); |
| | | elink.download = `${fileName}.xls`; |
| | |
| | | } else { |
| | | // IE10+下载 |
| | | navigator.msSaveBlob(blob, `${fileName}.xls`); |
| | | } |
| | | }*/ |
| | | downLoad(res) |
| | | this.$message.success('导出成功!'); |
| | | loading.close(); |
| | | }) |