refactor(inspection): 优化检测列表数据获取与计数逻辑

- 将 useTable 初始化移至 useEffect 之后,确保依赖顺序合理
- 在表格数据获取前清空统计计数,避免显示旧数据
- 修正获取查询时间区间时的字段访问错误
- 调整 getCount 调用时机,确保数据同步更新
- 删除冗余的 useEffect 调用,简化组件逻辑
master
LiuJiaNan 2026-08-28 17:35:48 +08:00
parent 9b7cca22a5
commit 83efa00486
1 changed files with 6 additions and 1 deletions

View File

@ -60,7 +60,12 @@ function List(props) {
corpId: query.corpId,
},
onBefore: () => {
setCount({});
setCount({
inspectCount: 0,
hiddenCount: 0,
safetyCount: 0,
environmentalCount: 0,
});
},
onSuccess: () => {
getCount();