feat : 风压echarts按日月年监控数据

This commit is contained in:
2024-02-22 17:31:16 +08:00
parent 3a23b467ec
commit 5a711436b8
2 changed files with 9 additions and 7 deletions

View File

@@ -127,7 +127,7 @@ const handleOpenChart = (id, type) => {
const timeSelect = (index) => { const timeSelect = (index) => {
if (index === 0) { if (index === 0) {
getChartInfo(openDialogId.value, 'year') getChartInfo(openDialogId.value, 'years')
} else if (index === 1) { } else if (index === 1) {
getChartInfo(openDialogId.value, 'month') getChartInfo(openDialogId.value, 'month')
} else if (index === 2) { } else if (index === 2) {

View File

@@ -48,6 +48,7 @@ const props = defineProps({
loading: Number, loading: Number,
}); });
const windSort = ref(1) const windSort = ref(1)
const windSortId = ref(1)
const timeList = ref(["年", "月", "日"]); const timeList = ref(["年", "月", "日"]);
const selectTimeButton = ref(2); const selectTimeButton = ref(2);
const isVisited = ref(false); const isVisited = ref(false);
@@ -68,10 +69,10 @@ watch(() => props.winData, (now) => {
getScreenInfo(now.windPressureSensorList) getScreenInfo(now.windPressureSensorList)
}, {deep: true}); }, {deep: true});
const getWindInfo = (equipmentId) => { const getWindInfo = (equipmentId,type='day') => {
isVisited.value = true isVisited.value = true
showLoading.value=true showLoading.value=true
getEchartsInfo(equipmentId).then(res => { getEchartsInfo(equipmentId,type).then(res => {
if (res?.code === 1000) { if (res?.code === 1000) {
showLoading.value=false showLoading.value=false
nextTick(() => { nextTick(() => {
@@ -82,17 +83,18 @@ const getWindInfo = (equipmentId) => {
} }
const handleOpenChart = (item) => { const handleOpenChart = (item) => {
selectTimeButton.value=2
getWindInfo(item.equipmentId) getWindInfo(item.equipmentId)
windSort.value = item.equipmentName windSort.value = item.equipmentName
windSortId.value = item.equipmentId
} }
const timeSelect = (index) => { const timeSelect = (index) => {
console.log('选择时间', index)
if (index === 0) { if (index === 0) {
console.log('--年') getWindInfo(windSortId.value,'years')
} else if (index === 1) { } else if (index === 1) {
console.log('--月') getWindInfo(windSortId.value,'month')
} else if (index === 2) { } else if (index === 2) {
console.log('--日') getWindInfo(windSortId.value,'day')
} }
}; };
const getScreenInfo = (now) => { const getScreenInfo = (now) => {