feat 数据流模拟
This commit is contained in:
@@ -1,27 +1,23 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { useCurrentProject } from '@/composables/useCurrentProject'
|
||||
import { useRtkLive } from '@/composables/useRtkLive'
|
||||
|
||||
interface Props {
|
||||
deviceName?: string
|
||||
speed?: number
|
||||
frequency?: number
|
||||
amplitude?: number
|
||||
rtkFixed?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
deviceName: '徐工XS65H #01',
|
||||
speed: 4.2,
|
||||
frequency: 28.5,
|
||||
amplitude: 1.86,
|
||||
rtkFixed: true,
|
||||
})
|
||||
|
||||
const { hasCurrentProject } = useCurrentProject()
|
||||
const { speedTextSpaced } = useRtkLive()
|
||||
|
||||
const displayDeviceName = computed(() => (hasCurrentProject.value ? props.deviceName : '--'))
|
||||
const displaySpeed = computed(() => (hasCurrentProject.value ? `${props.speed} km/h` : '--'))
|
||||
const displaySpeed = computed(() => (hasCurrentProject.value ? speedTextSpaced.value : '--'))
|
||||
const displayStatusText = computed(() => (hasCurrentProject.value ? '实时监测中' : '--'))
|
||||
const displayRtkText = computed(() => (hasCurrentProject.value ? 'RTK固定' : '--'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user