mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-24 05:50:06 +00:00
perf: 系统设置-组织管理:最新创建成功后返回列表未按创建时间排序
This commit is contained in:
@@ -12,25 +12,24 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
config: {
|
||||
initial: {
|
||||
},
|
||||
initial: {},
|
||||
url: '/api/v1/orgs/orgs/',
|
||||
fields: [
|
||||
['', ['name', 'comment']]
|
||||
],
|
||||
hasSaveContinue: false,
|
||||
fieldsMeta: {
|
||||
},
|
||||
fieldsMeta: {},
|
||||
onPerformSuccess(res, method) {
|
||||
const order_params = { params: { order: '-date_created' }}
|
||||
switch (method) {
|
||||
case 'post':
|
||||
this.$store.dispatch('users/addAdminOrg', { id: res.id, name: res.name })
|
||||
this.$message.success(this.$tc('common.createSuccessMsg'))
|
||||
return this.$router.push({ name: 'OrganizationList' })
|
||||
return this.$router.push({ name: 'OrganizationList', ...order_params })
|
||||
case 'put':
|
||||
this.$store.dispatch('users/modifyOrg', { id: res.id, name: res.name })
|
||||
this.$message.success(this.$tc('common.updateSuccessMsg'))
|
||||
return this.$router.push({ name: 'OrganizationList' })
|
||||
return this.$router.push({ name: 'OrganizationList', ...order_params })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user