From 9d93b4076d9449b45966cd937f0e38d718d02dff Mon Sep 17 00:00:00 2001 From: LiuJiaNan <15703339975@163.com> Date: Fri, 21 Aug 2026 16:42:55 +0800 Subject: [PATCH] =?UTF-8?q?feat(biStatistics):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E4=B8=8E=E8=BD=A6=E8=BE=86=E5=87=BA=E5=85=A5?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=8E=A5=E5=8F=A3=E5=B9=B6=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=85=A5=E5=8F=A3=E5=87=BA=E8=B6=8B=E5=8A=BF=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 getScreenPersonInOutStat 和 getScreenVehicleInOutStat 请求接口 - 入口出趋势面板根据选中索引动态加载人员或车辆出入数据 - 替换旧接口调用,支持人员和车辆出入数据的异步请求 - 优化加载状态显示,使用人员及车辆出入统计的加载状态控制Spin组件 - 调整数据加载参数及销毁图表逻辑,提升组件复用性和性能 --- src/api/biStatistics/index.js | 8 ++++++++ .../branchOffice/MenJin/EntryExitTrendPanel/index.js | 12 +++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/api/biStatistics/index.js b/src/api/biStatistics/index.js index 6153824..bcae474 100644 --- a/src/api/biStatistics/index.js +++ b/src/api/biStatistics/index.js @@ -216,3 +216,11 @@ export const getScreenPortPersonVehicleStat = declareRequest( "getScreenPortPersonVehicleStatLoading", "Get > /personnelPosition/bi/personLocation/portPersonVehicleStat", ); +export const getScreenPersonInOutStat = declareRequest( + "getScreenPersonInOutStatLoading", + "Post > @/primeport/closedArea/personInOutStat", +); +export const getScreenVehicleInOutStat = declareRequest( + "getScreenVehicleInOutStatLoading", + "Post > @/primeport/closedArea/vehicleInOutStat", +); diff --git a/src/pages/Container/Map/components/Content/branchOffice/MenJin/EntryExitTrendPanel/index.js b/src/pages/Container/Map/components/Content/branchOffice/MenJin/EntryExitTrendPanel/index.js index d6510d3..2d60b71 100644 --- a/src/pages/Container/Map/components/Content/branchOffice/MenJin/EntryExitTrendPanel/index.js +++ b/src/pages/Container/Map/components/Content/branchOffice/MenJin/EntryExitTrendPanel/index.js @@ -161,18 +161,16 @@ function EntryExitTrendPanel(props) { chartInstance.current.setOption(option); }; - const loadData = async (mkmjType) => { - const { data } = await props.getScreenMkmjRecord({ + const loadData = async (index) => { + const { data } = await props[index === 0 ? "getScreenPersonInOutStat" : "getScreenVehicleInOutStat"]({ portArea, corpinfoId: currentBranchOffice, - mkmjLevel: "2", - mkmjType, }); initEcharts(data || []); }; useMount(() => { - loadData("1"); + loadData(activeIndex); return () => { disposeChart(); @@ -185,7 +183,7 @@ function EntryExitTrendPanel(props) { disposeChart(); setActiveIndex(index); - loadData(index === 0 ? "1" : "2"); + loadData(index); }; return ( @@ -207,7 +205,7 @@ function EntryExitTrendPanel(props) { )} >
- +