|
@ -14,18 +14,23 @@ |
|
|
|
|
|
|
|
|
<script setup> |
|
|
<script setup> |
|
|
import * as echarts from 'echarts' |
|
|
import * as echarts from 'echarts' |
|
|
import { ref, onMounted } from 'vue' |
|
|
|
|
|
|
|
|
import { ref, onMounted, onBeforeUnmount } from 'vue' |
|
|
import SealPng from '@/assets/img/seal/seal.png' |
|
|
import SealPng from '@/assets/img/seal/seal.png' |
|
|
import StartAir from '@/assets/img/seal/start.png' |
|
|
import StartAir from '@/assets/img/seal/start.png' |
|
|
import StopAir from '@/assets/img/seal/stop.png' |
|
|
import StopAir from '@/assets/img/seal/stop.png' |
|
|
import DisStart from '@/assets/img/seal/dis_start.png' |
|
|
import DisStart from '@/assets/img/seal/dis_start.png' |
|
|
import DisStop from '@/assets/img/seal/dis_stop.png' |
|
|
import DisStop from '@/assets/img/seal/dis_stop.png' |
|
|
|
|
|
import { useSealStore } from '@/store' |
|
|
|
|
|
|
|
|
|
|
|
const sealStore = useSealStore() |
|
|
|
|
|
|
|
|
const sealCharts = ref(null) |
|
|
const sealCharts = ref(null) |
|
|
const sealOptions = ref({ |
|
|
const sealOptions = ref({ |
|
|
series: [ |
|
|
series: [ |
|
|
{ |
|
|
{ |
|
|
type: 'gauge', |
|
|
type: 'gauge', |
|
|
|
|
|
min: 0, |
|
|
|
|
|
max: 800, |
|
|
progress: { |
|
|
progress: { |
|
|
show: true, |
|
|
show: true, |
|
|
width: 18, |
|
|
width: 18, |
|
@ -79,16 +84,87 @@ const sealOptions = ref({ |
|
|
}, |
|
|
}, |
|
|
data: [ |
|
|
data: [ |
|
|
{ |
|
|
{ |
|
|
value: 68, |
|
|
|
|
|
|
|
|
value: sealStore.currentAirPressure, |
|
|
}, |
|
|
}, |
|
|
], |
|
|
], |
|
|
}, |
|
|
}, |
|
|
], |
|
|
], |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const timer = ref(null) |
|
|
|
|
|
onBeforeUnmount(() => { |
|
|
|
|
|
timer.value = null |
|
|
|
|
|
}) |
|
|
onMounted(() => { |
|
|
onMounted(() => { |
|
|
sealCharts.value = echarts.init(document.getElementById('seal_echarts')) |
|
|
sealCharts.value = echarts.init(document.getElementById('seal_echarts')) |
|
|
sealCharts.value.setOption(sealOptions.value) |
|
|
sealCharts.value.setOption(sealOptions.value) |
|
|
|
|
|
timer.value = setInterval(() => { |
|
|
|
|
|
sealCharts.value.setOption({ |
|
|
|
|
|
series: [ |
|
|
|
|
|
{ |
|
|
|
|
|
type: 'gauge', |
|
|
|
|
|
min: 0, |
|
|
|
|
|
max: 800, |
|
|
|
|
|
progress: { |
|
|
|
|
|
show: true, |
|
|
|
|
|
width: 18, |
|
|
|
|
|
itemStyle: { |
|
|
|
|
|
color: '#3442aa', |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
pointer: { |
|
|
|
|
|
itemStyle: { |
|
|
|
|
|
color: '#3442aa', |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
axisLine: { |
|
|
|
|
|
lineStyle: { |
|
|
|
|
|
width: 18, |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
axisTick: { |
|
|
|
|
|
show: false, |
|
|
|
|
|
}, |
|
|
|
|
|
splitLine: { |
|
|
|
|
|
length: 15, |
|
|
|
|
|
lineStyle: { |
|
|
|
|
|
width: 2, |
|
|
|
|
|
color: '#999', |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
axisLabel: { |
|
|
|
|
|
distance: 25, |
|
|
|
|
|
color: '#999', |
|
|
|
|
|
fontSize: 20, |
|
|
|
|
|
}, |
|
|
|
|
|
anchor: { |
|
|
|
|
|
show: true, |
|
|
|
|
|
showAbove: true, |
|
|
|
|
|
size: 25, |
|
|
|
|
|
itemStyle: { |
|
|
|
|
|
borderWidth: 10, |
|
|
|
|
|
borderColor: '#3442aa', |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
title: { |
|
|
|
|
|
show: false, |
|
|
|
|
|
}, |
|
|
|
|
|
detail: { |
|
|
|
|
|
valueAnimation: true, |
|
|
|
|
|
fontSize: 40, |
|
|
|
|
|
color: '#3442aa', |
|
|
|
|
|
formatter: '{value} KPa', |
|
|
|
|
|
offsetCenter: [0, '70%'], |
|
|
|
|
|
}, |
|
|
|
|
|
data: [ |
|
|
|
|
|
{ |
|
|
|
|
|
value: sealStore.currentAirPressure, |
|
|
|
|
|
}, |
|
|
|
|
|
], |
|
|
|
|
|
}, |
|
|
|
|
|
], |
|
|
|
|
|
}) |
|
|
|
|
|
}, 1000) |
|
|
}) |
|
|
}) |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|