1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

feat: export data tables to json or csv file

This commit is contained in:
2021-01-08 21:55:03 +01:00
parent e351c903a8
commit 0cbea9d100
6 changed files with 86 additions and 18 deletions

View File

@ -80,6 +80,7 @@
<script>
import { uidGen } from 'common/libs/uidGen';
import arrayToFile from '../libs/arrayToFile';
import { LONG_TEXT, BLOB } from 'common/fieldTypes';
import BaseVirtualScroll from '@/components/BaseVirtualScroll';
import WorkspaceQueryTableRow from '@/components/WorkspaceQueryTableRow';
@ -354,6 +355,15 @@ export default {
},
selectResultset (index) {
this.resultsetIndex = index;
},
downloadTable (format, filename) {
if (!this.sortedResults) return;
arrayToFile({
type: format,
content: this.sortedResults,
filename
});
}
}
};