Files
sexygoat fe0093972f
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m47s
feat: 卡新增IMEI
2026-05-26 18:07:39 +08:00

42 lines
1.9 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Change: 补充 IoT 卡网关 IMEI 展示
## Why
后端新增了 `gateway_card_imei` 字段,但后台当前还没有完整消费这组返回:
- `GET /api/admin/iot-cards/standalone` 已为 IoT 卡列表返回 `gateway_card_imei`
- `GET /api/admin/assets/resolve/:identifier` 已可为卡资产详情返回 `gateway_card_imei`
- `GET /api/admin/assets/:identifier/realtime-status` 也可返回 `gateway_card_imei`
如果前端不补齐这部分契约与展示规范,运营人员无法在 IoT 卡列表和卡资产详情中稳定查看对应 IMEI也无法在资产详情首个接口缺值时回退到实时状态结果。
## What Changes
-`iot-card-management` 新增 `gateway_card_imei` 列展示规范:
- IoT 卡管理列表新增 `IMEI`
- 列值直接展示 `GET /api/admin/iot-cards/standalone` 返回的 `gateway_card_imei`
- 当字段为空时显示 `-`
-`asset-information` 新增卡资产 `gateway_card_imei` 契约与展示规范:
- 仅卡资产详情在“卡信息”区域新增 `IMEI` 展示项
- 优先使用 `GET /api/admin/assets/resolve/:identifier` 返回的 `gateway_card_imei`
- 仅当详情响应未返回有效 `gateway_card_imei` 时,回退使用 `GET /api/admin/assets/:identifier/realtime-status`
- 当两个接口都没有有效值时显示 `-`
- 设备资产详情不新增该字段展示
## Impact
- Affected specs:
- `iot-card-management`
- `asset-information`
- Affected code:
- `src/types/api/card.ts`
- `src/views/asset-management/iot-card-management/index.vue`
- `src/types/api/asset.ts`
- `src/views/asset-management/asset-information/types.ts`
- `src/views/asset-management/asset-information/composables/useAssetInfo.ts`
- `src/views/asset-management/asset-information/components/BasicInfoCard.vue`
- Dependencies:
- `GET /api/admin/iot-cards/standalone`
- `GET /api/admin/assets/resolve/:identifier`
- `GET /api/admin/assets/:identifier/realtime-status`