|
|
|
@ -8,7 +8,12 @@ using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows;
|
|
|
|
|
using System.Windows.Threading;
|
|
|
|
|
using SlnMesnac.Business.@base;
|
|
|
|
|
using static Microsoft.WindowsAPICodePack.Shell.PropertySystem.SystemProperties.System;
|
|
|
|
|
using SlnMesnac.Repository.service;
|
|
|
|
|
using SlnMesnac.Repository;
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
|
|
|
|
#region << 版 本 注 释 >>
|
|
|
|
|
/*--------------------------------------------------------------------
|
|
|
|
@ -36,29 +41,36 @@ namespace SlnMesnac.WPF.ViewModel.IndexPage
|
|
|
|
|
{
|
|
|
|
|
public partial class IndexContentViewModel: ObservableObject
|
|
|
|
|
{
|
|
|
|
|
private ILogger<IndexContentViewModel> _logger;
|
|
|
|
|
private IAirportTaskService _service;
|
|
|
|
|
|
|
|
|
|
private DispatcherTimer _timer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public IndexContentViewModel()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
LogMessages = new ObservableCollection<string>();
|
|
|
|
|
|
|
|
|
|
_service = App.ServiceProvider.GetService<IAirportTaskService>();
|
|
|
|
|
this.Init();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Init()
|
|
|
|
|
{
|
|
|
|
|
#region 测试数据
|
|
|
|
|
TaskItems = new ObservableCollection<TaskItem>
|
|
|
|
|
{
|
|
|
|
|
new TaskItem { TaskCode = "1", StationName = "1#站台", TaskDetails = "入库:P04->C01", Status = "任务状态:执行中" },
|
|
|
|
|
new TaskItem { TaskCode = "2", StationName = "2#站台", TaskDetails = "入库:P04->C01", Status = "任务状态:执行中" },
|
|
|
|
|
new TaskItem { TaskCode = "3", StationName = "3#站台", TaskDetails = "入库:P04->C01", Status = "任务状态:执行中" },
|
|
|
|
|
new TaskItem { TaskCode = "4", StationName = "4#站台", TaskDetails = "入库:P04->C01", Status = "任务状态:执行中" },
|
|
|
|
|
new TaskItem { TaskCode = "5", StationName = "5#站台", TaskDetails = "入库:P04->C01", Status = "任务状态:执行中" },
|
|
|
|
|
new TaskItem { TaskCode = "6", StationName = "6#站台", TaskDetails = "入库:P04->C01", Status = "任务状态:执行中" },
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
List<AirportTask> AirportTaskItem = _service.GetTaskInfos();
|
|
|
|
|
TaskItems = new ObservableCollection<AirportTask>(AirportTaskItem);
|
|
|
|
|
|
|
|
|
|
// TaskItems = new ObservableCollection<AirportTask>
|
|
|
|
|
// {
|
|
|
|
|
// new AirportTask { TaskCode = "1", StationName = "1#站台", TaskDetails = "入库:P04->C01", Status = "任务状态:执行中" },
|
|
|
|
|
// new TaskItem { TaskCode = "2", StationName = "2#站台", TaskDetails = "入库:P04->C01", Status = "任务状态:执行中" },
|
|
|
|
|
// new TaskItem { TaskCode = "3", StationName = "3#站台", TaskDetails = "入库:P04->C01", Status = "任务状态:执行中" },
|
|
|
|
|
// new TaskItem { TaskCode = "4", StationName = "4#站台", TaskDetails = "入库:P04->C01", Status = "任务状态:执行中" },
|
|
|
|
|
// new TaskItem { TaskCode = "5", StationName = "5#站台", TaskDetails = "入库:P04->C01", Status = "任务状态:执行中" },
|
|
|
|
|
// new TaskItem { TaskCode = "6", StationName = "6#站台", TaskDetails = "入库:P04->C01", Status = "任务状态:执行中" },
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
RefreshLogMessage($"1#站台任务下发站台任务下发站台任务下发站台任务下发站台任务下发站台任务下发");
|
|
|
|
|
RefreshLogMessage($"2#站台任务下发");
|
|
|
|
@ -106,8 +118,8 @@ namespace SlnMesnac.WPF.ViewModel.IndexPage
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 任务列表
|
|
|
|
|
/// </summary>
|
|
|
|
|
private ObservableCollection<TaskItem> _taskItems = new ObservableCollection<TaskItem>();
|
|
|
|
|
public ObservableCollection<TaskItem> TaskItems
|
|
|
|
|
private ObservableCollection<AirportTask> _taskItems = new ObservableCollection<AirportTask>();
|
|
|
|
|
public ObservableCollection<AirportTask> TaskItems
|
|
|
|
|
{
|
|
|
|
|
get => _taskItems;
|
|
|
|
|
set => SetProperty(ref _taskItems, value);
|
|
|
|
|