fix:Disabled assets have no audit records

This commit is contained in:
w940853815
2025-12-18 11:47:11 +08:00
committed by wrd
parent 3d668502e1
commit 65706509b1

View File

@@ -61,8 +61,11 @@ export default {
},
callbacks: {
change: function(val) {
const category = this.object.category.value
const normalizedCategory =
category === 'ds' ? 'directorie' : category
this.$axios.patch(
`/api/v1/assets/assets/${this.object.id}/`,
`/api/v1/assets/${normalizedCategory}s/${this.object.id}/`,
{ is_active: val }
).then(res => {
this.$message.success(this.$tc('UpdateSuccessMsg'))