优化用户
This commit is contained in:
parent
612be6e1ad
commit
62c0b86313
@ -12,18 +12,19 @@ export const columns = [
|
|||||||
title: '登录账号',
|
title: '登录账号',
|
||||||
dataIndex: 'username',
|
dataIndex: 'username',
|
||||||
key: 'username',
|
key: 'username',
|
||||||
width: 160,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '用户姓名',
|
title: '用户姓名',
|
||||||
dataIndex: 'realname',
|
dataIndex: 'realname',
|
||||||
key: 'realname',
|
key: 'realname',
|
||||||
width: 160,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '头像',
|
title: '头像',
|
||||||
dataIndex: 'avatar',
|
dataIndex: 'avatar',
|
||||||
key: 'avatar',
|
key: 'avatar',
|
||||||
|
width: 80,
|
||||||
customRender({ record }) {
|
customRender({ record }) {
|
||||||
return h(Avatar, {
|
return h(Avatar, {
|
||||||
size: 48,
|
size: 48,
|
||||||
@ -32,12 +33,12 @@ export const columns = [
|
|||||||
fit: 'fill',
|
fit: 'fill',
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
width: 100,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '性别',
|
title: '性别',
|
||||||
dataIndex: 'gender',
|
dataIndex: 'gender',
|
||||||
key: 'gender',
|
key: 'gender',
|
||||||
|
width: 80,
|
||||||
customRender({ record }) {
|
customRender({ record }) {
|
||||||
let typeText = '';
|
let typeText = '';
|
||||||
let color = '';
|
let color = '';
|
||||||
@ -67,49 +68,58 @@ export const columns = [
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
width: 70,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '手机号',
|
title: '手机号',
|
||||||
dataIndex: 'mobile',
|
dataIndex: 'mobile',
|
||||||
key: 'mobile',
|
key: 'mobile',
|
||||||
width: 140,
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '用户角色',
|
title: '用户角色',
|
||||||
dataIndex: 'role',
|
dataIndex: 'role',
|
||||||
key: 'role',
|
key: 'role',
|
||||||
|
width: 250,
|
||||||
customRender({ record }) {
|
customRender({ record }) {
|
||||||
let roleNames = '';
|
let roleNames = '';
|
||||||
if (record.roles.length > 0) {
|
if (record.roles.length > 0) {
|
||||||
roleNames = record.roles.map((role) => role.name).join(',');
|
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: '职级',
|
title: '职级',
|
||||||
prop: 'levelName',
|
prop: 'levelName',
|
||||||
dataIndex: 'levelName',
|
dataIndex: 'levelName',
|
||||||
width: 160,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '岗位',
|
title: '岗位',
|
||||||
prop: 'positionName',
|
prop: 'positionName',
|
||||||
dataIndex: 'positionName',
|
dataIndex: 'positionName',
|
||||||
width: 160,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '部门',
|
title: '部门',
|
||||||
prop: 'deptName',
|
prop: 'deptName',
|
||||||
dataIndex: 'deptName',
|
dataIndex: 'deptName',
|
||||||
width: 160,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '状态',
|
||||||
dataIndex: 'status',
|
dataIndex: 'status',
|
||||||
key: 'status',
|
key: 'status',
|
||||||
|
width: 100,
|
||||||
customRender({ record }) {
|
customRender({ record }) {
|
||||||
return h(
|
return h(
|
||||||
Tag,
|
Tag,
|
||||||
@ -121,7 +131,6 @@ export const columns = [
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
width: 100,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '创建时间',
|
title: '创建时间',
|
||||||
|
Loading…
Reference in New Issue
Block a user