|
|
@ -58,7 +58,7 @@ export const useFormulaStore = defineStore('formula', () => { |
|
|
|
// const resetFormulaInfo = ref<Formula.FormulaItem>(createResetFormulaInfo())
|
|
|
|
const pressurOptionList = ref<string[]>(['10%', '20%', '30%', '40%', '50%', '60%', '70%', '80%', '90%', '100%']) |
|
|
|
const currentSelectedFormulaInfo = ref<Formula.FormulaItem>(cloneDeep(defaultFormulaInfo.value)) // 当前列表选中的配方信息
|
|
|
|
const selectedFormulaInfo = ref<Formula.FormulaItem | null>(cloneDeep(defaultFormulaInfo.value)) // 选中执行的配方信息
|
|
|
|
const selectedFormulaInfo = ref<Formula.FormulaItem | null>(defaultFormulaInfo.value) // 选中执行的配方信息
|
|
|
|
const formulaConfigList = ref<Formula.FormulaConfig[]>([]) |
|
|
|
const formulaList = ref<Formula.FormulaItem[]>([]) |
|
|
|
const loglevel = ref<string>('1') |
|
|
@ -113,6 +113,9 @@ export const useFormulaStore = defineStore('formula', () => { |
|
|
|
// const visibleConfig = data.filter(item => item.is_visible_in_formula_page)
|
|
|
|
formulaConfigList.value = data |
|
|
|
defaultFormulaInfo.value = mapConfigToFormula(data) |
|
|
|
if (!selectedFormulaInfo.value?.name) { |
|
|
|
selectedFormulaInfo.value = defaultFormulaInfo.value |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const getFormualDefaultData = async () => { |
|
|
@ -236,7 +239,7 @@ export const useFormulaStore = defineStore('formula', () => { |
|
|
|
* @desc 初始化配方数据,重置为默认配方 |
|
|
|
*/ |
|
|
|
const initFormulaData = () => { |
|
|
|
selectedFormulaInfo.value = cloneDeep(defaultFormulaInfo.value) |
|
|
|
selectedFormulaInfo.value = defaultFormulaInfo.value |
|
|
|
resetToDefaultFormula() |
|
|
|
} |
|
|
|
|
|
|
@ -245,7 +248,7 @@ export const useFormulaStore = defineStore('formula', () => { |
|
|
|
* @desc 重置为默认配方 |
|
|
|
*/ |
|
|
|
const resetToDefaultFormula = () => { |
|
|
|
currentSelectedFormulaInfo.value = cloneDeep(defaultFormulaInfo.value) |
|
|
|
// currentSelectedFormulaInfo.value = cloneDeep(defaultFormulaInfo.value)
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|