From 5dcdbb702f6e18239f552131cf6e721198371baf Mon Sep 17 00:00:00 2001 From: zhaojisen <1301338853@qq.com> Date: Tue, 18 Jun 2024 18:02:20 +0800 Subject: [PATCH] fixed: Fixed export module default options --- .../ListTable/TableAction/ExportDialog.vue | 18 +++++++++++----- .../Table/ListTable/TableAction/RightSide.vue | 21 +++++++++++++++++-- .../AssetCreateUpdate/HostCreateUpdate.vue | 3 --- src/views/assets/Asset/AssetList/AllList.vue | 6 ++++++ 4 files changed, 38 insertions(+), 10 deletions(-) diff --git a/src/components/Table/ListTable/TableAction/ExportDialog.vue b/src/components/Table/ListTable/TableAction/ExportDialog.vue index 9004275c0..a0ea17754 100644 --- a/src/components/Table/ListTable/TableAction/ExportDialog.vue +++ b/src/components/Table/ListTable/TableAction/ExportDialog.vue @@ -145,7 +145,7 @@ export default { { label: this.$t('ExportOnlySelectedItems'), value: 'selected', - can: this.selectedRows.length > 0 && this.canExportSelected + can: this.hasSelected && this.canExportSelected }, { label: this.$t('ExportOnlyFiltered'), @@ -180,6 +180,15 @@ export default { showExportDialog() { if (!this.mfaVerifyRequired) { this.exportDialogShow = true + + if (this.hasSelected) { + this.exportOption = 'selected' + } + + if (this.tableHasQuery) { + this.exportOption = 'filtered' + } + return } this.$axios.get('/api/v1/authentication/confirm/check/?confirm_type=mfa').then(() => { @@ -221,12 +230,11 @@ export default { async handleExportConfirm() { await this.handleExport() this.exportDialogShow = false + this.$emit('importDialogConfirm') }, handleExportCancel() { - const vm = this - setTimeout(() => { - vm.exportDialogShow = false - }, 100) + this.exportDialogShow = false + this.$emit('importDialogClose') }, handleAuthMFAError() { this.mfaDialogShow = false diff --git a/src/components/Table/ListTable/TableAction/RightSide.vue b/src/components/Table/ListTable/TableAction/RightSide.vue index 93aa55bd6..8ef8fd46f 100644 --- a/src/components/Table/ListTable/TableAction/RightSide.vue +++ b/src/components/Table/ListTable/TableAction/RightSide.vue @@ -2,11 +2,13 @@