perf: 修复平台列表导出模版错误问题

This commit is contained in:
“huailei000”
2023-09-21 16:16:37 +08:00
committed by huailei
parent 2d07b10961
commit d42bd25371
2 changed files with 6 additions and 7 deletions

View File

@@ -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,

View File

@@ -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