|
|
@ -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 /> |
|
|
@ -149,23 +134,23 @@ const onDefaultFormula = () => { |
|
|
|
</template> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
.main-content{ |
|
|
|
overflow: hidden; |
|
|
|
//height: auto; |
|
|
|
//background: $gradient-color; |
|
|
|
padding: 15px; |
|
|
|
.formula-config{ |
|
|
|
display: grid; |
|
|
|
padding: 10px; |
|
|
|
width: 100%; |
|
|
|
} |
|
|
|
.formula-config-form{ |
|
|
|
display: grid; |
|
|
|
grid-template-columns: 1fr 1fr; |
|
|
|
gap: 5px; |
|
|
|
} |
|
|
|
.formdata-input{ |
|
|
|
width: 10vw; |
|
|
|
} |
|
|
|
.main-content { |
|
|
|
overflow: hidden; |
|
|
|
//height: auto; |
|
|
|
//background: $gradient-color; |
|
|
|
padding: 15px; |
|
|
|
.formula-config { |
|
|
|
display: grid; |
|
|
|
padding: 10px; |
|
|
|
width: 100%; |
|
|
|
} |
|
|
|
.formula-config-form { |
|
|
|
display: grid; |
|
|
|
grid-template-columns: 1fr 1fr; |
|
|
|
gap: 5px; |
|
|
|
} |
|
|
|
.formdata-input { |
|
|
|
width: 10vw; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |