|
|
@ -79,10 +79,10 @@ |
|
|
|
<van-field |
|
|
|
type="number" |
|
|
|
v-model="addLiquidVal" |
|
|
|
:clickable="true" |
|
|
|
:maxlength="4" |
|
|
|
:maxlength="6" |
|
|
|
readonly |
|
|
|
@click.stop="numberKeyboardShow = true" |
|
|
|
:formatter="formatter" |
|
|
|
@click.stop="handleClickInput" |
|
|
|
class="add_liquid_input" |
|
|
|
/> |
|
|
|
</div> |
|
|
@ -151,7 +151,8 @@ |
|
|
|
<van-number-keyboard |
|
|
|
v-model="addLiquidVal" |
|
|
|
:show="numberKeyboardShow" |
|
|
|
:maxlength="4" |
|
|
|
@input="handleInput" |
|
|
|
:maxlength="6" |
|
|
|
@blur="numberKeyboardShow = false" |
|
|
|
/> |
|
|
|
</div> |
|
|
@ -187,15 +188,24 @@ const props = defineProps({ |
|
|
|
}, |
|
|
|
}) |
|
|
|
|
|
|
|
const addLiquidVal = ref(2000) |
|
|
|
const addLiquidVal = ref('2000') |
|
|
|
const tipModalVisible = ref(false) |
|
|
|
const webSocketStore = useWebSocketStore() |
|
|
|
|
|
|
|
const isPopLiquidStatus = ref(false) |
|
|
|
|
|
|
|
const formatter = value => { |
|
|
|
if (parseInt(value) > 5000) { |
|
|
|
return '5000' |
|
|
|
} |
|
|
|
if (parseInt(value) <= 0) { |
|
|
|
return '0' |
|
|
|
} |
|
|
|
return value.replace(/^0+/gi, '') |
|
|
|
} |
|
|
|
|
|
|
|
const startAdd = () => { |
|
|
|
if (!(operatorStore.replenishingFluidsWorkState == 1)) { |
|
|
|
console.log(startReplenishingFluidsJSON(parseInt(addLiquidVal.value))) |
|
|
|
webSocketStore.sendCommandMsg( |
|
|
|
startReplenishingFluidsJSON(parseInt(addLiquidVal.value)), |
|
|
|
) |
|
|
@ -227,6 +237,22 @@ const hideTabLiquid = () => { |
|
|
|
const deviceStore = useDeviceStore() |
|
|
|
|
|
|
|
const { disinfectantCapacity } = storeToRefs(deviceStore) |
|
|
|
|
|
|
|
const isFirstClick = ref(true) |
|
|
|
|
|
|
|
const handleInput = value => { |
|
|
|
if (isFirstClick.value) { |
|
|
|
setTimeout(() => { |
|
|
|
addLiquidVal.value = value + '' |
|
|
|
}) |
|
|
|
isFirstClick.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const handleClickInput = () => { |
|
|
|
isFirstClick.value = true |
|
|
|
numberKeyboardShow.value = true |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|