|
|
@ -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 /> |
|
|
|