mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-23 12:07:38 +00:00
Fixed: Plateform jump
This commit is contained in:
@@ -53,6 +53,7 @@ export default {
|
|||||||
const vm = this
|
const vm = this
|
||||||
const platform = this.$route.query.platform
|
const platform = this.$route.query.platform
|
||||||
return {
|
return {
|
||||||
|
platform: '',
|
||||||
loading: true,
|
loading: true,
|
||||||
form: this.protocol,
|
form: this.protocol,
|
||||||
platformDetail: platform ? '#/console/assets/platforms/' + platform : '',
|
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: {
|
methods: {
|
||||||
onSubmit(form) {
|
onSubmit(form) {
|
||||||
this.protocol = Object.assign(this.protocol, form)
|
this.protocol = Object.assign(this.protocol, form)
|
||||||
this.$emit('update:visible', false)
|
this.$emit('update:visible', false)
|
||||||
this.$emit('confirm', this.protocol)
|
this.$emit('confirm', this.protocol)
|
||||||
|
},
|
||||||
|
openInNewTab() {
|
||||||
|
window.open(this.platformDetail, '_blank')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -161,6 +161,15 @@ export default {
|
|||||||
} finally {
|
} finally {
|
||||||
this.loading = false
|
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() {
|
updated() {
|
||||||
this.changeMoreCreates()
|
this.changeMoreCreates()
|
||||||
|
Reference in New Issue
Block a user