Files
KinginfoGateway/src/Admin/ThingsGateway.Admin.Application/Util/UserUtil.cs

38 lines
1.2 KiB
C#
Raw Normal View History

2024-08-23 13:10:35 +08:00
//------------------------------------------------------------------------------
// 此代码版权声明为全文件覆盖,如有原作者特别声明,会在下方手动补充
// 此代码版权除特别声明外的代码归作者本人Diego所有
// 源代码使用协议遵循本仓库的开源协议及附加协议
// Gitee源代码仓库https://gitee.com/diego2098/ThingsGateway
// Github源代码仓库https://github.com/kimdiego2098/ThingsGateway
2024-09-14 18:17:25 +08:00
// 使用文档https://thingsgateway.cn/
2024-08-23 13:10:35 +08:00
// QQ群605534569
//------------------------------------------------------------------------------
using BootstrapBlazor.Components;
2025-01-24 22:42:26 +08:00
namespace ThingsGateway.Admin.Application;
2024-08-23 13:10:35 +08:00
/// <inheritdoc/>
2025-01-24 22:42:26 +08:00
[ThingsGateway.DependencyInjection.SuppressSniffer]
2025-06-06 21:13:58 +08:00
public static class UserUtil
2024-08-23 13:10:35 +08:00
{
/// <summary>
2025-01-24 22:42:26 +08:00
/// 构造选择项ID/TITLE
2024-08-23 13:10:35 +08:00
/// </summary>
2025-01-24 22:42:26 +08:00
/// <param name="items"></param>
/// <returns></returns>
public static IEnumerable<SelectedItem> BuildUserSelectList(IEnumerable<UserSelectorOutput> items)
{
var data = items
.Select((item, index) =>
new SelectedItem(item.Id.ToString(), item.Account)
{
}
).ToList();
return data;
}
2024-08-23 13:10:35 +08:00
}