From 83efa004865f4357e4ae1fc3d1ac5af575f5a77c Mon Sep 17 00:00:00 2001 From: LiuJiaNan <15703339975@163.com> Date: Fri, 28 Aug 2026 17:35:48 +0800 Subject: [PATCH] =?UTF-8?q?refactor(inspection):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=A3=80=E6=B5=8B=E5=88=97=E8=A1=A8=E6=95=B0=E6=8D=AE=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E4=B8=8E=E8=AE=A1=E6=95=B0=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 useTable 初始化移至 useEffect 之后,确保依赖顺序合理 - 在表格数据获取前清空统计计数,避免显示旧数据 - 修正获取查询时间区间时的字段访问错误 - 调整 getCount 调用时机,确保数据同步更新 - 删除冗余的 useEffect 调用,简化组件逻辑 --- .../BranchCompany/Inspection/Records/List/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pages/Container/BranchCompany/Inspection/Records/List/index.js b/src/pages/Container/BranchCompany/Inspection/Records/List/index.js index d0a1eed..80fb566 100644 --- a/src/pages/Container/BranchCompany/Inspection/Records/List/index.js +++ b/src/pages/Container/BranchCompany/Inspection/Records/List/index.js @@ -60,7 +60,12 @@ function List(props) { corpId: query.corpId, }, onBefore: () => { - setCount({}); + setCount({ + inspectCount: 0, + hiddenCount: 0, + safetyCount: 0, + environmentalCount: 0, + }); }, onSuccess: () => { getCount();