mirror of
				https://gitee.com/ThingsGateway/ThingsGateway.git
				synced 2025-10-31 23:53:58 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			103 lines
		
	
	
		
			4.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			103 lines
		
	
	
		
			4.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| @*
 | ||
| //------------------------------------------------------------------------------
 | ||
| //  此代码版权声明为全文件覆盖,如有原作者特别声明,会在下方手动补充
 | ||
| //  此代码版权(除特别声明外的代码)归作者本人Diego所有
 | ||
| //  源代码使用协议遵循本仓库的开源协议及附加协议
 | ||
| //  Gitee源代码仓库:https://gitee.com/diego2098/ThingsGateway
 | ||
| //  Github源代码仓库:https://github.com/kimdiego2098/ThingsGateway
 | ||
| //  使用文档:https://diego2098.gitee.io/thingsgateway-docs/
 | ||
| //  QQ群:605534569
 | ||
| //------------------------------------------------------------------------------
 | ||
| *@
 | ||
| 
 | ||
| @page "/admin/vislog"
 | ||
| @using System.Linq.Expressions;
 | ||
| @using Microsoft.AspNetCore.Authorization;
 | ||
| @using ThingsGateway.Admin.Application;
 | ||
|  
 | ||
| @namespace ThingsGateway.Admin.Blazor
 | ||
| @attribute [Authorize]
 | ||
| @inject UserResoures UserResoures
 | ||
| @inherits BaseComponentBase
 | ||
| @layout MainLayout
 | ||
| <AppDataTable @ref="_datatable" TItem="SysVisitLog" SearchItem="VisitLogPageInput" DescFunc=@(memberInfo=>memberInfo.GetCustomAttribute<SqlSugar.SugarColumn>(true)?.ColumnDescription)
 | ||
|               AddItem="object" EditItem="object" IsShowSelect=false
 | ||
|               SearchModel="@search" IsShowOperCol=false
 | ||
|               QueryCallAsync="QueryCallAsync"
 | ||
|                 IsShowQueryButton IsShowSearchKey>
 | ||
|     <SearchTemplate>
 | ||
| 
 | ||
|         <MMenu CloseOnContentClick="false" OffsetY Context="menu">
 | ||
|             <ActivatorContent>
 | ||
|                 <MTextField Dense Readonly Style="max-width:200px;" HideDetails=@("auto") Class="my-1  mx-2 "
 | ||
|                             Value="context.StartTime.Value.ToDefaultDateTimeFormat(InitTimezone.TimezoneOffset)"
 | ||
|                 @attributes="menu.Attrs" Outlined Label=@context.Description(x => x.StartTime) />
 | ||
|             </ActivatorContent>
 | ||
|             <ChildContent>
 | ||
|                 <AppDateTimePicker @bind-Value="context.StartTime"></AppDateTimePicker>
 | ||
|             </ChildContent>
 | ||
|         </MMenu>
 | ||
| 
 | ||
|         <MMenu CloseOnContentClick="false" OffsetY Context="menu">
 | ||
|             <ActivatorContent>
 | ||
|                 <MTextField Dense Readonly Style="max-width:200px;" HideDetails=@("auto") Class="my-1  mx-2 "
 | ||
|                             Value="context.EndTime.Value.ToDefaultDateTimeFormat(InitTimezone.TimezoneOffset)" Clearable
 | ||
|                 @attributes="menu.Attrs" Outlined Label=@context.Description(x => x.EndTime) />
 | ||
|             </ActivatorContent>
 | ||
|             <ChildContent>
 | ||
|                 <AppDateTimePicker @bind-Value="context.EndTime"></AppDateTimePicker>
 | ||
|             </ChildContent>
 | ||
|         </MMenu>
 | ||
| 
 | ||
|         <MSelect Style="max-width:200px;"
 | ||
|                  Class="my-1 mx-2 " @bind-Value="context.Category"
 | ||
|                   Outlined Label=@context.Description(x => x.Category)
 | ||
|                  Items=@(CategoryFilters) Clearable
 | ||
|                  MenuProps="@(props => { props.Bottom = true; props.OffsetY = true; })"
 | ||
|                  ItemText=@((u) =>u.Key)
 | ||
|                  ItemValue=@(u => u.Value)
 | ||
|                  HideDetails="true" Height="30"
 | ||
|                   Dense>
 | ||
|         </MSelect>
 | ||
|         <MSelect Style="max-width:200px;"
 | ||
|                  Class="my-1 mx-2 " @bind-Value="context.ExeStatus"
 | ||
|                   Outlined Label=@context.Description(x => x.ExeStatus)
 | ||
|                  Items=@(ExeStatus) Clearable
 | ||
|                  MenuProps="@(props => { props.Bottom = true; props.OffsetY = true; })"
 | ||
|                  ItemText=@((u) =>u.Key)
 | ||
|                  ItemValue=@(u => u.Value)
 | ||
|                  HideDetails="true" Height="30"
 | ||
|                   Dense>
 | ||
|         </MSelect>
 | ||
|         <MTextField Dense Style="max-width:200px;" HideDetails=@("auto") Class="my-1 mx-2 " @bind-Value="context.Account"
 | ||
|                         Outlined Label=@context.Description(x => x.Account) />
 | ||
| 
 | ||
|     </SearchTemplate>
 | ||
|     <OtherToolbarTemplate>
 | ||
|         @if (@UserResoures.IsHasButtonWithRole("sysvislogclear"))
 | ||
|         {
 | ||
|             <MButton Color="error" Class="mx-2 my-1" OnClick=@(ClearClickAsync)>清空</MButton>
 | ||
|         }
 | ||
|         <MMenu OffsetY Context="menu">
 | ||
|             <ActivatorContent>
 | ||
|                 <MButton @attributes="@menu.Attrs" Color="primary"
 | ||
|                          Class="my-1  mx-2 ">
 | ||
|                     导出
 | ||
|                     <AppChevronDown></AppChevronDown>
 | ||
|                 </MButton>
 | ||
|             </ActivatorContent>
 | ||
|             <ChildContent>
 | ||
|                 <MList>
 | ||
|                     <MListItem OnClick="()=>DownExportAsync()">导出全部</MListItem>
 | ||
|                     <MListItem OnClick="()=>DownExportAsync(search)">导出搜索项</MListItem>
 | ||
|                 </MList>
 | ||
| 
 | ||
|             </ChildContent>
 | ||
|         </MMenu>
 | ||
|     </OtherToolbarTemplate>
 | ||
| 
 | ||
| </AppDataTable>
 | ||
| 
 | ||
| 
 | ||
| 
 | 
