gnss-tool-kit/src/render/components/CenterCmp.vue

170 lines
3.4 KiB
Vue

<template>
<div class="center-cmp">
<div class="cc-header">
<Decoration1 style="width:200px;height:50px;" />
<div>监测到卫星总数</div>
<Decoration1 style="width:200px;height:50px;" />
</div>
<div class="cc-details">
<div
class="card"
v-for="(s, i) in count_str_arr"
:key="`count-${i}`">
{{ s }}
</div>
</div>
<div class="cc-main-container">
<div class="ccmc-left">
<div class="station-info">
 北 斗<span>{{ bd_satellite_count }}</span>
</div>
<div class="station-info">
Galileo<span>{{ ga_satellite_count }}</span>
</div>
</div>
<div class="ccmc-middle">
<Ring ref="ring"/>
</div>
<div class="ccmc-right">
<div class="station-info">
<span>{{ gp_satellite_count }}</span>G P S
</div>
<div class="station-info">
<span>{{ gl_satellite_count }}</span>GLONASS
</div>
</div>
</div>
</div>
</template>
<script lang="ts" setup>
import Ring from './Ring.vue'
import Decoration1 from './Layout/Decoration1.vue'
import Decoration5 from './Layout/Decoration5.vue'
import { ref, computed } from 'vue'
const bd_satellite_count = ref(0)
const gp_satellite_count = ref(0)
const gl_satellite_count = ref(0)
const ga_satellite_count = ref(0)
const count_str_arr = computed(() => {
return (bd_satellite_count.value + gp_satellite_count.value + gl_satellite_count.value + ga_satellite_count.value).toString().split('')
})
const ring = ref(null)
const update = (bd_satellite_length: number, gp_satellite_length: number, gl_satellite_length: number, ga_satellite_length: number) => {
bd_satellite_count.value = bd_satellite_length
gp_satellite_count.value = gp_satellite_length
gl_satellite_count.value = gl_satellite_length
ga_satellite_count.value = ga_satellite_length
ring.value.update(bd_satellite_length, gp_satellite_length, gl_satellite_length, ga_satellite_length)
}
defineExpose({ update })
</script>
<style scoped>
.center-cmp {
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
display: flex;
flex-direction: column;
}
.cc-header {
height: 125px;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 30px;
}
.cc-details {
height: 120px;
display: flex;
justify-content: center;
font-size: 32px;
align-items: center;
}
.cc-details .card {
background-color: rgba(4,49,128,.6);
color: #08e5ff;
height: 100px;
width: 100px;
font-size: 65px;
font-weight: bold;
line-height: 100px;
text-align: center;
margin: 10px;
}
.cc-main-container {
position: relative;
flex: 1;
display: flex;
}
.ccmc-middle {
width: 50%;
}
.active-ring-name {
font-size: 20px !important;
}
.ccmc-left, .ccmc-right {
width: 25%;
display: flex;
flex-direction: column;
justify-content: center;
font-size: 24px;
}
.ccmc-left span, .ccmc-right span {
font-size: 30px;
font-weight: bold;
}
.ccmc-left .station-info, .ccmc-right .station-info {
height: 80px;
display: flex;
align-items: center;
}
.ccmc-left {
align-items: flex-end;
}
.ccmc-left span {
margin-left: 10px;
}
.ccmc-right {
align-items: flex-start;
}
.ccmc-right span {
margin-right: 10px;
}
.label-tag {
position: absolute;
width: 500px;
height: 30px;
bottom: 10px;
left: 50%;
transform: translateX(-50%);
}
</style>