@@ -157,39 +157,19 @@ export default {
},
bindCharts(){
const today = moment().format('YYYY-MM-DD')
- request({
- url: '/business/traffic-statistics/history/realTimeTrafficFlow',
- method: 'get',
- params: {
- startDate: today,
- periodType: 4,
- direction: 1
- }
- }).then(res1=>{
+
request({
- url: '/business/traffic-statistics/history/realTimeTrafficFlow',
+ url: '/business/traffic-statistics/history/trafficFlowAtTollTypes',
method: 'get',
params: {
startDate: today,
- periodType: 4,
- direction: 3
}
}).then(res3=>{
// totalPassengerFlow 客车 typeSpecialVehicleFlow//特种车 typeTruckFlow 其他
let total = 0, p0 = 0, p1=0,p2=0,_p0 = 0, _p1=0,_p2=0;
- res1.data.forEach(x=>{
- total+=(x.totalPassengerFlow+x.typeTruckFlow+x.typeSpecialVehicleFlow)
- p0 += x.totalPassengerFlow
- p1 += x.typeSpecialVehicleFlow
- p2 += x.typeTruckFlow
- })
- res3.data.forEach(x=>{
-
- total+=(x.totalPassengerFlow+x.typeTruckFlow+x.typeSpecialVehicleFlow)
- p0 += x.totalPassengerFlow
- p1 += x.typeSpecialVehicleFlow
- p2 += x.typeTruckFlow
- })
+ total+=(res3.data.bus +res3.data.truck)
+ p0 += res3.data.bus
+ p1 += res3.data.truck
if(total > 0){
_p0 = parseFloat((p0/total*100).toFixed(1))
@@ -216,7 +196,7 @@ export default {
myChart3.setOption(otherStatistics);
})
- })
+
},
bindTrafficIncident(){
// 预警事件
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/js/carStatistics.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/js/carStatistics.js
index 8dd2cefd..8c98c0ca 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/js/carStatistics.js
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/js/carStatistics.js
@@ -98,7 +98,7 @@ var carStatistics = {
},
detail: {
formatter: function (params) {
- return `{cn|}\n{number|${params + "%"}\n}{wcl|小客车}`;
+ return `{cn|}\n{number|${params + "%"}\n}{wcl|客车}`;
},
rich: {
fontFamily: "PangMenZhengDao-Regular",
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/js/focusStatistics.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/js/focusStatistics.js
index dc9abc30..f2ab3780 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/js/focusStatistics.js
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/js/focusStatistics.js
@@ -98,7 +98,7 @@ var focusStatistics = {
},
detail: {
formatter: function (params) {
- return `{cn|}\n{number|${params + "%"}\n}{wcl|重点车辆}`;
+ return `{cn|}\n{number|${params + "%"}\n}{wcl|货车}`;
},
rich: {
fontFamily: "PangMenZhengDao-Regular",
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/analysis/real/charts.js b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/analysis/real/charts.js
index 36de7582..598927fb 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/analysis/real/charts.js
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/analysis/real/charts.js
@@ -5,14 +5,15 @@ var options = {
confine:true,
trigger: "axis",
formatter: (params) => {
-
- let name = params[0].name.replace(/-/g, "")
- let name1 = name+'-济南'
- let name2 = name+'-菏泽'
+ // 获取第一个参数的名称并按 '-' 分割
+ let parts = params[0].name.split('-');
+ // let name = params[0].name.replace(/-/g, "")
+ let name1 = parts[0]+"-"+parts[1]+'-济南'
+ let name2 = parts[1]+"-"+parts[0]+'-菏泽'
if(params[0].axisIndex === 1){
- name1 = name+'-菏泽'
- name2 = name+'-济南'
- }
+ name1 = parts[0]+"-"+parts[1]+'-菏泽'
+ name2 = parts[1]+"-"+parts[0]+'-济南'
+ }
return `${name1}
${params[0].marker}${params[0].seriesName}:
${params[0].value} 辆
@@ -48,13 +49,13 @@ var options = {
itemStyle: {
color: '#6DBBFB'
}
-
+
},{
name: "去年同期",
itemStyle: {
color: '#5FA52B'
}
-
+
},
],
},
@@ -312,7 +313,7 @@ var options = {
},
},
data: [
- 195,25, 194, 94, 94, 7, 25, 194, 94, 94, 74, 21, 67, 36, 56, 195, 4, 21,
+ 195,25, 194, 94, 94, 7, 25, 194, 94, 94, 74, 21, 67, 36, 56, 195, 4, 21,
],
},
],
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/analysis/real/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/analysis/real/index.vue
index e2555bf2..e38b3826 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/analysis/real/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/analysis/real/index.vue
@@ -78,9 +78,31 @@ export default {
url: '/business/traffic-statistics/history/realTimeTrafficFlowHour',
method: 'get'
}).then(res=>{
- const xAxis = res.data["1"].map(x=>x.name);
- chartOptions.xAxis[0].data = xAxis;
- chartOptions.xAxis[1].data = xAxis;
+ const data = res.data["1"];
+ const xAxis = data.map(item => {
+ const parts = item.name.split('-');
+ if (parts.length > 1) {
+ return { value: item.name, name: `${parts[0]}\n${parts.slice(1).join('-')}` };
+ } else {
+ return { value: item.name, name: item.name };
+ }
+ });
+ chartOptions.xAxis[0].data = xAxis.map(x => x.value);
+ chartOptions.xAxis[1].data = xAxis.map(x => x.value);
+
+ chartOptions.xAxis.forEach(axis => {
+ axis.axisLabel = {
+ ...axis.axisLabel,
+ formatter: function(value) {
+ const parts = value.split('-');
+ if (parts.length > 1) {
+ return `${parts[0]}\n${parts.slice(1).join('-')}`;
+ } else {
+ return value;
+ }
+ }
+ };
+ });
// 1今年菏泽 2今年济南 3去年菏泽 4去年济南
chartOptions.series[0].data = res.data['2'].map(x=>x.totalFlow)
chartOptions.series[1].data = res.data['4'].map(x=>x.totalFlow)
From a8ce3521dd7106042e93a6f5e5112ca97e421a95 Mon Sep 17 00:00:00 2001
From: lau572 <1010031226@qq.com>
Date: Thu, 26 Dec 2024 13:59:54 +0800
Subject: [PATCH 4/9] =?UTF-8?q?=E4=B8=80=E7=B1=BB=E4=BA=A4=E8=B0=83?=
=?UTF-8?q?=E7=AB=99=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../trafficSurvey/comprehensiveQuery/data.js | 13 +-
.../comprehensiveQuery/index.vue | 288 +++++++++++++++++-
.../comprehensiveQuery/tableCharts.js | 84 +++++
3 files changed, 363 insertions(+), 22 deletions(-)
create mode 100644 ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSurvey/comprehensiveQuery/tableCharts.js
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSurvey/comprehensiveQuery/data.js b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSurvey/comprehensiveQuery/data.js
index 6f7ea01a..57b615d5 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSurvey/comprehensiveQuery/data.js
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSurvey/comprehensiveQuery/data.js
@@ -86,22 +86,19 @@ export const searchFormList = [
label: "方向:",
key: "direction",
type: "RadioGroup",
+ required: true,
isAlone: true,
- default:'',
+ default:'1',
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "1",
- label: "菏泽",
- },
- {
- key: "3",
- label: "济南",
+ label: "分方向",
},
{
- key: "",
- label: "双向",
+ key: "2",
+ label: "不分方向",
}
],
},
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSurvey/comprehensiveQuery/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSurvey/comprehensiveQuery/index.vue
index fb463558..889e61ff 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSurvey/comprehensiveQuery/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSurvey/comprehensiveQuery/index.vue
@@ -33,7 +33,11 @@
From fdc951a0e38fb824bd416662af5f41b95127fe0f Mon Sep 17 00:00:00 2001
From: lau572 <1010031226@qq.com>
Date: Mon, 17 Feb 2025 15:06:44 +0800
Subject: [PATCH 9/9] =?UTF-8?q?=E4=B8=80=E7=B1=BB=E4=BA=A4=E8=B0=83?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ruoyi-ui/src/common/menuData.js | 7 +-
.../pages/perception/trafficFlow/index.vue | 5 --
.../trafficSurvey/comprehensiveQuery/data.js | 89 ++++++++++++++++---
.../comprehensiveQuery/index.vue | 83 ++++++++++++-----
.../survey/charts.js | 0
.../survey/data.js | 41 ++++++++-
.../survey/index.vue | 28 ++++--
7 files changed, 200 insertions(+), 53 deletions(-)
rename ruoyi-ui/src/views/JiHeExpressway/pages/perception/{trafficFlow => trafficSurvey}/survey/charts.js (100%)
rename ruoyi-ui/src/views/JiHeExpressway/pages/perception/{trafficFlow => trafficSurvey}/survey/data.js (54%)
rename ruoyi-ui/src/views/JiHeExpressway/pages/perception/{trafficFlow => trafficSurvey}/survey/index.vue (93%)
diff --git a/ruoyi-ui/src/common/menuData.js b/ruoyi-ui/src/common/menuData.js
index 3350a8c7..3638d98f 100644
--- a/ruoyi-ui/src/common/menuData.js
+++ b/ruoyi-ui/src/common/menuData.js
@@ -55,10 +55,15 @@ export default [
name: "siteAdministration",
component: "perception/trafficSurvey/siteAdministration/index.vue",
}, {
- title: "综合查询",
+ title: "站点查询",
path: "/perception/trafficSurvey/comprehensiveQuery",
name: "comprehensiveQuery",
component: "perception/trafficSurvey/comprehensiveQuery/index.vue",
+ }, {
+ title: "综合查询",
+ path: "/perception/trafficSurvey/survey",
+ name: "survey",
+ component: "perception/trafficSurvey/survey/index.vue",
}
]
}
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/index.vue
index 1348c815..da9aed4e 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/index.vue
@@ -7,9 +7,6 @@