mirror of
https://github.com/jumpserver/lina.git
synced 2025-04-27 11:10:51 +00:00
Fixed: Plateform jump
This commit is contained in:
parent
a3f17ea4d3
commit
2cd6682cdf
@ -53,6 +53,7 @@ export default {
|
||||
const vm = this
|
||||
const platform = this.$route.query.platform
|
||||
return {
|
||||
platform: '',
|
||||
loading: true,
|
||||
form: this.protocol,
|
||||
platformDetail: platform ? '#/console/assets/platforms/' + platform : '',
|
||||
@ -97,11 +98,29 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
try {
|
||||
const drawActionMeta = await this.$store.dispatch('common/getDrawerActionMeta')
|
||||
const platform = drawActionMeta.row.platform.id
|
||||
const name = drawActionMeta.row.platform.name
|
||||
|
||||
if (platform) {
|
||||
this.platformDetail = `/ui/#/settings/platforms?id=${platform}&name=${name}`
|
||||
} else {
|
||||
this.platformDetail = ''
|
||||
}
|
||||
} catch (e) {
|
||||
throw new Error(e)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSubmit(form) {
|
||||
this.protocol = Object.assign(this.protocol, form)
|
||||
this.$emit('update:visible', false)
|
||||
this.$emit('confirm', this.protocol)
|
||||
},
|
||||
openInNewTab() {
|
||||
window.open(this.platformDetail, '_blank')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -161,6 +161,15 @@ export default {
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
|
||||
const name = this.$route.query?.name
|
||||
const platform = this.$route.query?.id
|
||||
|
||||
if (platform) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.genericListTable.onDetail({ row: { id: platform, name }})
|
||||
})
|
||||
}
|
||||
},
|
||||
updated() {
|
||||
this.changeMoreCreates()
|
||||
|
Loading…
Reference in New Issue
Block a user