Browse Source

test page

master
maochaoying 2 years ago
parent
commit
659a32aaf2
  1. 106
      src/components/Test.vue

106
src/components/Test.vue

@ -18,8 +18,8 @@
<div <div
:class=" :class="
settingStore.chargingPumpRPM > 0 settingStore.chargingPumpRPM > 0
? 'open success style-btn mg'
: 'open style-btn mg'
? 'open style-btn mg'
: 'close style-btn mg'
" "
@click="setAddLiquidConfig(1)" @click="setAddLiquidConfig(1)"
> >
@ -28,8 +28,8 @@
<div <div
:class=" :class="
settingStore.chargingPumpRPM < 0 settingStore.chargingPumpRPM < 0
? 'open success style-btn'
: 'open style-btn'
? 'open style-btn'
: 'close style-btn'
" "
@click="setAddLiquidConfig(5)" @click="setAddLiquidConfig(5)"
> >
@ -37,8 +37,26 @@
</div> </div>
</div> </div>
<div class="btn_wrap"> <div class="btn_wrap">
<div class="open style-btn mg" @click="setAddLiquidConfig(1)">打开</div>
<div class="open style-btn" @click="setAddLiquidConfig(3)">关闭</div>
<div
:class="
settingStore.chargingPumpRPM != 0
? 'open style-btn mg'
: 'close style-btn mg'
"
@click="setAddLiquidConfig(1)"
>
打开
</div>
<div
:class="
settingStore.chargingPumpRPM == 0
? 'open style-btn'
: 'close style-btn'
"
@click="setAddLiquidConfig(3)"
>
关闭
</div>
</div> </div>
</div> </div>
<div class="common_set switch_wrap"> <div class="common_set switch_wrap">
@ -59,8 +77,8 @@
<div <div
:class=" :class="
settingStore.sprinklerPumpRPM > 0 settingStore.sprinklerPumpRPM > 0
? 'open success style-btn mg'
: 'open style-btn mg'
? 'open style-btn mg'
: 'close style-btn mg'
" "
@click="setAddLiquidConfig(2)" @click="setAddLiquidConfig(2)"
> >
@ -69,8 +87,8 @@
<div <div
:class=" :class="
settingStore.sprinklerPumpRPM < 0 settingStore.sprinklerPumpRPM < 0
? 'open success style-btn'
: 'open style-btn'
? 'open style-btn'
: 'close style-btn'
" "
@click="setAddLiquidConfig(6)" @click="setAddLiquidConfig(6)"
> >
@ -78,8 +96,26 @@
</div> </div>
</div> </div>
<div class="btn_wrap"> <div class="btn_wrap">
<div class="open style-btn mg" @click="setAddLiquidConfig(2)">打开</div>
<div class="open style-btn" @click="setAddLiquidConfig(4)">关闭</div>
<div
:class="
settingStore.sprinklerPumpRPM != 0
? 'open style-btn mg'
: 'close style-btn mg'
"
@click="setAddLiquidConfig(2)"
>
打开
</div>
<div
:class="
settingStore.sprinklerPumpRPM == 0
? 'open style-btn'
: 'close style-btn'
"
@click="setAddLiquidConfig(4)"
>
关闭
</div>
</div> </div>
</div> </div>
<div class="common_set switch_wrap"> <div class="common_set switch_wrap">
@ -352,22 +388,31 @@ const handleInput = (value, index) => {
const setAddLiquidConfig = flag => { const setAddLiquidConfig = flag => {
if (flag == 1) { if (flag == 1) {
websocketStore.sendCommandMsg(
//
test_replenishingFluidsPumpCtrJSON(1, addLiquidVal.value),
)
showSuccessToast('设置成功')
if (settingStore.chargingPumpRPM == 0) {
websocketStore.sendCommandMsg(
//
test_replenishingFluidsPumpCtrJSON(1, addLiquidVal.value),
)
showSuccessToast('设置成功')
return
}
} else if (flag == 2) { } else if (flag == 2) {
websocketStore.sendCommandMsg(
sprayLiquidPump_open_for_testJSON(1, addLiquidVal2.value),
)
showSuccessToast('设置成功')
if (settingStore.sprinklerPumpRPM == 0) {
websocketStore.sendCommandMsg(
sprayLiquidPump_open_for_testJSON(1, addLiquidVal2.value),
)
showSuccessToast('设置成功')
return
}
} else if (flag == 3) { } else if (flag == 3) {
// //
websocketStore.sendCommandMsg(
test_replenishingFluidsPumpCtrJSON(0, addLiquidVal.value),
)
showSuccessToast('关闭加液蠕动泵成功')
if (settingStore.chargingPumpRPM != 0) {
websocketStore.sendCommandMsg(
test_replenishingFluidsPumpCtrJSON(0, addLiquidVal.value),
)
showSuccessToast('关闭加液蠕动泵成功')
return
}
} else if (flag == 5) { } else if (flag == 5) {
// //
websocketStore.sendCommandMsg( websocketStore.sendCommandMsg(
@ -380,10 +425,13 @@ const setAddLiquidConfig = flag => {
) )
showSuccessToast('设置成功') showSuccessToast('设置成功')
} else { } else {
websocketStore.sendCommandMsg(
sprayLiquidPump_open_for_testJSON(0, addLiquidVal2.value),
)
showSuccessToast('关闭注射蠕动泵成功')
if (settingStore.sprinklerPumpRPM != 0) {
websocketStore.sendCommandMsg(
sprayLiquidPump_open_for_testJSON(0, addLiquidVal2.value),
)
showSuccessToast('关闭注射蠕动泵成功')
return
}
} }
} }

Loading…
Cancel
Save