mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
fix: 创建资产时如果选择了节点显示默认节点
This commit is contained in:
@@ -72,7 +72,7 @@ export default {
|
||||
async setInitial() {
|
||||
const { defaultConfig } = this
|
||||
const { node, platform } = this.$route?.query || {}
|
||||
const nodesInitial = node || []
|
||||
const nodesInitial = node ? [node] : []
|
||||
const platformId = platform || 1
|
||||
const url = `/api/v1/assets/platforms/${platformId}/`
|
||||
this.platform = await this.$axios.get(url)
|
||||
|
||||
@@ -150,7 +150,12 @@ export default {
|
||||
const route = _.capitalize(platform.category.value) + 'Create' || 'HostCreate'
|
||||
this.addToRecentPlatforms(platform)
|
||||
this.iVisible = false
|
||||
this.$router.push({ name: route, query: { platform: platform.id }})
|
||||
const query = {
|
||||
node: this.$route.query?.node || '',
|
||||
platform: platform.id
|
||||
}
|
||||
|
||||
this.$router.push({ name: route, query })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user