|
@ -31,7 +31,7 @@ |
|
|
type="number" |
|
|
type="number" |
|
|
v-model="stoped_gs" |
|
|
v-model="stoped_gs" |
|
|
:clickable="true" |
|
|
:clickable="true" |
|
|
:formatter="formatter" |
|
|
|
|
|
|
|
|
:formatter="hP1Formatter" |
|
|
/> |
|
|
/> |
|
|
</p> |
|
|
</p> |
|
|
<div class="btn" @click="setStopedGsVal">设置</div> |
|
|
<div class="btn" @click="setStopedGsVal">设置</div> |
|
@ -43,7 +43,7 @@ |
|
|
type="number" |
|
|
type="number" |
|
|
v-model="continued_gs" |
|
|
v-model="continued_gs" |
|
|
:clickable="true" |
|
|
:clickable="true" |
|
|
:formatter="formatter" |
|
|
|
|
|
|
|
|
:formatter="hP1Formatter" |
|
|
/> |
|
|
/> |
|
|
</p> |
|
|
</p> |
|
|
<div class="btn" @click="setcontinuedGsVal">设置</div> |
|
|
<div class="btn" @click="setcontinuedGsVal">设置</div> |
|
@ -55,7 +55,7 @@ |
|
|
type="number" |
|
|
type="number" |
|
|
v-model="stoped_satur" |
|
|
v-model="stoped_satur" |
|
|
:clickable="true" |
|
|
:clickable="true" |
|
|
:formatter="humidityFormatter" |
|
|
|
|
|
|
|
|
:formatter="hPFormatter" |
|
|
/> |
|
|
/> |
|
|
</p> |
|
|
</p> |
|
|
<div class="btn" @click="setstopedSaturVal">设置</div> |
|
|
<div class="btn" @click="setstopedSaturVal">设置</div> |
|
@ -67,7 +67,7 @@ |
|
|
type="number" |
|
|
type="number" |
|
|
v-model="continued_satur" |
|
|
v-model="continued_satur" |
|
|
:clickable="true" |
|
|
:clickable="true" |
|
|
:formatter="humidityFormatter" |
|
|
|
|
|
|
|
|
:formatter="hPFormatter" |
|
|
/> |
|
|
/> |
|
|
</p> |
|
|
</p> |
|
|
<div class="btn" @click="setContinuedSaturVal">设置</div> |
|
|
<div class="btn" @click="setContinuedSaturVal">设置</div> |
|
@ -106,15 +106,37 @@ const { |
|
|
sprayLiquidConfigVal, |
|
|
sprayLiquidConfigVal, |
|
|
} = storeToRefs(settingStore) |
|
|
} = storeToRefs(settingStore) |
|
|
|
|
|
|
|
|
|
|
|
const hPFormatter = value => { |
|
|
|
|
|
if (value > 100) { |
|
|
|
|
|
return '100%RS' |
|
|
|
|
|
} |
|
|
|
|
|
if (value != 0) { |
|
|
|
|
|
var newVal = value.replace(/\b(0+)/gi, '') |
|
|
|
|
|
return newVal + '%RS' |
|
|
|
|
|
} |
|
|
|
|
|
return '0%RS' |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const hP1Formatter = value => { |
|
|
|
|
|
if (value > 2000) { |
|
|
|
|
|
return '2000ppm' |
|
|
|
|
|
} |
|
|
|
|
|
if (value != 0) { |
|
|
|
|
|
var newVal = value.replace(/\b(0+)/gi, '') |
|
|
|
|
|
return newVal + 'ppm' |
|
|
|
|
|
} |
|
|
|
|
|
return '0ppm' |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const humidityFormatter = value => { |
|
|
const humidityFormatter = value => { |
|
|
if (value > 100) { |
|
|
if (value > 100) { |
|
|
return '100/g' |
|
|
|
|
|
|
|
|
return '100%RH' |
|
|
} |
|
|
} |
|
|
if (value != 0) { |
|
|
if (value != 0) { |
|
|
var newVal = value.replace(/\b(0+)/gi, '') |
|
|
var newVal = value.replace(/\b(0+)/gi, '') |
|
|
return newVal + '/g' |
|
|
|
|
|
|
|
|
return newVal + '%RH' |
|
|
} |
|
|
} |
|
|
return '0/g' |
|
|
|
|
|
|
|
|
return '0%RH' |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const formatter = value => { |
|
|
const formatter = value => { |
|
@ -140,7 +162,7 @@ const setAddliquidVal = () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const setStopedGsVal = () => { |
|
|
const setStopedGsVal = () => { |
|
|
const val = parseInt(stoped_gs.value.substring(0, stoped_gs.value.length - 2)) |
|
|
|
|
|
|
|
|
const val = parseInt(stoped_gs.value.substring(0, stoped_gs.value.length - 3)) |
|
|
settingStore.updateStopedGs(val) |
|
|
settingStore.updateStopedGs(val) |
|
|
webSocketStore.sendCommandMsg(setSettingValJSON('stoped_gs', stoped_gs.value)) |
|
|
webSocketStore.sendCommandMsg(setSettingValJSON('stoped_gs', stoped_gs.value)) |
|
|
showSuccessToast('设置成功') |
|
|
showSuccessToast('设置成功') |
|
@ -148,7 +170,7 @@ const setStopedGsVal = () => { |
|
|
|
|
|
|
|
|
const setcontinuedGsVal = () => { |
|
|
const setcontinuedGsVal = () => { |
|
|
const val = parseInt( |
|
|
const val = parseInt( |
|
|
continued_gs.value.substring(0, continued_gs.value.length - 2), |
|
|
|
|
|
|
|
|
continued_gs.value.substring(0, continued_gs.value.length - 3), |
|
|
) |
|
|
) |
|
|
settingStore.updateContinuedGs(val) |
|
|
settingStore.updateContinuedGs(val) |
|
|
webSocketStore.sendCommandMsg( |
|
|
webSocketStore.sendCommandMsg( |
|
@ -159,7 +181,7 @@ const setcontinuedGsVal = () => { |
|
|
|
|
|
|
|
|
const setstopedSaturVal = () => { |
|
|
const setstopedSaturVal = () => { |
|
|
const val = parseInt( |
|
|
const val = parseInt( |
|
|
stoped_satur.value.substring(0, stoped_satur.value.length - 2), |
|
|
|
|
|
|
|
|
stoped_satur.value.substring(0, stoped_satur.value.length - 3), |
|
|
) |
|
|
) |
|
|
settingStore.updateStopedSatur(val) |
|
|
settingStore.updateStopedSatur(val) |
|
|
webSocketStore.sendCommandMsg( |
|
|
webSocketStore.sendCommandMsg( |
|
@ -170,7 +192,7 @@ const setstopedSaturVal = () => { |
|
|
|
|
|
|
|
|
const setContinuedSaturVal = () => { |
|
|
const setContinuedSaturVal = () => { |
|
|
const val = parseInt( |
|
|
const val = parseInt( |
|
|
continued_satur.value.substring(0, continued_satur.value.length - 2), |
|
|
|
|
|
|
|
|
continued_satur.value.substring(0, continued_satur.value.length - 3), |
|
|
) |
|
|
) |
|
|
settingStore.updateContinuedSatur(val) |
|
|
settingStore.updateContinuedSatur(val) |
|
|
webSocketStore.sendCommandMsg( |
|
|
webSocketStore.sendCommandMsg( |
|
@ -181,7 +203,7 @@ const setContinuedSaturVal = () => { |
|
|
|
|
|
|
|
|
const setMaxHumidityVal = () => { |
|
|
const setMaxHumidityVal = () => { |
|
|
const val = parseInt( |
|
|
const val = parseInt( |
|
|
max_humidity.value.substring(0, max_humidity.value.length - 2), |
|
|
|
|
|
|
|
|
max_humidity.value.substring(0, max_humidity.value.length - 3), |
|
|
) |
|
|
) |
|
|
settingStore.updateMaxHumidity(val) |
|
|
settingStore.updateMaxHumidity(val) |
|
|
webSocketStore.sendCommandMsg( |
|
|
webSocketStore.sendCommandMsg( |
|
|