|
@@ -166,7 +166,19 @@
|
|
|
});
|
|
|
|
|
|
async function handleExport() {
|
|
|
- await bulletChatExportApi(searchInfo);
|
|
|
+ const data = await bulletChatExportApi(searchInfo);
|
|
|
+ const downloadBlob = new Blob([data], {
|
|
|
+ type: 'application/msexcel',
|
|
|
+ });
|
|
|
+ const url = URL.createObjectURL(downloadBlob);
|
|
|
+ const a: HTMLAnchorElement = document.createElement('a');
|
|
|
+ document.body.appendChild(a);
|
|
|
+ a.style.display = 'none';
|
|
|
+ a.href = url;
|
|
|
+ const name = new Date().getTime();
|
|
|
+ a.download = `${name}.csv`;
|
|
|
+ a.click();
|
|
|
+ window.URL.revokeObjectURL(url);
|
|
|
}
|
|
|
|
|
|
setTimeout(() => {
|