exportShow() {
this.$http({
url: "/knewdata-ecp/qyapp/giftCard/exportDriver",
method: "get",
params: {
cardName: this.cardName,
cardSn: this.cardSn,
orderId: this.orderId,
shopsId: this.shopsId,
activityId: this.activityId,
conversionStatus: this.conversionStatus,
startTime: this.startTime,
endTime: this.endTime,
},
responseType: "blob",
}).then(({ data }) => {
const content = data;
const blob = new Blob([content], {
type: "application/vnd.ms-excel;chartset:utf-8",
});
const fileName = "实体卡使用明细.xls";
if ("download" in document.createElement("a")) {
const link = document.createElement("a");
link.download = fileName;
link.style.display = "none";
link.href = URL.createObjectURL(blob);
document.body.appendChild(link);
link.click();
URL.revokeObjectURL(link.href);
document.body.removeChild(link);
} else {
navigator.msSaveBlob(blob, fileName);
}
});
},