Merge pull request #2987 from jumpserver/pr@dev@account_update

perf: 账号创建更新优化
This commit is contained in:
feng626 2023-04-04 16:05:10 +08:00 committed by GitHub
commit b33f598742
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,12 +100,14 @@ export default {
})
this.iVisible = iVisible
if (!iVisible) {
this.$store.commit('common/reload')
this.$emit('add', true)
}
},
editAccount(form) {
const data = { ...form }
this.$axios.patch(`/api/v1/accounts/accounts/${this.account.id}/`, data).then(() => {
this.iVisible = false
this.$emit('add', true)
this.$message.success(this.$tc('common.updateSuccessMsg'))
}).catch(error => this.setFieldError(error))
},