mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-25 14:34:46 +00:00
perf: 修复app 授权详情中更新
This commit is contained in:
@@ -175,8 +175,12 @@ export default {
|
||||
},
|
||||
defaultUpdate() {
|
||||
const id = this.$route.params.id
|
||||
const routeName = this.validActions.updateRoute
|
||||
this.$router.push({ name: routeName, params: { id: id }})
|
||||
let route = this.validActions.updateRoute
|
||||
if (typeof route === 'string') {
|
||||
route = { name: route, params: {}}
|
||||
}
|
||||
route.params.id = id
|
||||
this.$router.push(route)
|
||||
},
|
||||
getObject() {
|
||||
const url = this.validActions.detailApiUrl
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<GenericDetailPage :object.sync="RemoteAppPermission" :active-menu.sync="config.activeMenu" v-bind="config" v-on="$listeners" @tab-click="TabClick">
|
||||
<GenericDetailPage :object.sync="app" :active-menu.sync="config.activeMenu" v-bind="config" v-on="$listeners" @tab-click="TabClick">
|
||||
<keep-alive>
|
||||
<component :is="config.activeMenu" :object="RemoteAppPermission" />
|
||||
<component :is="config.activeMenu" :object="app" />
|
||||
</keep-alive>
|
||||
</GenericDetailPage>
|
||||
</template>
|
||||
@@ -22,7 +22,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
RemoteAppPermission: {},
|
||||
app: { type: '', category: '', id: '' },
|
||||
config: {
|
||||
activeMenu: 'ApplicationPermissionDetail',
|
||||
submenu: [
|
||||
@@ -41,7 +41,20 @@ export default {
|
||||
],
|
||||
actions: {
|
||||
detailApiUrl: `/api/v1/perms/application-permissions/${this.$route.params.id}/`,
|
||||
deleteApiUrl: `/api/v1/perms/application-permissions/${this.$route.params.id}/`
|
||||
deleteApiUrl: `/api/v1/perms/application-permissions/${this.$route.params.id}/`,
|
||||
updateCallback: () => {
|
||||
const route = {
|
||||
name: 'ApplicationPermissionUpdate',
|
||||
query: {
|
||||
type: this.app.type,
|
||||
category: this.app.category
|
||||
},
|
||||
params: {
|
||||
id: this.app.id
|
||||
}
|
||||
}
|
||||
this.$router.push(route)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user