From f373e0c0797e1800bf066fdfbb748bb9242230f6 Mon Sep 17 00:00:00 2001 From: wangjuncheng <1> Date: 星期二, 08 七月 2025 17:46:02 +0800 Subject: [PATCH] 泥位计 --- src/components/monifangzhen/WaterDepthContent.vue | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/monifangzhen/WaterDepthContent.vue b/src/components/monifangzhen/WaterDepthContent.vue index c7cfe2f..1f6ea95 100644 --- a/src/components/monifangzhen/WaterDepthContent.vue +++ b/src/components/monifangzhen/WaterDepthContent.vue @@ -7,7 +7,10 @@ <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> @@ -38,7 +41,9 @@ const simStore = useSimStore(); const { currentInfo } = storeToRefs(simStore); - +const deviceName = computed(() => { + return currentInfo.value?.deviceName; +}); // 鍥捐〃 DOM 寮曠敤 const chartDom = ref(null); let myChart = null; @@ -96,7 +101,6 @@ 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); -- Gitblit v1.9.3