refactor(web): 收敛角色页权限点目录入口
ci / 质量门禁 (push) Canceled after 0s

背景:列表页页头「权限点目录」与详情面板「查看权限点目录」和编辑器权限点 Tab 信息重复,抽屉只读、无搜索、无操作,且页头出现两个并列动作。

改动:
- 移除列表页页头目录按钮与 PermissionCatalogDrawer 组件及对应样式;
- 详情面板删除「查看权限点目录」入口,保留「已选 n / 30」信息;
- 权限查看统一走编辑器「权限点」Tab(只读用户也可进入查看);
- 同步 A2 实施报告与设计说明。

验证:pnpm format:check / lint / typecheck / test 全绿;5173 实测页头仅保留「新建角色」,详情面板无目录入口。
This commit is contained in:
Stev_Wang committed 2026-11-03 13:56:35 +08:00
1 parent fe70a2bcee
commit a3419cf5da
6 files changed
+3 -263

No files matched your search

@@ -29,7 +29,6 @@ export interface RoleDetailPanelProps {
onRename: (role: RoleDetail) => void;
onDisable: (role: RoleDetail) => void;
onEnable: (role: RoleDetail) => void;
onOpenCatalog: (role: RoleDetail) => void;
}
function RoleAvatar({ status }: { status: 'active' | 'disabled' }): ReactNode {
@@ -114,11 +113,9 @@ function DetailHead({
function PermissionSummary({
role,
tree,
onOpenCatalog,
}: {
role: RoleDetail;
tree: PermissionTree | undefined;
onOpenCatalog: () => void;
}): ReactNode {
const selected = [...role.permissions, ...role.specialPermissions];
const modules = tree === undefined ? [] : summarizePermissionModules(tree, selected);
@@ -130,9 +127,6 @@ function PermissionSummary({
已选 {role.permissionCount + role.specialPermissionCount} /{' '}
{tree?.totalPermissions ?? '—'}
</span>
<Button theme="borderless" size="small" onClick={onOpenCatalog}>
查看权限点目录
</Button>
</div>
{modules.length === 0 ? (
<p className="lx-role-detail__muted">权限点目录加载中…</p>
@@ -326,13 +320,7 @@ export function RoleDetailPanel(props: RoleDetailPanelProps): ReactNode {
{formatRoleDateTime(detail.updatedAt)}
</span>
</div>
<PermissionSummary
role={detail}
tree={props.tree}
onOpenCatalog={() => {
props.onOpenCatalog(detail);
}}
/>
<PermissionSummary role={detail} tree={props.tree} />
<ScopeAndSpecial role={detail} tree={props.tree} />
<BoundUsers role={detail} />
</div>