change - 修改主页数据刷新

master
DESKTOP-G1UHLH2 1 month ago
parent ccd3d6ba30
commit a63e5ce3c2

@ -4,6 +4,7 @@ using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.Extensions.Logging;
@ -190,7 +191,13 @@ namespace SlnMesnac.TouchSocket
log.ErrMsg=e.Message;
}
Task.Run(() =>
{
lock (string.Empty)
{
_baseLogService.Insert(log);
}
});
return new Back();

@ -143,6 +143,7 @@ namespace SlnMesnac.WPF.ViewModel
/// <summary>
/// 扫描记录
/// </summary>
private List<ScanLogModel> scanLogModelsItems = new List<ScanLogModel>();
private ObservableCollection<ScanLogModel> _scanItems = new ObservableCollection<ScanLogModel>();
public ObservableCollection<ScanLogModel> ScanItems
{
@ -162,7 +163,9 @@ namespace SlnMesnac.WPF.ViewModel
TagCode = info.Rfid;
ImagePath = info.Url;
ScanItems.Add(info);
scanLogModelsItems.Add(info);
ScanItems = new ObservableCollection<ScanLogModel>(scanLogModelsItems.OrderByDescending(x=>x.CreateTime).ToList());
TagAmount++;

Loading…
Cancel
Save