This commit is contained in:
sjl
2024-12-04 08:49:42 +08:00
parent 33004e081d
commit 741020fe79
9 changed files with 171 additions and 51 deletions

View File

@@ -91,6 +91,22 @@ const columns = reactive<ColumnProps<Role.RoleBO>[]>([
search: { el: 'input' },
minWidth: 200,
},
{
prop: 'type',
label: '类型',
minWidth: 200,
render: (scope) => {
const typeMap: { [key: number]: { label: string; type: string } } = {
0: { label: '超级管理员', type: 'primary' },
1: { label: '管理员角色', type: 'success' },
2: { label: '普通角色', type: 'info' },
};
const typeInfo = typeMap[scope.row.type] || { label: '未知', type: 'danger' };
return (
<el-tag type={typeInfo.type}>{typeInfo.label}</el-tag>
);
},
},
{
prop: 'remark',
label: '描述',