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: { handleImportClick: {
type: Function, type: Function,
default: function({ selectedRows }) { 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, hasColumnSetting: defaultTrue,

View File

@@ -94,12 +94,8 @@ export default {
hasRightActions: true, hasRightActions: true,
createRoute: 'PlatformCreate', createRoute: 'PlatformCreate',
canCreate: () => this.$hasPerm('assets.add_platform'), canCreate: () => this.$hasPerm('assets.add_platform'),
handleImportClick: ({ selectedRows }) => { importOptions: {
this.$eventBus.$emit('showImportDialog', { url: vm.url
selectedRows,
url: '/api/v1/assets/platforms/',
name: this?.name
})
}, },
exportOptions: { exportOptions: {
url: vm.url url: vm.url
@@ -134,6 +130,7 @@ export default {
methods: { methods: {
changeMoreCreates() { changeMoreCreates() {
this.tableConfig.url = this.url this.tableConfig.url = this.url
this.headerActions.importOptions.url = this.url
this.headerActions.exportOptions.url = this.url this.headerActions.exportOptions.url = this.url
this.headerActions.moreCreates.dropdown = this.$store.state.assets.assetCategoriesDropdown.filter(item => { this.headerActions.moreCreates.dropdown = this.$store.state.assets.assetCategoriesDropdown.filter(item => {
return item.category === this.tab.activeMenu return item.category === this.tab.activeMenu