Files
one-pipe-system/openspec/changes/update-enterprise-asset-authorization-entry/proposal.md
luo d3b5f55c64
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 3m41s
feat:更换企业授权
2026-06-22 10:36:33 +08:00

39 lines
2.1 KiB
Markdown
Raw 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: Move Enterprise Asset Authorization To Asset Lists
## Why
企业卡授权和设备授权当前从企业客户详情入口进入独立页面操作路径长且与资产实际筛选、导出、批量操作割裂。IoT 卡管理和设备管理列表需要直接支持按企业授权状态过滤,并在列表页完成企业授权和授权回收。
## What Changes
- IoT 卡管理新增 `authorized_enterprise_id``is_authorized_to_enterprise` 查询过滤。
- IoT 卡管理在导出按钮左侧新增“授权卡给企业”和“回收卡授权”按钮,并为两个按钮添加独立权限编码。
- 设备管理新增 `authorized_enterprise_id``is_authorized_to_enterprise` 查询过滤。
- 设备管理在导出按钮左侧新增“授权设备给企业”和“撤销设备授权”按钮,并为两个按钮添加独立权限编码。
- 新列表按钮复用 `docs/授权、回收.md` 中的授权/回收接口,支持列表选择和筛选条件批量操作。
- 企业客户管理移除“卡授权”和“设备授权”操作入口。
- 删除已被替代的“企业卡管理”和“企业设备列表”两个旧页面,以及对应隐藏路由和路由别名。
## Impact
- Affected specs: `iot-card-management`, `device-management`, `enterprise-customer-management`
- Affected code:
- `src/views/asset-management/iot-card-management/index.vue`
- `src/views/asset-management/device-list/index.vue`
- `src/views/account-management/enterprise-customer/index.vue`
- `src/api/modules/enterprise.ts`
- `src/types/api/card.ts`
- `src/types/api/device.ts`
- `src/types/api/enterpriseCard.ts`
- `src/types/api/enterpriseDevice.ts`
- `src/router/routesAlias.ts`
- `src/router/routes/asyncRoutes.ts`
- `src/views/asset-management/enterprise-cards/index.vue`(删除)
- `src/views/asset-management/enterprise-devices/index.vue`(删除)
## Dependencies
- Backend list APIs accept `authorized_enterprise_id` and `is_authorized_to_enterprise` as query parameters.
- Backend authorization APIs are described in `docs/授权、回收.md`.
- Existing enterprise list/search API can provide target enterprise options for the new dialogs.