Browse Source

缓冲

master
maochaoying 2 years ago
parent
commit
7a7951325b
  1. 42
      src/components/Operator.vue
  2. 12
      src/components/PreSetting.vue
  3. 1
      src/components/dialogs/DisinfectModal.vue
  4. 10
      src/store/modules/operator.js
  5. 2
      src/store/modules/user.js
  6. 5
      src/store/modules/websocket.js

42
src/components/Operator.vue

@ -436,6 +436,22 @@
v-if="disinfectWarnVisible"
:hideDisinfectModal="hideDisinfectModal"
/>
<van-overlay :show="operatorStore.showStartReady" z-index="3">
<div class="wrapper" @click.stop>
<div class="block">
<van-loading />
<p class="shutdown_text">准备消毒中</p>
</div>
</div>
</van-overlay>
<van-overlay :show="operatorStore.showStopReady" z-index="3">
<div class="wrapper" @click.stop>
<div class="block">
<van-loading />
<p class="shutdown_text">结束消毒中</p>
</div>
</div>
</van-overlay>
</div>
</template>
@ -520,6 +536,7 @@ const startDisinfect = () => {
//
//
// preVisible.value = true
operatorStore.updateShowStartReady(true)
realStart()
}
@ -769,4 +786,29 @@ onUnmounted(() => {
}
}
}
.wrapper {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.block {
width: 120px;
height: 120px;
display: flex;
flex-direction: column;
padding: 16px;
align-items: center;
justify-content: center;
.shutdown_text {
margin-top: 24px;
font-family: Source Han Sans CN;
font-size: 18px;
font-weight: normal;
line-height: normal;
letter-spacing: 0.06em;
color: #fff;
white-space: nowrap;
}
}
</style>

12
src/components/PreSetting.vue

@ -91,6 +91,12 @@
/>
</p>
</div>
<div class="row_wrap">
<p class="title">Log等级</p>
<div class="num">
<p class="log">6</p>
</div>
</div>
<!-- <div class="row_wrap" v-if="operatorStore.disinfectStatus != 1">
<p class="title">允许消毒最大湿度(%RH)</p>
<p class="num">
@ -727,6 +733,12 @@ const setSprayLiquidVal = () => {
color: #000000;
display: flex;
align-items: center;
.log {
width: 182px;
display: flex;
align-items: center;
justify-content: center;
}
}
.btn {
width: 87px;

1
src/components/dialogs/DisinfectModal.vue

@ -47,6 +47,7 @@ const handleCancel = () => {
const handleStart = () => {
if ([1, 2].includes(operatorStore.disinfectStatus)) {
operatorStore.updateStopReady(true)
webSocketStore.sendCommandMsg(stopDisinfectionJSON)
props.hideDisinfectModal()
}

10
src/store/modules/operator.js

@ -13,10 +13,20 @@ export const useOperatorStore = defineStore({
// 是否预热
preHeat: false,
preHeatRaminTimeS: 0,
// 准备消毒loading
showStartReady: false,
// 结束消毒loading
showStopReady: false,
}
},
// actions
actions: {
updateStopReady(showStopReady) {
this.showStopReady = showStopReady
},
updateShowStartReady(showStartReady) {
this.showStartReady = showStartReady
},
updatePreHeatRaminTimeS(preHeatRaminTimeS) {
this.preHeatRaminTimeS = preHeatRaminTimeS
},

2
src/store/modules/user.js

@ -7,7 +7,7 @@ export const useUserStore = defineStore({
allUserList: [],
operUser: '',
loginUser: '',
loginUserPermission: 3,
loginUserPermission: 2,
}
},
// actions

5
src/store/modules/websocket.js

@ -76,6 +76,11 @@ export const useWebSocketStore = defineStore({
waterImmersionSensor1,
waterImmersionSensor2,
} = sensor_data
if (disinfectionWorkState != 0) {
operatorStore.updateShowStartReady(false)
} else {
operatorStore.updateStopReady(false)
}
operatorStore.updateDrainingWorkState(drainingWorkState)
operatorStore.updateReplenishingFluidsWorkState(
replenishingFluidsWorkState,

Loading…
Cancel
Save