From ebd00a770794ba12db83149a50c03f4e5109881f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com> Date: Tue, 12 Nov 2024 10:14:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BE=B9=E5=9D=A1echarts=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dialogs/RoadNetworkFacilities/data.js | 2 +- .../Dialogs/RoadNetworkFacilities/index.vue | 26 +++++++++++++++++-- .../components/roadNetwork/index.vue | 2 +- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/RoadNetworkFacilities/data.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/RoadNetworkFacilities/data.js index 67dc29f8..fb756924 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/RoadNetworkFacilities/data.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/RoadNetworkFacilities/data.js @@ -443,7 +443,7 @@ export const tabList = { gridColumn: "3", }, { - label: "车辆数", + label: "路管车辆", key: "vehicleCount", gridColumn: "3", }, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/RoadNetworkFacilities/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/RoadNetworkFacilities/index.vue index e904469e..43f8977b 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/RoadNetworkFacilities/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/RoadNetworkFacilities/index.vue @@ -296,11 +296,33 @@ export default { cseries1.push(e.data[0].value) cseries2.push(e.data[0].cum) }); + chartOption.xAxis.data = cdata; - chartOption.yAxis[0].name = title + '日计' - chartOption.yAxis[1].name = title + '累计' + chartOption.series[0].name = title + '日计'; + chartOption.series[1].name = title + '累计'; + chartOption.series[0].data = cseries1; chartOption.series[1].data = cseries2; +// 假设 chartOption 已经初始化 + chartOption.tooltip = { + trigger: 'axis', + axisPointer: { + type: 'cross' + }, + formatter: function (params) { + console.log('Params:', params); // 调试信息 + let tooltipText = `