Files
sexygoat dfb78006ac
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m15s
fix: 分页器一直显示和资产信息使用单卡
2026-05-21 14:39:21 +08:00

3.6 KiB

ADDED Requirements

Requirement: Admin Device Detail Status Fields Use A Selected Bound Card

The admin asset information view SHALL source the device detail 实名状态, 在线状态, and 实名时间 fields from a selected bound card in the device cards list instead of mixing device top-level status fields.

Scenario: Device detail uses the only bound card when exactly one card is bound

  • GIVEN 用户正在查看后台“资产信息”中的设备资产详情
  • AND 设备详情响应中的 cards 列表仅包含一条绑定卡记录
  • WHEN 页面渲染设备基础信息区域
  • THEN 页面 MUST 将 实名状态 映射为这条绑定卡的 real_name_status
  • AND 页面 MUST 将 在线状态 映射为这条绑定卡的 network_status
  • AND 页面 MUST 将 实名时间 映射为这条绑定卡的 real_name_at
  • AND 页面 MUST NOT 要求这条唯一绑定卡必须带有 is_current=true 才可被选中

Scenario: Device detail uses the current bound card when multiple cards are bound

  • GIVEN 用户正在查看后台“资产信息”中的设备资产详情
  • AND 设备详情响应中的 cards 列表包含多条绑定卡记录
  • AND 其中一条绑定卡记录的 is_currenttrue
  • WHEN 页面渲染设备基础信息区域
  • THEN 页面 MUST 将 实名状态 映射为该当前绑定卡的 real_name_status
  • AND 页面 MUST 将 在线状态 映射为该当前绑定卡的 network_status
  • AND 页面 MUST 将 实名时间 映射为该当前绑定卡的 real_name_at
  • AND 页面 MUST NOT 使用任意非当前绑定卡的对应字段填充这三个展示项
  • AND 页面 MUST NOT 在已选出当前绑定卡后继续混用设备顶层 real_name_statusonline_statusreal_name_at

Scenario: Device detail keeps stable placeholders when no eligible bound card can be selected

  • GIVEN 用户正在查看后台“资产信息”中的设备资产详情
  • AND cards 列表为空,或 cards 列表包含多条记录但不存在 is_current=true 的绑定卡
  • WHEN 页面渲染 实名状态在线状态实名时间 这三个展示项
  • THEN 页面 MUST 保留这三个字段标签
  • AND 页面 MUST 显示稳定占位内容
  • AND 页面 MUST NOT 猜测性地回退到任意非当前绑定卡

Requirement: Admin Device Bound Card Status Contract Compatibility

The admin asset information integration SHALL accept and preserve the bound-card fields needed by the device detail status source selection rule.

Scenario: Device asset detail contract accepts bound-card real-name time

  • GIVEN GET /api/admin/assets/resolve/:identifier 返回设备资产详情
  • AND 响应中的 cards 列表包含每张绑定卡的 real_name_statusnetwork_statusreal_name_atis_current
  • WHEN 前端解析设备资产详情响应
  • THEN 前端绑定卡类型契约 MUST 支持 real_name_at
  • AND 前端状态模型 MUST 保留每张绑定卡的 real_name_statusnetwork_statusreal_name_atis_current

Scenario: Realtime merge preserves selected-card real-name time for device detail display

  • GIVEN 前端已解析设备资产详情,并持有绑定卡的 real_name_at
  • AND GET /api/admin/assets/:identifier/realtime-statusPOST /api/admin/assets/:identifier/refresh 返回了设备实时状态
  • WHEN 前端将实时返回的 cards 数据与已有绑定卡状态合并
  • THEN 绑定卡已有的 real_name_at MUST NOT 因实时合并而无故丢失
  • AND 后续设备详情展示 MUST 继续按选中的绑定卡读取 real_name_at