mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-04-20 05:02:50 +08:00
chore: 🔨 用户管理-角色排序 (#212)
[skip ci] Co-authored-by: tk <fiyne1a@dingtalk.com>
This commit is contained in:
parent
69dc407002
commit
6d87d8e9cd
@ -240,7 +240,9 @@ public sealed class UserService(
|
||||
.Count(out var total)
|
||||
.ToListAsync(listUserExp)
|
||||
.ConfigureAwait(false);
|
||||
return new PagedQueryRsp<QueryUserRsp>(req.Page, req.PageSize, total, list.Adapt<IEnumerable<QueryUserRsp>>());
|
||||
return new PagedQueryRsp<QueryUserRsp>(req.Page, req.PageSize, total
|
||||
, list.Select(x => x with { Roles = x.Roles.OrderBy(y => y.Sort).ThenBy(y => y.Id).ToList() })
|
||||
.Adapt<IEnumerable<QueryUserRsp>>());
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
@ -36,14 +36,6 @@
|
||||
placeholder: $t('用户编号 / 用户名 / 手机号 / 邮箱 / 备注'),
|
||||
style: 'width:25rem',
|
||||
},
|
||||
{
|
||||
type: 'remote-select',
|
||||
field: ['filter', 'roleId'],
|
||||
api: $API.sys_role.query,
|
||||
config: { props: { label: 'name', value: 'id' } },
|
||||
placeholder: $t('所属角色'),
|
||||
style: 'width:15rem',
|
||||
},
|
||||
{
|
||||
type: 'cascader',
|
||||
field: ['filter', 'deptId'],
|
||||
@ -52,6 +44,14 @@
|
||||
placeholder: $t('所属部门'),
|
||||
style: 'width:15rem',
|
||||
},
|
||||
{
|
||||
type: 'remote-select',
|
||||
field: ['filter', 'roleId'],
|
||||
api: $API.sys_role.query,
|
||||
config: { props: { label: 'name', value: 'id' } },
|
||||
placeholder: $t('所属角色'),
|
||||
style: 'width:15rem',
|
||||
},
|
||||
]"
|
||||
:vue="this"
|
||||
@reset="onReset"
|
||||
@ -103,18 +103,18 @@
|
||||
<na-col-id :label="$t('用户编号')" prop="id" sortable="custom" width="170" />
|
||||
<na-col-avatar :label="$t('用户名')" prop="userName" width="170" />
|
||||
<el-table-column :label="$t('手机号')" align="center" prop="mobile" sortable="custom" width="120" />
|
||||
<el-table-column :label="$t('邮箱')" align="right" prop="email" sortable="custom" />
|
||||
<na-col-tags
|
||||
:label="$t('所属角色')"
|
||||
@click="(item) => (this.dialog.roleSave = { row: item, mode: 'view' })"
|
||||
field="name"
|
||||
prop="roles" />
|
||||
<el-table-column :label="$t('邮箱')" align="right" prop="email" sortable="custom" width="250" />
|
||||
<na-col-tags
|
||||
:label="$t('所属部门')"
|
||||
@click="(item) => (this.dialog.deptSave = { row: item, mode: 'view' })"
|
||||
field="name"
|
||||
prop="dept"
|
||||
width="200" />
|
||||
width="120" />
|
||||
<na-col-tags
|
||||
:label="$t('所属角色')"
|
||||
@click="(item) => (this.dialog.roleSave = { row: item, mode: 'view' })"
|
||||
field="name"
|
||||
prop="roles" />
|
||||
<el-table-column :label="$t('最后登录')" align="right" prop="lastLoginTime" sortable="custom" width="120">
|
||||
<template #default="{ row }">
|
||||
<span v-time.tip="row.lastLoginTime" :title="row.lastLoginTime"></span>
|
||||
|
Loading…
x
Reference in New Issue
Block a user