perf: 系统设置-组织管理:最新创建成功后返回列表未按创建时间排序

This commit is contained in:
wangruidong
2024-06-17 10:03:05 +08:00
committed by w940853815
parent 91c44d0500
commit 1ff49ca16d

View File

@@ -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 })
}
}
}