You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
4.4 KiB
C#

using Aucma.Core.BoxFoam.Models;
using CommunityToolkit.Mvvm.ComponentModel;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Aucma.Core.BoxFoam.ViewModels
{
public partial class MonitorPageViewModel : ObservableObject
{
public MonitorPageViewModel() { LoadData(); LoadRealTimeData(); }
#region 任务监控 data
#region 加载DataGrid数据
private void LoadData()
{
PlanInfoDataGrid.Add(new OrderInfo() { No = 1, ExecutePlanCode = "8512365486", ProductPlanCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 50, CompleteAmount = 10, BeginTime = "2023-10-07 14:29:33" });
PlanInfoDataGrid.Add(new OrderInfo() { No = 2, ExecutePlanCode = "8512365486", ProductPlanCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 50, CompleteAmount = 10, BeginTime = "2023-10-07 14:29:33" });
PlanInfoDataGrid.Add(new OrderInfo() { No = 3, ExecutePlanCode = "8512365486", ProductPlanCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 50, CompleteAmount = 10, BeginTime = "2023-10-07 14:29:33" });
PlanInfoDataGrid.Add(new OrderInfo() { No = 4, ExecutePlanCode = "8512365486", ProductPlanCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 50, CompleteAmount = 10, BeginTime = "2023-10-07 14:29:33" });
PlanInfoDataGrid.Add(new OrderInfo() { No = 5, ExecutePlanCode = "8512365486", ProductPlanCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 50, CompleteAmount = 10, BeginTime = "2023-10-07 14:29:33" });
PlanInfoDataGrid.Add(new OrderInfo() { No = 6, ExecutePlanCode = "8512365486", ProductPlanCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 50, CompleteAmount = 10, BeginTime = "2023-10-07 14:29:33" });
PlanInfoDataGrid.Add(new OrderInfo() { No = 7, ExecutePlanCode = "8512365486", ProductPlanCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 50, CompleteAmount = 10, BeginTime = "2023-10-07 14:29:33" });
PlanInfoDataGrid.Add(new OrderInfo() { No = 8, ExecutePlanCode = "8512365486", ProductPlanCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 50, CompleteAmount = 10, BeginTime = "2023-10-07 14:29:33" });
PlanInfoDataGrid.Add(new OrderInfo() { No = 9, ExecutePlanCode = "8512365486", ProductPlanCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 50, CompleteAmount = 10, BeginTime = "2023-10-07 14:29:33" });
PlanInfoDataGrid.Add(new OrderInfo() { No = 10, ExecutePlanCode = "8512365486", ProductPlanCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 50, CompleteAmount = 10, BeginTime = "2023-10-07 14:29:33" });
}
#endregion
#region 加载DataGrid数据
private void LoadRealTimeData()
{
RealTimeDataGrid.Add(new OrderInfo() { No = 1, ExecutePlanCode = "8512365486", ProductPlanCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 50, CompleteAmount = 10, BeginTime = "2023-10-07 14:29:33" });
RealTimeDataGrid.Add(new OrderInfo() { No = 2, ExecutePlanCode = "8512365486", ProductPlanCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 50, CompleteAmount = 10, BeginTime = "2023-10-07 14:29:33" });
}
#endregion
#region 初始化datagrid
private ObservableCollection<OrderInfo> planInfoDataGrid = new ObservableCollection<OrderInfo>();
public ObservableCollection<OrderInfo> PlanInfoDataGrid
{
get { return planInfoDataGrid; }
set
{
planInfoDataGrid = value;
OnPropertyChanged();//属性通知
}
}
#endregion
#region 初始化datagrid
private ObservableCollection<OrderInfo> realTimeDataGrid = new ObservableCollection<OrderInfo>();
public ObservableCollection<OrderInfo> RealTimeDataGrid
{
get { return realTimeDataGrid; }
set
{
realTimeDataGrid = value;
OnPropertyChanged();//属性通知
}
}
#endregion
#endregion
}
}