|
@ -12,6 +12,11 @@ export const useSettingStore = defineStore({ |
|
|
addLiquidConfigVal: 0, |
|
|
addLiquidConfigVal: 0, |
|
|
// 设置喷液泵的参数
|
|
|
// 设置喷液泵的参数
|
|
|
sprayLiquidConfigVal: 0, |
|
|
sprayLiquidConfigVal: 0, |
|
|
|
|
|
max_humidity: 0, |
|
|
|
|
|
continued_satur: 0, |
|
|
|
|
|
stoped_satur: 0, |
|
|
|
|
|
continued_gs: 0, |
|
|
|
|
|
stoped_gs: 0, |
|
|
// 首屏初始化
|
|
|
// 首屏初始化
|
|
|
initLoading: true, |
|
|
initLoading: true, |
|
|
// 所有setting的对象数据
|
|
|
// 所有setting的对象数据
|
|
@ -20,7 +25,42 @@ export const useSettingStore = defineStore({ |
|
|
}, |
|
|
}, |
|
|
// actions
|
|
|
// actions
|
|
|
actions: { |
|
|
actions: { |
|
|
|
|
|
updateMaxHumidity(max_humidity) { |
|
|
|
|
|
this.max_humidity = max_humidity |
|
|
|
|
|
}, |
|
|
|
|
|
updateContinuedSatur(continued_satur) { |
|
|
|
|
|
this.continued_satur = continued_satur |
|
|
|
|
|
}, |
|
|
|
|
|
updateStopedSatur(stoped_satur) { |
|
|
|
|
|
this.stoped_satur = stoped_satur |
|
|
|
|
|
}, |
|
|
|
|
|
updateContinuedGs(continued_gs) { |
|
|
|
|
|
this.continued_gs = continued_gs |
|
|
|
|
|
}, |
|
|
|
|
|
updateStopedGs(stoped_gs) { |
|
|
|
|
|
this.stoped_gs = stoped_gs |
|
|
|
|
|
}, |
|
|
updateAllSettingList(allSettingList) { |
|
|
updateAllSettingList(allSettingList) { |
|
|
|
|
|
const stoped_gsObj = allSettingList.filter( |
|
|
|
|
|
item => item.name == 'stoped_gs', |
|
|
|
|
|
)[0] |
|
|
|
|
|
const continued_gsObj = allSettingList.filter( |
|
|
|
|
|
item => item.name == 'continued_gs', |
|
|
|
|
|
)[0] |
|
|
|
|
|
const stoped_saturObj = allSettingList.filter( |
|
|
|
|
|
item => item.name == 'stoped_satur', |
|
|
|
|
|
)[0] |
|
|
|
|
|
const continued_saturObj = allSettingList.filter( |
|
|
|
|
|
item => item.name == 'continued_satur', |
|
|
|
|
|
)[0] |
|
|
|
|
|
const max_humidityObj = allSettingList.filter( |
|
|
|
|
|
item => item.name == 'max_humidity', |
|
|
|
|
|
)[0] |
|
|
|
|
|
this.max_humidity = max_humidityObj.val |
|
|
|
|
|
this.continued_satur = continued_saturObj.val |
|
|
|
|
|
this.stoped_satur = stoped_saturObj.val |
|
|
|
|
|
this.continued_gs = continued_gsObj.val |
|
|
|
|
|
this.stoped_gs = stoped_gsObj.val |
|
|
// 对当前数组进行处理 赋予给泵参数
|
|
|
// 对当前数组进行处理 赋予给泵参数
|
|
|
const addLiquid = allSettingList.filter( |
|
|
const addLiquid = allSettingList.filter( |
|
|
item => item.name == 'drainage_pump_speed', |
|
|
item => item.name == 'drainage_pump_speed', |
|
@ -28,6 +68,7 @@ export const useSettingStore = defineStore({ |
|
|
const sprayLiquid = allSettingList.filter( |
|
|
const sprayLiquid = allSettingList.filter( |
|
|
item => item.name == 'injection_pump_speed', |
|
|
item => item.name == 'injection_pump_speed', |
|
|
)[0] |
|
|
)[0] |
|
|
|
|
|
|
|
|
this.addLiquidConfigVal = addLiquid.val |
|
|
this.addLiquidConfigVal = addLiquid.val |
|
|
this.sprayLiquidConfigVal = sprayLiquid.val |
|
|
this.sprayLiquidConfigVal = sprayLiquid.val |
|
|
this.allSettingList = allSettingList |
|
|
this.allSettingList = allSettingList |
|
|