From 5a711436b829fc0bb04d6de6fe2a620cb0b2edcc Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Thu, 22 Feb 2024 17:31:16 +0800 Subject: [PATCH] =?UTF-8?q?feat=20:=20=E9=A3=8E=E5=8E=8Becharts=E6=8C=89?= =?UTF-8?q?=E6=97=A5=E6=9C=88=E5=B9=B4=E7=9B=91=E6=8E=A7=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/content/airInfo/AirInfo.vue | 2 +- .../content/windPressure/WindPressureList.vue | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/content/airInfo/AirInfo.vue b/src/components/content/airInfo/AirInfo.vue index d022522..104b32f 100644 --- a/src/components/content/airInfo/AirInfo.vue +++ b/src/components/content/airInfo/AirInfo.vue @@ -127,7 +127,7 @@ const handleOpenChart = (id, type) => { const timeSelect = (index) => { if (index === 0) { - getChartInfo(openDialogId.value, 'year') + getChartInfo(openDialogId.value, 'years') } else if (index === 1) { getChartInfo(openDialogId.value, 'month') } else if (index === 2) { diff --git a/src/components/content/windPressure/WindPressureList.vue b/src/components/content/windPressure/WindPressureList.vue index 2f20f87..13fb77a 100644 --- a/src/components/content/windPressure/WindPressureList.vue +++ b/src/components/content/windPressure/WindPressureList.vue @@ -48,6 +48,7 @@ const props = defineProps({ loading: Number, }); const windSort = ref(1) +const windSortId = ref(1) const timeList = ref(["年", "月", "日"]); const selectTimeButton = ref(2); const isVisited = ref(false); @@ -68,10 +69,10 @@ watch(() => props.winData, (now) => { getScreenInfo(now.windPressureSensorList) }, {deep: true}); -const getWindInfo = (equipmentId) => { +const getWindInfo = (equipmentId,type='day') => { isVisited.value = true showLoading.value=true - getEchartsInfo(equipmentId).then(res => { + getEchartsInfo(equipmentId,type).then(res => { if (res?.code === 1000) { showLoading.value=false nextTick(() => { @@ -82,17 +83,18 @@ const getWindInfo = (equipmentId) => { } const handleOpenChart = (item) => { + selectTimeButton.value=2 getWindInfo(item.equipmentId) windSort.value = item.equipmentName + windSortId.value = item.equipmentId } const timeSelect = (index) => { - console.log('选择时间', index) if (index === 0) { - console.log('--年') + getWindInfo(windSortId.value,'years') } else if (index === 1) { - console.log('--月') + getWindInfo(windSortId.value,'month') } else if (index === 2) { - console.log('--日') + getWindInfo(windSortId.value,'day') } }; const getScreenInfo = (now) => {