mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-18 16:32:28 +00:00
perf: 修复平台列表导出模版错误问题
This commit is contained in:
@@ -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,
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user