This commit is contained in:
hero920103 committed 2026-10-19 01:13:17 +08:00
1 parent 5718a00e31
commit 1850ac640e
226 files changed
+37772 -12071

No files matched your search

@@ -63,6 +63,25 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="租户端" width="120" align="center">
<template #default="{ row }">
<el-tag v-if="Number(row.cid) !== 2" size="small" effect="plain">
不适用
</el-tag>
<el-tooltip
v-else-if="isLockedForTenant(row)"
content="租户后台只能查看和使用该角色,不能改名、改权限或删除"
placement="top"
>
<el-tag type="success" size="small" effect="plain">
只读下发
</el-tag>
</el-tooltip>
<el-tag v-else type="warning" size="small" effect="plain">
租户自管
</el-tag>
</template>
</el-table-column>
<el-table-column prop="status" label="状态" width="90" align="center">
<template #default="{ row }">
<el-tag :type="row.status === 1 ? 'success' : 'info'" size="small">
@@ -181,6 +200,10 @@ const getScopeLabel = (row: any) => {
return tenantNameMap.value[tid] || `租户ID: ${tid}`;
};
// 租户端是否只读:口径同后端 tenantRoleReadOnly(is_locked 或全局角色)
const isLockedForTenant = (row: any) =>
Number(row.is_locked || 0) === 1 || Number(row.tenant_id || 0) === 0;
// 权限展示:空 = 全权限;有值展示权限项数量
const formatRights = (rights: any) => {
if (rights === null || rights === undefined) return "全权限";