feat: 统一后端分页查询与前端服务层适配

后端新增通用分页模块,为报销单、员工、预算、agent 资产等
端点统一接入分页参数和游标查询,优化 repository 层分页实
现,前端服务层适配分页响应结构,完善预算图表和全局样式,
优化侧边栏和企业选择器组件,引入 Element Plus 插件注册。
This commit is contained in:
caoxiaozhu
2026-05-29 14:11:06 +08:00
parent e080105f9f
commit 678f64d772
43 changed files with 1863 additions and 378 deletions

View File

@@ -156,6 +156,22 @@ def test_agent_asset_service_seeds_all_foundation_asset_types() -> None:
assert len(service.list_assets(asset_type=AgentAssetType.TASK.value)) >= 3
def test_agent_asset_service_supports_backend_pagination() -> None:
with build_session() as db:
service = AgentAssetService(db)
page = service.list_assets_page(
asset_type=AgentAssetType.RULE.value,
page=1,
page_size=2,
)
assert len(page.items) <= 2
assert page.total >= len(page.items)
assert page.page == 1
assert page.page_size == 2
def test_finance_rules_use_risk_rule_scenario_categories() -> None:
with build_session() as db:
service = AgentAssetService(db)