|
|
@ -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 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,7 +175,8 @@ const onSetPressure = () => { |
|
|
|
const { typeDisplayNames, types, intensitys } = pressureVal || {} |
|
|
|
|
|
|
|
// 构建压力类型选项(左列) |
|
|
|
const leftOptions: System.Option[] = typeDisplayNames?.map((name: string, index: number) => ({ |
|
|
|
const leftOptions: System.Option[] |
|
|
|
= typeDisplayNames?.map((name: string, index: number) => ({ |
|
|
|
label: name, |
|
|
|
value: types[index], |
|
|
|
})) || [] |
|
|
@ -285,13 +291,13 @@ const settingWidth = computed(() => { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<ft-dialog v-model="disinfectFormulaVisible" :title="disinfectFormulaTitle" width="80vw"> |
|
|
|
<div style="height: 80vh;overflow: auto"> |
|
|
|
<div style="height: 80vh; overflow: auto"> |
|
|
|
<Config ref="configRef" /> |
|
|
|
</div> |
|
|
|
<template #footer> |
|
|
|
<div class="config-btn"> |
|
|
|
<BtButton |
|
|
|
button-text="取消" |
|
|
|
button-text="关闭" |
|
|
|
border-radius="5px" |
|
|
|
width="7rem" |
|
|
|
text-size="1.5rem" |
|
|
@ -299,16 +305,16 @@ const settingWidth = computed(() => { |
|
|
|
height="3rem" |
|
|
|
@click="onClose" |
|
|
|
/> |
|
|
|
<BtButton |
|
|
|
bg-color="#1989fa" |
|
|
|
button-text="确认" |
|
|
|
border-radius="5px" |
|
|
|
width="7rem" |
|
|
|
text-size="1.5rem" |
|
|
|
text-color="#ffffff" |
|
|
|
height="3rem" |
|
|
|
@click="onSave" |
|
|
|
/> |
|
|
|
<!-- <BtButton --> |
|
|
|
<!-- bg-color="#1989fa" --> |
|
|
|
<!-- button-text="确认" --> |
|
|
|
<!-- border-radius="5px" --> |
|
|
|
<!-- width="7rem" --> |
|
|
|
<!-- text-size="1.5rem" --> |
|
|
|
<!-- text-color="#ffffff" --> |
|
|
|
<!-- height="3rem" --> |
|
|
|
<!-- @click="onSave" --> |
|
|
|
<!-- /> --> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</ft-dialog> |
|
|
@ -325,23 +331,23 @@ const settingWidth = computed(() => { |
|
|
|
</template> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
.home-start-opt{ |
|
|
|
.home-start-opt { |
|
|
|
margin: 0.5rem; |
|
|
|
gap: 5px; |
|
|
|
width: 100%; |
|
|
|
.home-opt-flex{ |
|
|
|
.home-opt-flex { |
|
|
|
display: grid; |
|
|
|
grid-template-columns: 1fr 1fr 1fr; |
|
|
|
.home-opt-ml{ |
|
|
|
.home-opt-ml { |
|
|
|
margin-left: 5px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.config { |
|
|
|
.config { |
|
|
|
border: 1px solid red; |
|
|
|
} |
|
|
|
.config-btn{ |
|
|
|
} |
|
|
|
.config-btn { |
|
|
|
//margin-top: -3rem |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |