优化用户

This commit is contained in:
zjl 2024-12-18 09:19:34 +08:00
parent 612be6e1ad
commit 62c0b86313

View File

@ -12,18 +12,19 @@ export const columns = [
title: '登录账号',
dataIndex: 'username',
key: 'username',
width: 160,
width: 100,
},
{
title: '用户姓名',
dataIndex: 'realname',
key: 'realname',
width: 160,
width: 100,
},
{
title: '头像',
dataIndex: 'avatar',
key: 'avatar',
width: 80,
customRender({ record }) {
return h(Avatar, {
size: 48,
@ -32,12 +33,12 @@ export const columns = [
fit: 'fill',
});
},
width: 100,
},
{
title: '性别',
dataIndex: 'gender',
key: 'gender',
width: 80,
customRender({ record }) {
let typeText = '';
let color = '';
@ -67,49 +68,58 @@ export const columns = [
},
);
},
width: 70,
},
{
title: '手机号',
dataIndex: 'mobile',
key: 'mobile',
width: 140,
width: 120,
},
{
title: '用户角色',
dataIndex: 'role',
key: 'role',
width: 250,
customRender({ record }) {
let roleNames = '';
if (record.roles.length > 0) {
roleNames = record.roles.map((role) => role.name).join(',');
}
return h('span', roleNames || '-');
// return h('span', roleNames || '-');
return h(
Tag,
{
color: 'processing',
},
{
default: () => roleNames,
},
);
},
width: 160,
},
{
title: '职级',
prop: 'levelName',
dataIndex: 'levelName',
width: 160,
width: 100,
},
{
title: '岗位',
prop: 'positionName',
dataIndex: 'positionName',
width: 160,
width: 100,
},
{
title: '部门',
prop: 'deptName',
dataIndex: 'deptName',
width: 160,
width: 100,
},
{
title: '状态',
dataIndex: 'status',
key: 'status',
width: 100,
customRender({ record }) {
return h(
Tag,
@ -121,7 +131,6 @@ export const columns = [
},
);
},
width: 100,
},
{
title: '创建时间',