feat: 菜单用户增加默认排序规则
This commit is contained in:
parent
0323b5ca3b
commit
a7fe25c67d
|
@ -1,6 +1,8 @@
|
||||||
@page "/Admin/Menus"
|
@page "/Admin/Menus"
|
||||||
|
|
||||||
<AdminTable TItem="DataAccess.Models.Navigation" IsTree="true" OnTreeExpand="OnTreeExpand" ExtendButtonColumnWidth="200" OnQueryAsync="OnQueryAsync">
|
<AdminTable TItem="DataAccess.Models.Navigation"
|
||||||
|
IsTree="true" OnTreeExpand="OnTreeExpand" ExtendButtonColumnWidth="200"
|
||||||
|
OnQueryAsync="OnQueryAsync">
|
||||||
<TableToolbarTemplate>
|
<TableToolbarTemplate>
|
||||||
<TableToolbarButton TItem="DataAccess.Models.Navigation" IsEnableWhenSelectedOneRow="true" Color="Color.Info" Icon="fa fa-sitemap" Text="分配角色" OnClickCallback="menus => OnAssignmentRoles(menus.First())" />
|
<TableToolbarButton TItem="DataAccess.Models.Navigation" IsEnableWhenSelectedOneRow="true" Color="Color.Info" Icon="fa fa-sitemap" Text="分配角色" OnClickCallback="menus => OnAssignmentRoles(menus.First())" />
|
||||||
</TableToolbarTemplate>
|
</TableToolbarTemplate>
|
||||||
|
|
|
@ -72,6 +72,9 @@ public partial class Menus
|
||||||
|
|
||||||
return Task.FromResult(new QueryData<Navigation>()
|
return Task.FromResult(new QueryData<Navigation>()
|
||||||
{
|
{
|
||||||
|
IsFiltered = true,
|
||||||
|
IsSearch = true,
|
||||||
|
IsSorted = true,
|
||||||
Items = menus
|
Items = menus
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
@page "/Admin/Users"
|
@page "/Admin/Users"
|
||||||
|
|
||||||
<AdminTable TItem="DataAccess.Models.User" ExtendButtonColumnWidth="270">
|
<AdminTable TItem="DataAccess.Models.User" ExtendButtonColumnWidth="270" SortList="SortList">
|
||||||
<TableToolbarTemplate>
|
<TableToolbarTemplate>
|
||||||
<TableToolbarButton TItem="DataAccess.Models.User" IsEnableWhenSelectedOneRow="true" Color="Color.Warning" Icon="fa fa-bank" Text="分配部门" OnClickCallback="users => OnAssignmentGroups(users.First())" />
|
<TableToolbarButton TItem="DataAccess.Models.User" IsEnableWhenSelectedOneRow="true" Color="Color.Warning" Icon="fa fa-bank" Text="分配部门" OnClickCallback="users => OnAssignmentGroups(users.First())" />
|
||||||
<TableToolbarButton TItem="DataAccess.Models.User" IsEnableWhenSelectedOneRow="true" Color="Color.Info" Icon="fa fa-sitemap" Text="分配角色" OnClickCallback="users => OnAssignmentRoles(users.First())" />
|
<TableToolbarButton TItem="DataAccess.Models.User" IsEnableWhenSelectedOneRow="true" Color="Color.Info" Icon="fa fa-sitemap" Text="分配角色" OnClickCallback="users => OnAssignmentRoles(users.First())" />
|
||||||
|
|
|
@ -25,6 +25,8 @@ public partial class Users
|
||||||
[NotNull]
|
[NotNull]
|
||||||
private IRole? RoleService { get; set; }
|
private IRole? RoleService { get; set; }
|
||||||
|
|
||||||
|
private List<string> SortList { get; } = new List<string> { "UserName" };
|
||||||
|
|
||||||
private async Task OnAssignmentGroups(User user)
|
private async Task OnAssignmentGroups(User user)
|
||||||
{
|
{
|
||||||
var groups = GroupService.GetAll().ToSelectedItemList();
|
var groups = GroupService.GetAll().ToSelectedItemList();
|
||||||
|
|
Loading…
Reference in New Issue