mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
fix: 资产账号创建、更新报错问题
This commit is contained in:
@@ -35,7 +35,7 @@ export default {
|
||||
},
|
||||
asset: {
|
||||
type: Object,
|
||||
default: null
|
||||
default: () => ({})
|
||||
},
|
||||
account: {
|
||||
type: Object,
|
||||
@@ -77,10 +77,11 @@ export default {
|
||||
})
|
||||
},
|
||||
editAccount(form) {
|
||||
const data = { asset: this.asset.id, ...form }
|
||||
this.$axios.patch(`/api/v1/assets/accounts/${this.asset.id}`, data).then(() => {
|
||||
const data = { ...form }
|
||||
this.$axios.patch(`/api/v1/assets/accounts/${this.account.id}/`, data).then(() => {
|
||||
this.iVisible = false
|
||||
this.$emit('add', true)
|
||||
this.$message.success(this.$t('common.updateSuccessMsg'))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user