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