Browse Source

fix: 消毒设置配方选择

master
guoapeng 2 weeks ago
parent
commit
c358d1670b
  1. 10
      src/components/formula/FormulaConfig.vue
  2. 25
      src/components/home/config.vue

10
src/components/formula/FormulaConfig.vue

@ -551,16 +551,12 @@ defineExpose({
.formData-input-config {
width: 10vw;
}
::v-deep .el-input__inner {
:deep(.el-input__inner) {
text-align: left;
}
::v-deep .el-form-item {
margin-right: 0;
}
::v-deep .el-input__inner {
height: 40px;
}
::v-deep .el-form-item {
:deep(.el-form-item) {
margin-right: 0;
align-items: center;
}

25
src/components/home/config.vue

@ -70,13 +70,9 @@ const handleConfirm = (value: any) => {
}
console.log('value---', value)
isModalOpen.value = false
let selectedFormula = {}
formulaStore.formulaList.forEach((item: Formula.FormulaItem) => {
if (item.formula_id === value) {
selectedFormula = item
}
})
const selectedFormulaToInt = convertValuesToInt(selectedFormula)
const selectedFormula = formulaStore.formulaList.find((item: Formula.FormulaItem) => item.formula_id === value)
const selectedFormulaToInt = convertValuesToInt(selectedFormula!)
console.log('selectedFormulaToInt---', selectedFormulaToInt)
formulaStore.updateSelectedFormulaDataByList(selectedFormulaToInt as Formula.FormulaItem)
}
@ -108,25 +104,14 @@ const onDefaultFormula = () => {
<template>
<div class="main-content">
<div v-if="isDeviceIdle">
<bt-button
type="primary"
button-text="选择配方"
width="12vw"
height="5vh"
@click="onChooseFormula"
>
<bt-button type="primary" button-text="选择配方" width="12vw" height="5vh" @click="onChooseFormula">
<template #icon>
<el-icon>
<Plus />
</el-icon>
</template>
</bt-button>
<bt-button
button-text="默认配置"
height="5vh"
width="12vw"
@click="onDefaultFormula"
>
<bt-button button-text="默认配置" height="5vh" width="12vw" @click="onDefaultFormula">
<template #icon>
<el-icon>
<Operation />

Loading…
Cancel
Save