|
|
@ -17,7 +17,7 @@ |
|
|
|
v-if="tabType == 1" |
|
|
|
@click="stopAdd" |
|
|
|
> |
|
|
|
暂停加液 |
|
|
|
停止加液 |
|
|
|
</div> |
|
|
|
<div |
|
|
|
:class="isAddLiquidStatus ? 'btn' : 'btn active'" |
|
|
@ -26,7 +26,18 @@ |
|
|
|
> |
|
|
|
开始加液 |
|
|
|
</div> |
|
|
|
<div class="btn active" v-if="tabType == 2" @click="startTabLiquid"> |
|
|
|
<div |
|
|
|
:class="isPopLiquidStatus ? 'btn mr active' : 'btn mr '" |
|
|
|
v-if="tabType == 2" |
|
|
|
@click="stopPop" |
|
|
|
> |
|
|
|
停止排液 |
|
|
|
</div> |
|
|
|
<div |
|
|
|
:class="isPopLiquidStatus ? 'btn' : 'btn active'" |
|
|
|
v-if="tabType == 2" |
|
|
|
@click="startTabLiquid" |
|
|
|
> |
|
|
|
开始排液 |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -61,6 +72,8 @@ |
|
|
|
<LiquidModal |
|
|
|
v-if="tabType == 2 && tipModalVisible" |
|
|
|
:hideTabLiquid="hideTabLiquid" |
|
|
|
:startPopFlag="startPopFlag" |
|
|
|
:isPopLiquidStatus="isPopLiquidStatus" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</template> |
|
|
@ -73,6 +86,7 @@ import { storeToRefs } from 'pinia' |
|
|
|
import { |
|
|
|
startReplenishingFluidsJSON, |
|
|
|
stopReplenishingFluidsJSON, |
|
|
|
stopDrainingJSON, |
|
|
|
} from '@/mock/command' |
|
|
|
|
|
|
|
const props = defineProps({ |
|
|
@ -86,19 +100,37 @@ const tipModalVisible = ref(false) |
|
|
|
const webSocketStore = useWebSocketStore() |
|
|
|
|
|
|
|
const isAddLiquidStatus = ref(false) |
|
|
|
const isPopLiquidStatus = ref(false) |
|
|
|
|
|
|
|
const startAdd = () => { |
|
|
|
isAddLiquidStatus.value = true |
|
|
|
webSocketStore.sendCommandMsg(startReplenishingFluidsJSON) |
|
|
|
if (!isAddLiquidStatus.value) { |
|
|
|
isAddLiquidStatus.value = true |
|
|
|
webSocketStore.sendCommandMsg(startReplenishingFluidsJSON) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const stopAdd = () => { |
|
|
|
isAddLiquidStatus.value = false |
|
|
|
webSocketStore.sendCommandMsg(stopReplenishingFluidsJSON) |
|
|
|
if (isAddLiquidStatus.value) { |
|
|
|
isAddLiquidStatus.value = false |
|
|
|
webSocketStore.sendCommandMsg(stopReplenishingFluidsJSON) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const stopPop = () => { |
|
|
|
if (isPopLiquidStatus.value) { |
|
|
|
webSocketStore.sendCommandMsg(stopDrainingJSON) |
|
|
|
isPopLiquidStatus.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const startPopFlag = () => { |
|
|
|
isPopLiquidStatus.value = true |
|
|
|
} |
|
|
|
|
|
|
|
const startTabLiquid = () => { |
|
|
|
tipModalVisible.value = true |
|
|
|
if (!isPopLiquidStatus.value) { |
|
|
|
tipModalVisible.value = true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const formatter = value => { |
|
|
|