From 65706509b1d2bfddfa1037d9aabbc70e9bc3fc23 Mon Sep 17 00:00:00 2001 From: w940853815 <940853815@qq.com> Date: Thu, 18 Dec 2025 11:47:11 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9ADisabled=20assets=20have=20no=20aud?= =?UTF-8?q?it=20records?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/assets/Asset/AssetDetail/Detail.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/assets/Asset/AssetDetail/Detail.vue b/src/views/assets/Asset/AssetDetail/Detail.vue index a009b30b4..c4a68748c 100644 --- a/src/views/assets/Asset/AssetDetail/Detail.vue +++ b/src/views/assets/Asset/AssetDetail/Detail.vue @@ -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'))