From c602552f9363448530451ed815e0232e55a79398 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=87=A4=E5=90=89?= Date: Mon, 7 Jul 2025 11:25:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BD=BF=E7=94=A8=5F=5FDEVICE=5FTYPE=5F=5F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/home/PressureControl.vue | 30 ++++++++++++++++-------------- src/views/seal/index.vue | 2 +- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/components/home/PressureControl.vue b/src/components/home/PressureControl.vue index 0860ced..dd84c45 100644 --- a/src/components/home/PressureControl.vue +++ b/src/components/home/PressureControl.vue @@ -14,20 +14,22 @@ const deviceStore = useDeviceStore() // 拉取配置并构建 cascaderOptions const getPressureConfig = async () => { - const res = await syncSendCmd({ className: 'PipelinePressureControl', fnName: 'getConfig' }) - if (res.ackcode === 0) { - homeStore.updatePressureConfig(res.rely) - const { typeDisplayNames, types, intensitys } = res.rely - cascaderOptions.value = typeDisplayNames.map((name: string, idx: number) => { - const children = (intensitys[types[idx]] || []).map((val: string) => ({ label: `${val}%`, value: val })) - return { label: name, value: types[idx], children } - }) + if (__DEVICE_TYPE__ !== useDeviceStore().deviceTypeMap.LargeSpaceDM_B) { + const res = await syncSendCmd({ className: 'PipelinePressureControl', fnName: 'getConfig' }) + if (res.ackcode === 0) { + homeStore.updatePressureConfig(res.rely) + const { typeDisplayNames, types, intensitys } = res.rely + cascaderOptions.value = typeDisplayNames.map((name: string, idx: number) => { + const children = (intensitys[types[idx]] || []).map((val: string) => ({ label: `${val}%`, value: val })) + return { label: name, value: types[idx], children } + }) - // 初始化当前状态 - const stateRes = await syncSendCmd({ className: 'PipelinePressureControl', fnName: 'getState' }) - if (stateRes.ackcode === 0) { - const { type, intensity } = stateRes.rely - selected.value = intensity ? [type, intensity] : [type] + // 初始化当前状态 + const stateRes = await syncSendCmd({ className: 'PipelinePressureControl', fnName: 'getState' }) + if (stateRes.ackcode === 0) { + const { type, intensity } = stateRes.rely + selected.value = intensity ? [type, intensity] : [type] + } } } } @@ -51,7 +53,7 @@ const confirm = (val: string[]) => { { - const res = await sendCmd({ className: 'AirLeakDetectTest', fnName: 'getServiceConfig' }) + const res = await sendCmd({ className: 'AirLeakDetectTest', fnName: 'getServiceConfig', params: { inflationTimeMs: 0.3 } }) inflationTime.value = res.inflationTimeMs })