From d83968cfc4367c24f28d0f158f641ff8538502fa Mon Sep 17 00:00:00 2001 From: yangsy Date: Wed, 24 Dec 2025 14:37:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4updateVideoServerApi?= =?UTF-8?q?=E4=B8=AD=E4=B8=8D=E5=BF=85=E8=A6=81=E7=9A=84id=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/request/biz/video/ndm-video-server.ts | 2 +- .../device/device-card/ndm-server/server-update.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apis/request/biz/video/ndm-video-server.ts b/src/apis/request/biz/video/ndm-video-server.ts index d4aa70c..da57f1b 100644 --- a/src/apis/request/biz/video/ndm-video-server.ts +++ b/src/apis/request/biz/video/ndm-video-server.ts @@ -42,7 +42,7 @@ export const saveVideoServerApi = async (saveVO: NdmVideoServerSaveVO, options?: return data; }; -export const updateVideoServerApi = async (id: string, updateVO: NdmVideoServerUpdateVO, options?: { stationCode?: Station['code']; signal?: AbortSignal }) => { +export const updateVideoServerApi = async (updateVO: NdmVideoServerUpdateVO, options?: { stationCode?: Station['code']; signal?: AbortSignal }) => { const { stationCode, signal } = options ?? {}; const client = stationCode ? ndmClient : userClient; const prefix = stationCode ? `/${stationCode}` : ''; diff --git a/src/components/device/device-card/ndm-server/server-update.vue b/src/components/device/device-card/ndm-server/server-update.vue index 3f7765b..5864c0a 100644 --- a/src/components/device/device-card/ndm-server/server-update.vue +++ b/src/components/device/device-card/ndm-server/server-update.vue @@ -93,10 +93,10 @@ const { mutate: updateDevice, isPending } = useMutation({ const stationCode = station.value.code; const signal = abortController.value.signal; if (deviceType === DEVICE_TYPE_LITERALS.ndmMediaServer) { - await updateMediaServerApi(localDevice.value as NdmMediaServerUpdateVO, { stationCode, signal }); + await updateMediaServerApi(localDevice.value, { stationCode, signal }); return await detailMediaServerApi(`${localDevice.value.id}`, { stationCode, signal }); } else if (deviceType === DEVICE_TYPE_LITERALS.ndmVideoServer) { - await updateVideoServerApi(`${localDevice.value.id}`, localDevice.value as NdmVideoServerUpdateVO, { stationCode, signal }); + await updateVideoServerApi(localDevice.value, { stationCode, signal }); return await detailVideoServerApi(`${localDevice.value.id}`, { stationCode, signal }); } else { throw new Error('不是服务器设备');