This commit is contained in:
@@ -6,11 +6,6 @@
|
||||
>{{ $ay.t("Export") }}</v-expansion-panel-header
|
||||
>
|
||||
<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 color="blue darken-1" text @click="doAction()">{{
|
||||
$ay.t("Export")
|
||||
@@ -24,7 +19,6 @@ export default {
|
||||
dataListSelection: { type: Object, default: null }
|
||||
},
|
||||
data: () => ({
|
||||
exportFormat: "json",
|
||||
jobActive: false
|
||||
}),
|
||||
methods: {
|
||||
@@ -41,7 +35,7 @@ export default {
|
||||
async doAction() {
|
||||
try {
|
||||
const res = await window.$gz.api.upsert(
|
||||
`export/render/${this.exportFormat}`,
|
||||
`export/render`,
|
||||
this.dataListSelection
|
||||
);
|
||||
if (res.error) {
|
||||
@@ -51,6 +45,7 @@ export default {
|
||||
const href = window.$gz.api.genericDownloadUrl(
|
||||
"export/download/" + res.data
|
||||
);
|
||||
|
||||
if (window.open(href, "DownloadExport") == null) {
|
||||
throw new Error(
|
||||
"Unable to download, your browser rejected navigating to download url."
|
||||
|
||||
Reference in New Issue
Block a user