|
@ -209,7 +209,7 @@ |
|
|
import { ref, onMounted } from 'vue' |
|
|
import { ref, onMounted } from 'vue' |
|
|
import SimpleKeyboard from 'cpns/SimpleKeyboard' |
|
|
import SimpleKeyboard from 'cpns/SimpleKeyboard' |
|
|
import { showSuccessToast, showFailToast } from 'vant' |
|
|
import { showSuccessToast, showFailToast } from 'vant' |
|
|
import { useSettingStore, useWebSocketStore, useOperatorStore } from '@/store' |
|
|
|
|
|
|
|
|
import { useSettingStore, useWebSocketStore, useOperatorStore, useFormulaStore } from '@/store' |
|
|
import { storeToRefs } from 'pinia' |
|
|
import { storeToRefs } from 'pinia' |
|
|
import { |
|
|
import { |
|
|
setSettingValJSON, |
|
|
setSettingValJSON, |
|
@ -221,6 +221,7 @@ import LogPicker from 'cpns/dialogs/LogPicker' |
|
|
const settingStore = useSettingStore() |
|
|
const settingStore = useSettingStore() |
|
|
const webSocketStore = useWebSocketStore() |
|
|
const webSocketStore = useWebSocketStore() |
|
|
const operatorStore = useOperatorStore() |
|
|
const operatorStore = useOperatorStore() |
|
|
|
|
|
const formulaStore = useFormulaStore() |
|
|
|
|
|
|
|
|
const max_humidity = ref('0') |
|
|
const max_humidity = ref('0') |
|
|
const continued_satur = ref('0') |
|
|
const continued_satur = ref('0') |
|
@ -253,6 +254,15 @@ const save = () => { |
|
|
showFailToast('配方名称不能为空') |
|
|
showFailToast('配方名称不能为空') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let list = formulaStore?.formulaList; |
|
|
|
|
|
for (let i = 0; i < list.length; i++) { |
|
|
|
|
|
if (list[i].formula_id == formula_id.value) { |
|
|
|
|
|
showFailToast('配方名称已存在') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const data = { |
|
|
const data = { |
|
|
formula_id: formula_id.value, |
|
|
formula_id: formula_id.value, |
|
|
loglevel: logVal.value, |
|
|
loglevel: logVal.value, |
|
|