Browse Source

配置配方

master
maochaoying 2 years ago
parent
commit
8972c714e3
  1. 85
      src/components/PreSetting.vue
  2. 9
      src/pages/Home.vue

85
src/components/PreSetting.vue

@ -91,10 +91,10 @@
/>
</p>
</div>
<div class="row_wrap">
<div class="row_wrap" @click="showLogPicker">
<p class="title">Log等级</p>
<div class="num">
<p class="log">6</p>
<p class="log">{{ logVal }}</p>
</div>
</div>
<!-- <div class="row_wrap" v-if="operatorStore.disinfectStatus != 1">
@ -223,8 +223,14 @@
:show="continued_humiShow"
@blur="continued_humiShow = false"
/>
<LogPicker
v-if="logVisible"
:hiddenLogVisible="hiddenLogVisible"
:changeLogVal="changeLogVal"
:logVal="logVal"
/>
<div class="btns">
<div class="btn">保存</div>
<div class="btn" @click="save">保存</div>
<div class="btn ml" @click="hiddleSettingModal">返回</div>
</div>
</div>
@ -236,23 +242,26 @@ import { showSuccessToast, showFailToast } from 'vant'
import { useSettingStore, useWebSocketStore, useOperatorStore } from '@/store'
import { storeToRefs } from 'pinia'
import { setSettingValJSON } from '@/mock/command'
import LogPicker from 'cpns/dialogs/LogPicker'
const settingStore = useSettingStore()
const webSocketStore = useWebSocketStore()
const operatorStore = useOperatorStore()
const {
max_humidity,
continued_satur,
stoped_satur,
continued_gs,
stoped_gs,
addLiquidConfigVal,
sprayLiquidConfigVal,
stoped_humi,
continued_humi,
allSettingList,
pre_heat_time_s,
} = storeToRefs(settingStore)
const max_humidity = ref('0')
const continued_satur = ref('0')
const stoped_satur = ref('0')
const continued_gs = ref('0')
const stoped_gs = ref('0')
const addLiquidConfigVal = ref('0')
const sprayLiquidConfigVal = ref('0')
const stoped_humi = ref('0')
const continued_humi = ref('0')
const pre_heat_time_s = ref('0')
const save = () => {
console.log(123)
}
const pre_heat_time_sShow = ref(false)
const addLiquidConfigValShow = ref(false)
@ -265,6 +274,20 @@ const max_humidityShow = ref(false)
const stoped_humiShow = ref(false)
const continued_humiShow = ref(false)
const logVisible = ref(false)
const logVal = ref('6')
const changeLogVal = val => {
logVal.value = val
logVisible.value = false
}
const hiddenLogVisible = () => {
logVisible.value = false
}
const showLogPicker = () => {
logVisible.value = true
}
const isFirstClick = ref(true)
const props = defineProps({
@ -561,9 +584,6 @@ const setAddliquidVal = () => {
showFailToast('设置失败,请填写正确参数')
return
}
settingStore.changeAddLiquidConfigVal(val)
webSocketStore.sendCommandMsg(setSettingValJSON('drainage_pump_speed', val))
showSuccessToast('设置成功')
}
const setStopedGsVal = () => {
@ -572,9 +592,6 @@ const setStopedGsVal = () => {
showFailToast('设置失败,请填写正确参数')
return
}
settingStore.updateStopedGs(val)
webSocketStore.sendCommandMsg(setSettingValJSON('stoped_gs', val))
showSuccessToast('设置成功')
}
const setcontinuedGsVal = () => {
@ -583,9 +600,6 @@ const setcontinuedGsVal = () => {
showFailToast('设置失败,请填写正确参数')
return
}
settingStore.updateContinuedGs(val)
webSocketStore.sendCommandMsg(setSettingValJSON('continued_gs', val))
showSuccessToast('设置成功')
}
const setstopedSaturVal = () => {
@ -594,9 +608,6 @@ const setstopedSaturVal = () => {
showFailToast('设置失败,请填写正确参数')
return
}
settingStore.updateStopedSatur(val)
webSocketStore.sendCommandMsg(setSettingValJSON('stoped_satur', val))
showSuccessToast('设置成功')
}
const setContinuedSaturVal = () => {
@ -605,9 +616,6 @@ const setContinuedSaturVal = () => {
showFailToast('设置失败,请填写正确参数')
return
}
settingStore.updateContinuedSatur(val)
webSocketStore.sendCommandMsg(setSettingValJSON('continued_satur', val))
showSuccessToast('设置成功')
}
const setMaxHumidityVal = () => {
@ -616,9 +624,6 @@ const setMaxHumidityVal = () => {
showFailToast('设置失败,请填写正确参数')
return
}
settingStore.updateMaxHumidity(val)
webSocketStore.sendCommandMsg(setSettingValJSON('max_humidity', val))
showSuccessToast('设置成功')
}
const setHeat_timeVal = () => {
@ -627,9 +632,6 @@ const setHeat_timeVal = () => {
showFailToast('设置失败,请填写正确参数')
return
}
settingStore.updatePre_heat_time_s(val)
webSocketStore.sendCommandMsg(setSettingValJSON('pre_heat_time_s', val))
showSuccessToast('设置成功')
}
const setstoped_humiVal = () => {
@ -638,9 +640,6 @@ const setstoped_humiVal = () => {
showFailToast('设置失败,请填写正确参数')
return
}
settingStore.updateStopedHumi(val)
webSocketStore.sendCommandMsg(setSettingValJSON('stoped_humi', val))
showSuccessToast('设置成功')
}
const setcontinued_humiVal = () => {
@ -649,9 +648,6 @@ const setcontinued_humiVal = () => {
showFailToast('设置失败,请填写正确参数')
return
}
settingStore.updateContinuedHumi(val)
webSocketStore.sendCommandMsg(setSettingValJSON('continued_humi', val))
showSuccessToast('设置成功')
}
const setSprayLiquidVal = () => {
@ -660,9 +656,6 @@ const setSprayLiquidVal = () => {
showFailToast('设置失败,请填写正确参数')
return
}
settingStore.changeSprayLiquidConfigVal(val)
webSocketStore.sendCommandMsg(setSettingValJSON('injection_pump_speed', val))
showSuccessToast('设置成功')
}
</script>

9
src/pages/Home.vue

@ -177,13 +177,14 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
fill="none"
version="1.1"
width="18.375"
height="19.25"
viewBox="0 0 18.375 19.25"
width="17.38603401184082"
height="21.000097274780273"
viewBox="0 0 17.38603401184082 21.000097274780273"
>
<g>
<path
d="M15.75,0C17.1997,7.82311e-8,18.375,1.17525,18.375,2.625L18.375,16.625C18.375,18.0747,17.1997,19.25,15.75,19.25L4.375,19.25C3.09406,19.2498,2.00016,18.3255,1.78631,17.0625L2.84375,17.0625C3.91298,17.0625,4.78675,16.2091,4.81194,15.1401C4.83714,14.0712,4.00455,13.1776,2.9365,13.1272L2.84375,13.125L1.75,13.125L1.75,11.5937L2.84375,11.5937C3.895,11.5937,4.76079,10.7678,4.81031,9.71775L4.8125,9.625C4.8125,8.57375,3.98658,7.70796,2.9365,7.65844L2.84375,7.65625L1.75,7.65625L1.75,6.125L2.84375,6.125C3.895,6.125,4.76079,5.29908,4.81031,4.249L4.8125,4.15625C4.8125,3.105,3.98658,2.23921,2.9365,2.18969L2.84375,2.1875L1.78631,2.1875C2.00035,0.924371,3.09425,1.56462e-7,4.375,0L15.75,0ZM2.84375,14.4375C3.20619,14.4375,3.5,14.7313,3.5,15.0937C3.5,15.4562,3.20619,15.75,2.84375,15.75L0.65625,15.75C0.293813,15.75,0,15.4562,0,15.0937C0,14.7313,0.293813,14.4375,0.65625,14.4375L2.84375,14.4375ZM15.2687,5.29375C14.7562,4.78108,13.925,4.78108,13.4124,5.29375L7.12469,11.5824C6.98921,11.7178,6.90191,11.8939,6.87619,12.0837L6.699,13.3927C6.65986,13.6818,6.90927,13.9275,7.19775,13.8841L8.48706,13.6898C8.6721,13.6621,8.84338,13.5757,8.97575,13.4435L15.2683,7.1505C15.7807,6.63797,15.7807,5.80716,15.2683,5.29462L15.2687,5.29375ZM2.84375,8.96875C3.20619,8.96875,3.5,9.26256,3.5,9.625C3.5,9.98744,3.20619,10.2812,2.84375,10.2812L0.65625,10.2812C0.293813,10.2812,0,9.98744,0,9.625C0,9.26256,0.293813,8.96875,0.65625,8.96875L2.84375,8.96875ZM2.84375,3.5C3.20619,3.5,3.5,3.79381,3.5,4.15625C3.5,4.51869,3.20619,4.8125,2.84375,4.8125L0.65625,4.8125C0.293813,4.8125,0,4.51869,0,4.15625C0,3.79381,0.293813,3.5,0.65625,3.5L2.84375,3.5Z"
d="M1.90264,0L15.5198,0C16.5493,0,17.386,0.836719,17.386,1.86621L17.386,14.8661C17.386,15.2086,17.1071,15.4875,16.7646,15.4875C16.4222,15.4875,16.1433,15.2086,16.1433,14.8661L16.1433,1.86416C16.1433,1.52168,15.8644,1.24277,15.5219,1.24277L1.90264,1.24277C1.56016,1.24277,1.28125,0.963867,1.28125,0.621387C1.28125,0.278906,1.56016,0,1.90264,0ZM15.4444,16.7796L15.4444,3.68945C15.4444,2.65996,14.6077,1.82324,13.5782,1.82324L1.86621,1.82324C0.836719,1.82324,0,2.65996,0,3.68945L0,19.1339C0,20.1634,0.836719,21.0001,1.86621,21.0001L10.8773,21.0001L15.4444,16.7796ZM9.63457,19.7553L1.86621,19.7553C1.52373,19.7553,1.24482,19.4764,1.24482,19.1339L1.24482,3.68945C1.24482,3.34697,1.52373,3.06807,1.86621,3.06807L13.5803,3.06807C13.9228,3.06807,14.2017,3.34697,14.2017,3.68945L14.2017,15.5184L11.5254,15.4814C11.0229,15.4732,10.5472,15.666,10.1903,16.0187C9.83145,16.3715,9.63457,16.8432,9.63457,17.3477L9.63457,19.7553ZM11.532,12.1097C11.7781,12.4337,11.7474,12.8931,11.4603,13.1802L10.7363,13.9041C10.4349,14.2056,9.96318,14.2261,9.63711,13.9533L8.98086,13.4058L8.87832,14.1707C8.82295,14.5727,8.47637,14.8762,8.07031,14.8762L7.04697,14.8762C6.62041,14.8762,6.27178,14.5562,6.23486,14.1338L6.15898,13.2827L5.5458,13.7503C5.22178,13.9964,4.7624,13.9656,4.47529,13.6785L3.75137,12.9546C3.4499,12.6531,3.42939,12.1814,3.70215,11.8554L4.24971,11.1991L3.48477,11.0966C3.08281,11.0412,2.7793,10.6946,2.7793,10.2886L2.7793,9.26523C2.7793,8.83867,3.09922,8.49004,3.52168,8.45312L4.37275,8.37724L3.90518,7.76406C3.65908,7.44004,3.68984,6.98066,3.97695,6.69355L4.70088,5.96963C5.00234,5.66816,5.47402,5.64766,5.8001,5.92041L6.45635,6.46797L6.55889,5.70303C6.61426,5.30107,6.96084,4.99756,7.36689,4.99756L8.39023,4.99756C8.8168,4.99756,9.16543,5.31748,9.20234,5.73994L9.27822,6.59102L9.89141,6.12344C10.2154,5.87734,10.6748,5.90811,10.9619,6.19522L11.6858,6.91914C11.9873,7.22061,12.0078,7.69229,11.7351,8.01836L11.1875,8.67461L11.9524,8.77715C12.3544,8.83252,12.6579,9.1791,12.6579,9.58516L12.6579,10.6085C12.6579,11.0351,12.338,11.3837,11.9155,11.4206L11.0645,11.4965L11.532,12.1097ZM10.3139,12.5649L9.76836,11.8492C9.57559,11.597,9.54688,11.2545,9.69863,10.9776C9.72734,10.9202,9.75605,10.8607,9.78066,10.8013C9.89756,10.5203,10.158,10.3296,10.4595,10.3029L11.4172,10.2168L11.4172,9.9625L10.523,9.84355C10.2113,9.80254,9.94883,9.579,9.85449,9.27754C9.83604,9.21601,9.81348,9.15449,9.78887,9.09502C9.67197,8.81406,9.72119,8.49414,9.91602,8.2624L10.5313,7.52617L10.3508,7.3457L9.63506,7.89121C9.38281,8.08398,9.03828,8.1127,8.75938,7.96504C8.70195,7.93428,8.64248,7.90557,8.58301,7.88096C8.30205,7.76406,8.11133,7.50361,8.08467,7.20215L7.99854,6.24443L7.74424,6.24443L7.62529,7.13857C7.58428,7.45029,7.36074,7.71279,7.05928,7.80713C6.99775,7.82559,6.93623,7.84814,6.87676,7.87275C6.5958,7.9876,6.27588,7.93838,6.04414,7.74356L5.30791,7.12832L5.12744,7.30879L5.67295,8.02451C5.86572,8.27471,5.89443,8.61924,5.74678,8.89814C5.71602,8.95557,5.68731,9.01504,5.6627,9.07451C5.5458,9.35547,5.28535,9.54619,4.98389,9.57285L4.02617,9.65899L4.02617,9.91328L4.92031,10.0322C5.23203,10.0732,5.49453,10.2968,5.58887,10.5982C5.60733,10.6598,5.62988,10.7213,5.65449,10.7808C5.77139,11.0617,5.72217,11.3816,5.52734,11.6134L4.91211,12.3496L5.09258,12.5301L5.8083,11.9846C6.0585,11.7918,6.40303,11.7631,6.68193,11.9107C6.73936,11.9415,6.79883,11.9702,6.8583,11.9948C7.13926,12.1117,7.32998,12.3722,7.35664,12.6736L7.44277,13.6313L7.69707,13.6313L7.81602,12.7372C7.85703,12.4255,8.08057,12.163,8.38203,12.0687C8.44355,12.0502,8.50508,12.0276,8.56455,12.003C8.84551,11.8861,9.16543,11.9354,9.39717,12.1302L10.1334,12.7454L10.3139,12.5649ZM5.8584,9.93789C5.8584,8.91045,6.69512,8.07373,7.72256,8.07373C8.75,8.07373,9.58672,8.91045,9.58672,9.93789C9.58672,10.9653,8.75,11.8021,7.72256,11.8021C6.69512,11.8021,5.8584,10.9653,5.8584,9.93789ZM7.10322,9.93789C7.10322,10.2783,7.38008,10.5572,7.72256,10.5572C8.06299,10.5572,8.34189,10.2804,8.34189,9.93789C8.34189,9.59746,8.06504,9.31855,7.72256,9.31855C7.38213,9.31855,7.10322,9.59541,7.10322,9.93789ZM10.8773,19.2754L10.8773,17.3477C10.8773,17.1795,10.943,17.0236,11.0619,16.9047C11.1809,16.7857,11.3388,16.7222,11.5069,16.7263L13.6069,16.755L10.8773,19.2754Z"
fill-rule="evenodd"
:fill="activeTab == 7 ? '#FFFFFF' : '#3D3D3D'"
fill-opacity="1"
/>

Loading…
Cancel
Save