Merge pull request #4049 from jumpserver/pr@v4@fix_asset_perm

perf: Fixed an issue with the asset authorization detail page jumping to the basic page after adding a user
This commit is contained in:
ZhaoJiSen
2024-06-17 11:38:29 +08:00
committed by GitHub
3 changed files with 12 additions and 11 deletions

View File

@@ -73,7 +73,6 @@ export default {
computed: {
detailCardItems() {
return [
{
key: this.$t('DateStart'),
value: this.object.date_start

View File

@@ -152,7 +152,3 @@ export default {
}
}
</script>
<style scoped>
</style>

View File

@@ -4,7 +4,7 @@
:object.sync="AssetPermission"
v-bind="config"
v-on="$listeners"
@tab-click="TabClick"
@tab-click="handleTabClick"
>
<keep-alive>
<component :is="config.activeMenu" :object="AssetPermission" />
@@ -62,17 +62,23 @@ export default {
}
},
methods: {
TabClick(tab) {
handleTabClick(tab) {
const query = _.cloneDeep(this.$route.query)
const newQuery = {
...query,
tab: tab.name
}
if (tab.name !== 'AssetPermissionDetail') {
this.$set(this.config, 'hasRightSide', false)
} else {
this.$set(this.config, 'hasRightSide', true)
}
this.$nextTick(() => {
this.$router.replace({ query: newQuery })
})
}
}
}
</script>
<style scoped>
</style>