diff --git a/src/components/Table/ListTable/TableAction/RightSide.vue b/src/components/Table/ListTable/TableAction/RightSide.vue index 894012924..9bb33d33c 100644 --- a/src/components/Table/ListTable/TableAction/RightSide.vue +++ b/src/components/Table/ListTable/TableAction/RightSide.vue @@ -51,7 +51,9 @@ export default { handleImportClick: { type: Function, default: function({ selectedRows }) { - this.$eventBus.$emit('showImportDialog', { selectedRows, url: this.tableUrl, name: this.name }) + const { importOptions, tableUrl } = this + const url = importOptions?.url ? importOptions.url : tableUrl + this.$eventBus.$emit('showImportDialog', { selectedRows, url, name: this.name }) } }, hasColumnSetting: defaultTrue, diff --git a/src/views/assets/Platform/PlatformList.vue b/src/views/assets/Platform/PlatformList.vue index a4adf243b..5ef714bd2 100644 --- a/src/views/assets/Platform/PlatformList.vue +++ b/src/views/assets/Platform/PlatformList.vue @@ -94,12 +94,8 @@ export default { hasRightActions: true, createRoute: 'PlatformCreate', canCreate: () => this.$hasPerm('assets.add_platform'), - handleImportClick: ({ selectedRows }) => { - this.$eventBus.$emit('showImportDialog', { - selectedRows, - url: '/api/v1/assets/platforms/', - name: this?.name - }) + importOptions: { + url: vm.url }, exportOptions: { url: vm.url @@ -134,6 +130,7 @@ export default { methods: { changeMoreCreates() { this.tableConfig.url = this.url + this.headerActions.importOptions.url = this.url this.headerActions.exportOptions.url = this.url this.headerActions.moreCreates.dropdown = this.$store.state.assets.assetCategoriesDropdown.filter(item => { return item.category === this.tab.activeMenu