| | |
| | | <div v-else> |
| | | <div class="location-info"> |
| | | <h3>位置信息</h3> |
| | | <p class="coordinates"> |
| | | <p v-if="deviceName" class="coordinates"> |
| | | {{ deviceName }} |
| | | </p> |
| | | <p v-if="!deviceName" class="coordinates"> |
| | | 经度: <strong>{{ safeCurrentInfo.longitude.toFixed(3) }} </strong> |
| | | 纬度:<strong>{{ safeCurrentInfo.latitude.toFixed(3) }}</strong> |
| | | </p> |
| | |
| | | |
| | | const simStore = useSimStore(); |
| | | const { currentInfo } = storeToRefs(simStore); |
| | | |
| | | const deviceName = computed(() => { |
| | | return currentInfo.value?.deviceName; |
| | | }); |
| | | // 图表 DOM 引用 |
| | | const chartDom = ref(null); |
| | | let myChart = null; |
| | |
| | | async function fetchDataAndUpdateChart(chart) { |
| | | const info = currentInfo.value; |
| | | if (!info || showSelectPrompt.value || !chartDom.value) return; |
| | | |
| | | const { longitude, latitude, serviceInfo } = info; |
| | | const result = await getFlowRateInfo(longitude, latitude, serviceInfo); |
| | | |