5.4 KiB
5.4 KiB
ADDED Requirements
Requirement: Scene-Specific Export Task Pages
The admin frontend SHALL replace the single generic export task list entry with three scene-specific export task pages: 导出设备, 导出IOT卡, and 导出订单.
Scenario: Render scene-specific export task navigation
- GIVEN 用户打开资产管理下的导出管理菜单
- WHEN 系统渲染导出任务导航
- THEN 系统 MUST provide separate entries for 导出设备, 导出IOT卡, and 导出订单
- AND 系统 MUST NOT expose the old generic 导出列表 menu entry as the primary navigation entry
Scenario: Query device export tasks
- GIVEN 用户打开导出设备页面
- WHEN 页面查询导出任务列表
- THEN 系统 MUST call
GET /api/admin/export-taskswithscene=device - AND 用户 MUST NOT be able to change this page to query
iot_cardorordertasks through a scene selector
Scenario: Query IOT card export tasks
- GIVEN 用户打开导出IOT卡页面
- WHEN 页面查询导出任务列表
- THEN 系统 MUST call
GET /api/admin/export-taskswithscene=iot_card - AND 用户 MUST NOT be able to change this page to query
deviceorordertasks through a scene selector
Scenario: Query order export tasks
- GIVEN 用户打开导出订单页面
- WHEN 页面查询导出任务列表
- THEN 系统 MUST call
GET /api/admin/export-taskswithscene=order - AND 用户 MUST NOT be able to change this page to query
deviceoriot_cardtasks through a scene selector
Requirement: Remove Export Scene Filtering From Scene Pages
Scene-specific export task pages SHALL remove user-facing export scene filtering because each page has exactly one fixed scene.
Scenario: Hide scene search field
- GIVEN 用户打开任一导出任务场景页面
- WHEN 页面渲染搜索表单
- THEN 页面 MUST NOT display a 导出场景 search item
- AND reset and search actions MUST keep the page's fixed
sceneunchanged
Scenario: Avoid redundant scene column
- GIVEN 用户打开任一导出任务场景页面
- WHEN 页面渲染任务表格
- THEN 页面 SHOULD remove or hide the 场景 column by default
- AND 页面 MUST continue to display task number, status, progress, format, row counts, shard progress, error message, and created time
Requirement: Scene-Specific Export Task Permissions
The admin frontend MUST gate each export task page and page action with scene-specific permission codes so that device, IOT card, and order export task permissions are independent.
Scenario: Gate scene pages independently
- GIVEN 用户 only has
export_task:device:list - WHEN 系统渲染导出管理菜单
- THEN 系统 MUST show 导出设备
- AND 系统 MUST NOT show 导出IOT卡 or 导出订单 unless the user also has
export_task:iot_card:listorexport_task:order:list
Scenario: Gate device export task actions independently
- GIVEN 用户打开导出设备页面
- WHEN 页面渲染详情、下载 or 取消操作
- THEN 系统 MUST use
export_task:device:detail,export_task:device:download, andexport_task:device:cancelrespectively - AND 系统 MUST NOT treat IOT card or order export task action permissions as sufficient for device actions
Scenario: Gate IOT card export task actions independently
- GIVEN 用户打开导出IOT卡页面
- WHEN 页面渲染详情、下载 or 取消操作
- THEN 系统 MUST use
export_task:iot_card:detail,export_task:iot_card:download, andexport_task:iot_card:cancelrespectively - AND 系统 MUST NOT treat device or order export task action permissions as sufficient for IOT card actions
Scenario: Gate order export task actions independently
- GIVEN 用户打开导出订单页面
- WHEN 页面渲染详情、下载 or 取消操作
- THEN 系统 MUST use
export_task:order:detail,export_task:order:download, andexport_task:order:cancelrespectively - AND 系统 MUST NOT treat device or IOT card export task action permissions as sufficient for order actions
Scenario: Keep business export buttons independent
- GIVEN 用户分别访问设备管理、IOT 卡管理 and 订单列表
- WHEN 页面渲染创建导出任务按钮
- THEN 设备管理 MUST use
devices:export - AND IOT 卡管理 MUST use
iot_card:export - AND 订单列表 MUST use
orders:export - AND possessing one of these permissions MUST NOT reveal or enable the other two export buttons
Requirement: Scene-Aware Export Task Detail Permissions
The export task detail page SHALL apply detail, download, and cancel permissions according to the task's scene.
Scenario: Enforce scene permissions on direct detail access
- GIVEN 用户直接打开某个导出任务详情 URL
- WHEN 系统加载任务详情 and reads the returned
scene - THEN 系统 MUST require the matching scene detail permission before showing the detail content
- AND 系统 MUST use the matching scene download and cancel permissions before showing detail-page buttons
Scenario: Prevent cross-scene action leakage
- GIVEN 用户 has only order export task download permission
- AND 用户打开 a completed device export task detail
- WHEN 页面渲染详情操作区
- THEN 页面 MUST NOT show the device task download button
- AND 页面 MUST NOT allow downloading that device task through the order download permission