refactor(ui): 优化数据加载逻辑和缓存处理
- 移除不必要的初始化数据加载,保留关键数据请求 - 重构产品/原材料信息组件,改用计算属性替代watch - 分批加载产品/原材料数据,避免大请求阻塞 - 为数据加载添加loading状态提示 - 优化统计面板数据加载方式,改为顺序请求
This commit is contained in:
@@ -58,7 +58,7 @@ public class WmsProductServiceImpl implements IWmsProductService {
|
||||
* 查询产品列表
|
||||
*/
|
||||
@Override
|
||||
@Cacheable(cacheNames = "wms:product:list", key = "#bo.toString() + ':' + #pageQuery.pageNum + ':' + #pageQuery.pageSize", unless = "#result == null")
|
||||
// @Cacheable(cacheNames = "wms:product:list", key = "#bo.toString() + ':' + #pageQuery.pageNum + ':' + #pageQuery.pageSize", unless = "#result == null")
|
||||
public TableDataInfo<WmsProductVo> queryPageList(WmsProductBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<WmsProduct> lqw = buildQueryWrapper(bo);
|
||||
Page<WmsProductVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
|
||||
@@ -64,7 +64,7 @@ public class WmsRawMaterialServiceImpl implements IWmsRawMaterialService {
|
||||
* 查询原材料列表
|
||||
*/
|
||||
@Override
|
||||
@Cacheable(cacheNames = "wms:rawMaterial:list", key = "#bo.toString() + ':' + #pageQuery.pageNum + ':' + #pageQuery.pageSize", unless = "#result == null")
|
||||
// @Cacheable(cacheNames = "wms:rawMaterial:list", key = "#bo.toString() + ':' + #pageQuery.pageNum + ':' + #pageQuery.pageSize", unless = "#result == null")
|
||||
public TableDataInfo<WmsRawMaterialVo> queryPageList(WmsRawMaterialBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<WmsRawMaterial> lqw = buildQueryWrapper(bo);
|
||||
Page<WmsRawMaterialVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
|
||||
Reference in New Issue
Block a user