2024-09-30 16:21:41 +08:00
|
|
|
import { $t } from '@/plugins/i18n';
|
|
|
|
import UserinfoDialog from '@/components/Table/Userinfo/UserinfoDialog.vue';
|
2024-10-06 18:59:44 +08:00
|
|
|
import { addDialog } from '@/components/BaseDialog/index';
|
|
|
|
import TableImage from '@/components/Table/TableImage.vue'; // 表格列字段
|
2024-09-30 16:21:41 +08:00
|
|
|
|
|
|
|
// 表格列字段
|
|
|
|
export const columns = [
|
|
|
|
{ label: $t('id'), prop: 'id' },
|
2024-10-06 18:59:44 +08:00
|
|
|
{
|
|
|
|
label: $t('avatar'),
|
|
|
|
prop: 'avatar',
|
|
|
|
cellRenderer: ({ row }) => <TableImage image={row.avatar} />,
|
|
|
|
},
|
2024-09-30 16:21:41 +08:00
|
|
|
{ label: $t('nickName'), prop: 'nickName' },
|
|
|
|
{ label: $t('username'), prop: 'username' },
|
|
|
|
{ label: $t('email'), prop: 'email', width: 180 },
|
|
|
|
{ label: $t('phone'), prop: 'phone', width: 180 },
|
|
|
|
{ label: $t('sex'), prop: 'sex' },
|
|
|
|
{ label: $t('personDescription'), prop: 'personDescription', width: 180 },
|
|
|
|
{ label: $t('table.createTime'), prop: 'createTime', width: '160' },
|
|
|
|
{ label: $t('table.updateTime'), prop: 'updateTime', width: '160' },
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* * 查看用户信息
|
|
|
|
* @param userId
|
|
|
|
*/
|
|
|
|
export const selectUserinfo = async (userId: string) => {
|
|
|
|
addDialog({
|
|
|
|
title: '查看用户信息',
|
|
|
|
draggable: true,
|
|
|
|
contentRenderer: (): JSX.Element => <UserinfoDialog userId={userId} />,
|
|
|
|
});
|
|
|
|
};
|