This commit is contained in:
2022-03-24 16:43:35 +00:00
parent 6f47101fe2
commit 459f812703

View File

@@ -6,11 +6,6 @@
>{{ $ay.t("Export") }}</v-expansion-panel-header >{{ $ay.t("Export") }}</v-expansion-panel-header
> >
<v-expansion-panel-content> <v-expansion-panel-content>
<v-radio-group v-model="exportFormat">
<v-radio label="JSON" value="json"></v-radio>
<v-radio label="CSV" value="csv"></v-radio>
</v-radio-group>
<v-btn icon @click="goHelp()"><v-icon>$ayiQuestionCircle</v-icon></v-btn> <v-btn icon @click="goHelp()"><v-icon>$ayiQuestionCircle</v-icon></v-btn>
<v-btn color="blue darken-1" text @click="doAction()">{{ <v-btn color="blue darken-1" text @click="doAction()">{{
$ay.t("Export") $ay.t("Export")
@@ -24,7 +19,6 @@ export default {
dataListSelection: { type: Object, default: null } dataListSelection: { type: Object, default: null }
}, },
data: () => ({ data: () => ({
exportFormat: "json",
jobActive: false jobActive: false
}), }),
methods: { methods: {
@@ -41,7 +35,7 @@ export default {
async doAction() { async doAction() {
try { try {
const res = await window.$gz.api.upsert( const res = await window.$gz.api.upsert(
`export/render/${this.exportFormat}`, `export/render`,
this.dataListSelection this.dataListSelection
); );
if (res.error) { if (res.error) {
@@ -51,6 +45,7 @@ export default {
const href = window.$gz.api.genericDownloadUrl( const href = window.$gz.api.genericDownloadUrl(
"export/download/" + res.data "export/download/" + res.data
); );
if (window.open(href, "DownloadExport") == null) { if (window.open(href, "DownloadExport") == null) {
throw new Error( throw new Error(
"Unable to download, your browser rejected navigating to download url." "Unable to download, your browser rejected navigating to download url."