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 })