|
|
@ -5,29 +5,29 @@ |
|
|
|
<p class="title">喷液泵</p> |
|
|
|
<div class="num"> |
|
|
|
<my-input type="number" class="add_liquid_input" |
|
|
|
v-model:value="sprayLiquidPumpGPMValue" |
|
|
|
@done="actionSprayLiquidPumpGPMValueChange" |
|
|
|
v-model:value="testStore.sprayLiquidPumpGPM" |
|
|
|
></my-input> |
|
|
|
<p>g/min</p> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="btn_wrap" style="margin-left:10px;"> |
|
|
|
<div |
|
|
|
:class="sprayLiquidPumpGPMValue >= 0 ? 'open style-btn mg' : 'close style-btn mg'" |
|
|
|
@click="actionSprayLiquidPumpGPMValueChange('forward')" |
|
|
|
:class="'forward' === testStore.sprayLiquidPumpRotation ? 'open style-btn mg' : 'close style-btn mg'" |
|
|
|
@click="actionSprayLiquidPumpRotationChange('forward')" |
|
|
|
>正转</div> |
|
|
|
<div |
|
|
|
:class="sprayLiquidPumpGPMValue < 0 ? 'open style-btn' : 'close style-btn'" |
|
|
|
@click="actionSprayLiquidPumpGPMValueChange('backward')" |
|
|
|
:class="'backward' === testStore.sprayLiquidPumpRotation ? 'open style-btn' : 'close style-btn'" |
|
|
|
@click="actionSprayLiquidPumpRotationChange('backward')" |
|
|
|
>反转</div> |
|
|
|
</div> |
|
|
|
<div class="btn_wrap" style="margin-left:10px;"> |
|
|
|
<div |
|
|
|
:class="sprayLiquidPumpGPMValue != 0 ? 'open style-btn mg' : 'close style-btn mg'" |
|
|
|
@click="actionSprayLiquidPumpGPMValueChange('start')" |
|
|
|
:class="testStore.sprayLiquidPumpEnable ? 'open style-btn mg' : 'close style-btn mg'" |
|
|
|
@click="actionSprayLiquidPumpEnableChange(true)" |
|
|
|
>打开</div> |
|
|
|
<div |
|
|
|
:class="sprayLiquidPumpGPMValue == 0 ? 'open style-btn' : 'close style-btn'" |
|
|
|
@click="actionSprayLiquidPumpGPMValueChange('stop')" |
|
|
|
:class="!testStore.sprayLiquidPumpEnable ? 'open style-btn' : 'close style-btn'" |
|
|
|
@click="actionSprayLiquidPumpEnableChange(false)" |
|
|
|
>关闭</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -49,20 +49,17 @@ |
|
|
|
<div class="common_set switch_wrap"> |
|
|
|
<p class="title"> 风机</p> |
|
|
|
<div class="num"> |
|
|
|
<my-input type="number" class="add_liquid_input" |
|
|
|
v-model:value="miniPwmBlowerCtrlValue" |
|
|
|
@done="actionMiniPwmBlowerCtrl" |
|
|
|
></my-input> |
|
|
|
<my-input type="number" class="add_liquid_input" v-model:value="testStore.miniPwmBlowerCtrl" /> |
|
|
|
<p>%</p> |
|
|
|
</div> |
|
|
|
<div class="btn_wrap"> |
|
|
|
<div class="style-btn" |
|
|
|
:class="50 < miniPwmBlowerCtrl ? 'open mg' : 'close style-btn mg'" |
|
|
|
@click="actionMiniPwmBlowerCtrl(50)" |
|
|
|
:class="testStore.miniPwmBlowerCtrlEnable ? 'open mg' : 'close style-btn mg'" |
|
|
|
@click="actionMiniPwmBlowerCtrlEnableChange(true)" |
|
|
|
>打开</div> |
|
|
|
<div |
|
|
|
:class="0 == miniPwmBlowerCtrl ? 'open style-btn ' : 'close style-btn'" |
|
|
|
@click="actionMiniPwmBlowerCtrl(0)" |
|
|
|
:class="!testStore.miniPwmBlowerCtrlEnable ? 'open style-btn ' : 'close style-btn'" |
|
|
|
@click="actionMiniPwmBlowerCtrlEnableChange(false)" |
|
|
|
>关闭</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -229,32 +226,39 @@ function actionSetExtChannelActiveName( name ) { |
|
|
|
} |
|
|
|
|
|
|
|
// 风机控制 |
|
|
|
function actionMiniPwmBlowerCtrl(power=null) { |
|
|
|
if ( null === power ) { |
|
|
|
power = miniPwmBlowerCtrlValue.value; |
|
|
|
function actionMiniPwmBlowerCtrlEnableChange( enable ) { |
|
|
|
testStore.miniPwmBlowerCtrlEnable = enable; |
|
|
|
if ( !enable ) { |
|
|
|
websocketStore.call('DBDBTestPage__miniPwmBlowerCtrl',{power100:0}); |
|
|
|
return ; |
|
|
|
} |
|
|
|
miniPwmBlowerCtrlValue.value = power; |
|
|
|
testStore.miniPwmBlowerCtrl = power; |
|
|
|
let power = testStore.miniPwmBlowerCtrl; |
|
|
|
websocketStore.call('DBDBTestPage__miniPwmBlowerCtrl',{power100:power}); |
|
|
|
} |
|
|
|
|
|
|
|
// 喷液泵GPM值变化 |
|
|
|
function actionSprayLiquidPumpGPMValueChange( action=null ) { |
|
|
|
let value = sprayLiquidPumpGPMValue.value; |
|
|
|
if ( null === action ) { |
|
|
|
// nothing to do here |
|
|
|
} if ( 'start' === action ) { |
|
|
|
value = 20; |
|
|
|
} else if ( 'stop' === action ) { |
|
|
|
value = 0; |
|
|
|
} else if ( 'forward' === action ) { |
|
|
|
value = value > 0 ? value : value * -1; |
|
|
|
} else if ( 'backward' === action ) { |
|
|
|
value = value < 0 ? value : value * -1; |
|
|
|
// 喷液泵旋转方向变化 |
|
|
|
function actionSprayLiquidPumpRotationChange( rotation ) { |
|
|
|
testStore.sprayLiquidPumpRotation = rotation; |
|
|
|
testStore.sprayLiquidPumpEnable = true; |
|
|
|
let value = testStore.sprayLiquidPumpGPM; |
|
|
|
if ( 'backward' === rotation ) { |
|
|
|
value = value * -1; |
|
|
|
} |
|
|
|
websocketStore.call('DBDBTestPage__sprayLiquidPump_run',{gpm:value}); |
|
|
|
} |
|
|
|
|
|
|
|
sprayLiquidPumpGPMValue.value = value; |
|
|
|
testStore.sprayLiquidPumpGPM = sprayLiquidPumpGPMValue.value; |
|
|
|
// 喷液泵启用变化 |
|
|
|
function actionSprayLiquidPumpEnableChange( enable ) { |
|
|
|
testStore.sprayLiquidPumpEnable = enable; |
|
|
|
if ( !enable ) { |
|
|
|
websocketStore.call('DBDBTestPage__sprayLiquidPump_run',{gpm:0}); |
|
|
|
return ; |
|
|
|
} |
|
|
|
|
|
|
|
let value = testStore.sprayLiquidPumpGPM; |
|
|
|
if ( 'backward' === testStore.sprayLiquidPumpRotation ) { |
|
|
|
value = value * -1; |
|
|
|
} |
|
|
|
websocketStore.call('DBDBTestPage__sprayLiquidPump_run',{gpm:value}); |
|
|
|
} |
|
|
|
|
|
|
@ -337,80 +341,6 @@ const handleInput = (value, index) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const setAddLiquidConfig = flag => { |
|
|
|
if (flag == 1) { |
|
|
|
websocketStore.sendCommandMsg( |
|
|
|
// 正传 |
|
|
|
test_replenishingFluidsPumpCtrJSON(1, 300), |
|
|
|
) |
|
|
|
showSuccessToast('设置成功') |
|
|
|
return |
|
|
|
} else if (flag == 2) { |
|
|
|
websocketStore.sendCommandMsg( |
|
|
|
sprayLiquidPump_open_for_testJSON(1, addLiquidVal2.value), |
|
|
|
) |
|
|
|
showSuccessToast('设置成功') |
|
|
|
return |
|
|
|
} else if (flag == 3) { |
|
|
|
// 关闭 |
|
|
|
websocketStore.sendCommandMsg(test_replenishingFluidsPumpCtrJSON(0, 0)) |
|
|
|
showSuccessToast('关闭加液蠕动泵成功') |
|
|
|
return |
|
|
|
} else if (flag == 5) { |
|
|
|
// 反转 |
|
|
|
websocketStore.sendCommandMsg(test_replenishingFluidsPumpCtrJSON(-1, 300)) |
|
|
|
showSuccessToast('设置成功') |
|
|
|
} else if (flag == 6) { |
|
|
|
websocketStore.sendCommandMsg( |
|
|
|
sprayLiquidPump_open_for_testJSON(-1, addLiquidVal2.value), |
|
|
|
) |
|
|
|
showSuccessToast('设置成功') |
|
|
|
} else { |
|
|
|
websocketStore.sendCommandMsg( |
|
|
|
sprayLiquidPump_open_for_testJSON(0, addLiquidVal2.value), |
|
|
|
) |
|
|
|
showSuccessToast('关闭注射蠕动泵成功') |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const handleUpdate = () => { |
|
|
|
websocketStore.sendCommandMsg(getStateJSON) |
|
|
|
} |
|
|
|
|
|
|
|
const changeFeedingStatus = flag => { |
|
|
|
if (flag == 1) { |
|
|
|
if (!testStore.feedingPeristalticPumpStatus) { |
|
|
|
// 发送打开指令 |
|
|
|
websocketStore.sendCommandMsg( |
|
|
|
liquidpumpctrlJSON(1, settingStore.addLiquidConfigVal), |
|
|
|
) |
|
|
|
testStore.updateFeedingPeristalticPumpStatus(true) |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (testStore.feedingPeristalticPumpStatus) { |
|
|
|
websocketStore.sendCommandMsg(liquidpumpctrlJSON(1, 0)) |
|
|
|
testStore.updateFeedingPeristalticPumpStatus(false) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const changeSprayStatus = flag => { |
|
|
|
if (flag == 1) { |
|
|
|
if (!testStore.sprayPeristalticPump) { |
|
|
|
websocketStore.sendCommandMsg( |
|
|
|
liquidpumpctrlJSON(2, settingStore.sprayLiquidConfigVal), |
|
|
|
) |
|
|
|
testStore.updateSprayPeristalticPump(true) |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (testStore.sprayPeristalticPump) { |
|
|
|
websocketStore.sendCommandMsg(liquidpumpctrlJSON(2, 0)) |
|
|
|
testStore.updateSprayPeristalticPump(false) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const changeHeatingStatus = flag => { |
|
|
|
if (flag == 1) { |
|
|
|
if (!testStore.heatingStrip) { |
|
|
|