Merge branch 'v3' of github.com:jumpserver/lina into v3

This commit is contained in:
ibuler 2022-10-20 15:43:23 +08:00
commit 0da88c6a61
2 changed files with 7 additions and 2 deletions

View File

@ -83,7 +83,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)

View File

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