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) => {