From 88f48cc0d16c06d2f246dfd4eb95d1f344351718 Mon Sep 17 00:00:00 2001 From: guoapeng Date: Fri, 4 Jul 2025 17:19:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B6=88=E6=AF=92=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/home/HomeSetting.vue | 66 ++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/src/components/home/HomeSetting.vue b/src/components/home/HomeSetting.vue index 31a50ca..779e6cb 100644 --- a/src/components/home/HomeSetting.vue +++ b/src/components/home/HomeSetting.vue @@ -118,7 +118,8 @@ const onSave = async () => { } formulaStore.updateSelectedFormulaDataByList(cloneDeep(formData)) // 更新选中配方 - if (!homeStore.isDeviceIdle) { // 消毒中时更新实时配置 + if (!homeStore.isDeviceIdle) { + // 消毒中时更新实时配置 const res = await sendCmd({ className: 'DisinfectionCtrlServiceExt', fnName: 'getRealtimeConfig', @@ -127,19 +128,23 @@ const onSave = async () => { const diff = compareJSON(res, formData) const diffKeys = Object.keys(diff) if (diffKeys.length) { - await Promise.all(diffKeys.map(async (key) => { - await setRealtimeConfig(key, diff[key].newVal) - })) + await Promise.all( + diffKeys.map(async (key) => { + await setRealtimeConfig(key, diff[key].newVal) + }), + ) FtMessage.success('配方修改成功') } } - else { // 非消毒时保存配方 + else { + // 非消毒时保存配方 if (formData.formula_id) { formulaStore.updateSelectedFormulaDataByList(formData) } } onClose() // 关闭对话框 } +console.log(onSave) /** * @function 设置实时消毒参数 @@ -170,10 +175,11 @@ const onSetPressure = () => { const { typeDisplayNames, types, intensitys } = pressureVal || {} // 构建压力类型选项(左列) - const leftOptions: System.Option[] = typeDisplayNames?.map((name: string, index: number) => ({ - label: name, - value: types[index], - })) || [] + const leftOptions: System.Option[] + = typeDisplayNames?.map((name: string, index: number) => ({ + label: name, + value: types[index], + })) || [] // 构建压力强度选项(右列) const rightOptions: System.Option[] = [] @@ -285,13 +291,13 @@ const settingWidth = computed(() => { -
+
@@ -325,23 +331,23 @@ const settingWidth = computed(() => {