diff --git a/src/components/home/HomeSetting.vue b/src/components/home/HomeSetting.vue index 1f097e1..8a4d164 100644 --- a/src/components/home/HomeSetting.vue +++ b/src/components/home/HomeSetting.vue @@ -157,46 +157,6 @@ const setRealtimeConfig = async (key: string, val: string) => { } /** - * @function 打开压力控制模态框 - * @desc 初始化压力类型和强度选项 - */ -const onSetPressure = () => { - const pressureVal = pressureConfig.value - const { typeDisplayNames, types, intensitys } = pressureVal || {} - - // 构建压力类型选项(左列) - const leftOptions: System.Option[] - = typeDisplayNames?.map((name: string, index: number) => ({ - label: name, - value: types[index], - })) || [] - - // 构建压力强度选项(右列) - const rightOptions: System.Option[] = [] - if (types?.includes('positivePressure')) { - intensitys?.positivePressure?.forEach((intensity: string) => { - rightOptions.push({ label: `${intensity}%`, value: intensity }) - }) - } - - optionsLeft.value = leftOptions - optionsRight.value = rightOptions - - // 获取已经设置的压力值 - syncSendCmd({ - className: 'PipelinePressureControl', - fnName: 'getState', - }).then((res) => { - if (res.ackcode === 0) { - defaultIntensityValue.value = res.rely.intensity - homeStore.updateDefaultIntensityValue(res.rely.intensity) - homeStore.updateDefaultIntensityTypeValue(res.rely.type) - isModalOpen.value = true - } - }) -} - -/** * @function 确认压力选择 * @param {string|number[]} value - 选中的压力配置值([类型, 强度]) * @desc 关闭模态框并更新压力配置 @@ -228,26 +188,11 @@ const settingWidth = computed(() => { } return '7.5rem' }) - -const deviceType = computed(() => { - return __DEVICE_TYPE__ -})