|
@ -12,13 +12,25 @@ |
|
|
/> |
|
|
/> |
|
|
<p class="title">设置加液</p> |
|
|
<p class="title">设置加液</p> |
|
|
</div> |
|
|
</div> |
|
|
<div class="btn mr" v-if="tabType == 1">暂停加液</div> |
|
|
|
|
|
<div class="btn active" v-if="tabType == 1">开始加液</div> |
|
|
|
|
|
|
|
|
<div |
|
|
|
|
|
:class="isAddLiquidStatus ? 'btn mr active' : 'btn mr '" |
|
|
|
|
|
v-if="tabType == 1" |
|
|
|
|
|
@click="stopAdd" |
|
|
|
|
|
> |
|
|
|
|
|
暂停加液 |
|
|
|
|
|
</div> |
|
|
|
|
|
<div |
|
|
|
|
|
:class="isAddLiquidStatus ? 'btn' : 'btn active'" |
|
|
|
|
|
v-if="tabType == 1" |
|
|
|
|
|
@click="startAdd" |
|
|
|
|
|
> |
|
|
|
|
|
开始加液 |
|
|
|
|
|
</div> |
|
|
<div class="btn active" v-if="tabType == 2" @click="startTabLiquid"> |
|
|
<div class="btn active" v-if="tabType == 2" @click="startTabLiquid"> |
|
|
开始排液 |
|
|
开始排液 |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="add_liquid"> |
|
|
|
|
|
|
|
|
<!-- <div class="add_liquid"> |
|
|
<svg |
|
|
<svg |
|
|
xmlns="http://www.w3.org/2000/svg" |
|
|
xmlns="http://www.w3.org/2000/svg" |
|
|
xmlns:xlink="http://www.w3.org/1999/xlink" |
|
|
xmlns:xlink="http://www.w3.org/1999/xlink" |
|
@ -37,7 +49,7 @@ |
|
|
</g> |
|
|
</g> |
|
|
</svg> |
|
|
</svg> |
|
|
<p class="text">{{ tabType == 1 ? '加液完成' : '排液完成' }}</p> |
|
|
<p class="text">{{ tabType == 1 ? '加液完成' : '排液完成' }}</p> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> --> |
|
|
<div class="chart"> |
|
|
<div class="chart"> |
|
|
<div |
|
|
<div |
|
|
class="liquid_column" |
|
|
class="liquid_column" |
|
@ -55,22 +67,44 @@ |
|
|
|
|
|
|
|
|
<script setup> |
|
|
<script setup> |
|
|
import LiquidModal from './dialogs/LiquidModal.vue' |
|
|
import LiquidModal from './dialogs/LiquidModal.vue' |
|
|
import { useDeviceStore } from '@/store' |
|
|
|
|
|
|
|
|
import { useDeviceStore, useWebSocketStore } from '@/store' |
|
|
import { ref } from 'vue' |
|
|
import { ref } from 'vue' |
|
|
import { storeToRefs } from 'pinia' |
|
|
import { storeToRefs } from 'pinia' |
|
|
|
|
|
import { |
|
|
|
|
|
startReplenishingFluidsJSON, |
|
|
|
|
|
stopReplenishingFluidsJSON, |
|
|
|
|
|
} from '@/mock/command' |
|
|
|
|
|
|
|
|
const props = defineProps({ |
|
|
const props = defineProps({ |
|
|
tabType: { |
|
|
tabType: { |
|
|
type: Number, |
|
|
type: Number, |
|
|
}, |
|
|
}, |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
const addLiquidVal = ref(0) |
|
|
const addLiquidVal = ref(0) |
|
|
const tipModalVisible = ref(false) |
|
|
const tipModalVisible = ref(false) |
|
|
|
|
|
const webSocketStore = useWebSocketStore() |
|
|
|
|
|
|
|
|
|
|
|
const isAddLiquidStatus = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
const startAdd = () => { |
|
|
|
|
|
isAddLiquidStatus.value = true |
|
|
|
|
|
webSocketStore.sendCommandMsg(startReplenishingFluidsJSON) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const stopAdd = () => { |
|
|
|
|
|
isAddLiquidStatus.value = false |
|
|
|
|
|
webSocketStore.sendCommandMsg(stopReplenishingFluidsJSON) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const startTabLiquid = () => { |
|
|
const startTabLiquid = () => { |
|
|
tipModalVisible.value = true |
|
|
tipModalVisible.value = true |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const formatter = value => { |
|
|
const formatter = value => { |
|
|
|
|
|
if (value > 500) { |
|
|
|
|
|
return '500/g' |
|
|
|
|
|
} |
|
|
if (value != 0) { |
|
|
if (value != 0) { |
|
|
var newVal = value.replace(/\b(0+)/gi, '') |
|
|
var newVal = value.replace(/\b(0+)/gi, '') |
|
|
return newVal + '/g' |
|
|
return newVal + '/g' |
|
|