|
|
@ -37,6 +37,8 @@ |
|
|
|
:disabled="operatorStore.disinfectStatus" |
|
|
|
v-model="roomSize" |
|
|
|
class="room_size" |
|
|
|
id="room_size" |
|
|
|
@focus="handleShowKeyBoard" |
|
|
|
/> |
|
|
|
<div class="log" @click="showLogPicker">{{ logVal }}</div> |
|
|
|
</div> |
|
|
@ -47,8 +49,8 @@ |
|
|
|
开始消毒 |
|
|
|
</div> |
|
|
|
<div class="progress"> |
|
|
|
<p class="title">消毒进度</p> |
|
|
|
<div class="tube"> |
|
|
|
<p class="title">剩余时间</p> |
|
|
|
<!-- <div class="tube"> |
|
|
|
<div |
|
|
|
class="pro" |
|
|
|
:style="{ |
|
|
@ -56,7 +58,14 @@ |
|
|
|
}" |
|
|
|
></div> |
|
|
|
</div> |
|
|
|
<div class="num">000/100</div> |
|
|
|
<div class="num">000/100</div> --> |
|
|
|
<div class="time"> |
|
|
|
{{ |
|
|
|
operatorStore.disinfectStatus |
|
|
|
? `${operatorStore.estimatedRemainingTimeS} S` |
|
|
|
: '未开始' |
|
|
|
}} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- <WarnModal /> --> |
|
|
@ -73,9 +82,9 @@ import LogPicker from 'cpns/dialogs/LogPicker' |
|
|
|
import WarnModal from 'cpns/dialogs/WarnModal' |
|
|
|
import DisinfectantLiquidInfo from 'cpns/info/DisinfectantLiquidInfo' |
|
|
|
import EnvironmentInfo from 'cpns/info/EnvironmentInfo' |
|
|
|
import { ref } from 'vue' |
|
|
|
import { ref, watch, onMounted, onUnmounted } from 'vue' |
|
|
|
import { useOperatorStore, useWebSocketStore } from '@/store' |
|
|
|
import { startDisinfectionJSON } from '@/mock/command' |
|
|
|
import { startDisinfectionJSON, getStateJSON } from '@/mock/command' |
|
|
|
import { showSuccessToast, showFailToast } from 'vant' |
|
|
|
|
|
|
|
const operatorStore = useOperatorStore() |
|
|
@ -85,6 +94,15 @@ const props = defineProps({ |
|
|
|
changeShowOperator: { |
|
|
|
type: Function, |
|
|
|
}, |
|
|
|
handleShowKeyBoard: { |
|
|
|
type: Function, |
|
|
|
}, |
|
|
|
hideKeyBoard: { |
|
|
|
type: Function, |
|
|
|
}, |
|
|
|
input: { |
|
|
|
type: String, |
|
|
|
}, |
|
|
|
}) |
|
|
|
|
|
|
|
const toDetail = () => { |
|
|
@ -98,6 +116,11 @@ const logVisible = ref(false) |
|
|
|
const logVal = ref(1) |
|
|
|
const roomSize = ref(0) |
|
|
|
|
|
|
|
watch(() => { |
|
|
|
console.log(props.input) |
|
|
|
roomSize.value = props.input.match(/\d+/g) |
|
|
|
}) |
|
|
|
|
|
|
|
const changeLogVal = val => { |
|
|
|
logVal.value = val |
|
|
|
logVisible.value = false |
|
|
@ -123,6 +146,16 @@ const showLogPicker = () => { |
|
|
|
logVisible.value = true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const timer = ref(null) |
|
|
|
onMounted(() => { |
|
|
|
timer.value = setInterval(() => { |
|
|
|
webSocketStore.sendCommandMsg(getStateJSON) |
|
|
|
}, 1000) |
|
|
|
}) |
|
|
|
onUnmounted(() => { |
|
|
|
timer.value = null |
|
|
|
}) |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
@ -285,6 +318,10 @@ const showLogPicker = () => { |
|
|
|
color: #9e9e9e; |
|
|
|
margin-bottom: 13px; |
|
|
|
} |
|
|
|
.time { |
|
|
|
text-align: center; |
|
|
|
padding: 10px; |
|
|
|
} |
|
|
|
.tube { |
|
|
|
width: 292px; |
|
|
|
height: 14px; |
|
|
|