diff --git a/Aucma.Core.BoxFoam/Aucma.Core.BoxFoam.csproj b/Aucma.Core.BoxFoam/Aucma.Core.BoxFoam.csproj
index a90aa8ea..8f214279 100644
--- a/Aucma.Core.BoxFoam/Aucma.Core.BoxFoam.csproj
+++ b/Aucma.Core.BoxFoam/Aucma.Core.BoxFoam.csproj
@@ -76,6 +76,15 @@
+
+
+ ..\dll\LiveCharts.dll
+
+
+ ..\dll\LiveCharts.Wpf.dll
+
+
+
Designer
diff --git a/Aucma.Core.BoxFoam/ViewModels/FoamMonitorPageViewModel.cs b/Aucma.Core.BoxFoam/ViewModels/FoamMonitorPageViewModel.cs
new file mode 100644
index 00000000..58e8c947
--- /dev/null
+++ b/Aucma.Core.BoxFoam/ViewModels/FoamMonitorPageViewModel.cs
@@ -0,0 +1,162 @@
+using CommunityToolkit.Mvvm.ComponentModel;
+using LiveCharts.Defaults;
+using LiveCharts.Wpf;
+using LiveCharts;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media;
+
+namespace Aucma.Core.BoxFoam.ViewModels
+{
+ public partial class FoamMonitorPageViewModel : ObservableObject
+ {
+ public FoamMonitorPageViewModel()
+ {
+ Task.WaitAll(InitEveryDayMethod());
+ }
+
+
+ #region 日产量
+ ///
+ /// 每日生产
+ ///
+ ///
+ private Task InitEveryDayMethod()
+ {
+ #region 按时间统计
+ ChartValues achievement = new ChartValues
+ {
+ new ObservablePoint(0, 12),
+ new ObservablePoint(1, 14),
+ new ObservablePoint(2, 28),
+ new ObservablePoint(3, 62),
+ new ObservablePoint(4, 29),
+ new ObservablePoint(5, 29),
+ new ObservablePoint(6, 7),
+ new ObservablePoint(7, 31),
+ new ObservablePoint(8, 13),
+ new ObservablePoint(9, 11),
+ new ObservablePoint(10, 8),
+ new ObservablePoint(11, 5),
+ new ObservablePoint(12, 3),
+ new ObservablePoint(13, 11),
+ new ObservablePoint(14, 15),
+ new ObservablePoint(15, 6),
+ new ObservablePoint(16, 11),
+ new ObservablePoint(17, 9),
+ new ObservablePoint(18, 11),
+ new ObservablePoint(19, 1),
+ new ObservablePoint(20, 10),
+ new ObservablePoint(21, 22),
+ new ObservablePoint(22, 16),
+ new ObservablePoint(23, 12)
+ };
+
+ var column = new ColumnSeries();
+ column.DataLabels = true;
+ column.Title = "当日小时产量统计";
+ column.Values = achievement;
+ column.Foreground = Brushes.White;
+ //柱子宽度
+ //column.Width = 30;
+ //column.MaxColumnWidth = 30;
+ //column.LabelsPosition = BarLabelPosition.Perpendicular;
+ //column.Fill = new SolidColorBrush(Color.FromRgb(34, 139, 34)); //柱状图颜色填充
+ //column.LabelPoint = p => p.Y.ToString(); //柱状图数据显示位置
+
+ ProductionHourList = new List()
+ {
+ "1:00", "2:00", "3:00", "4:00", "5:00", "6:00", "7:00", "8:00", "9:00", "10:00", "11:00", "12:00", "13:00", "14:00", "15:00", "16:00", "17:00", "18:00", "19:00", "20:00", "21:00", "22:00", "23:00", "24:00"
+ };
+ //Formatter = value => value.ToString("N");
+ Achievement.Add(column);
+
+ #endregion
+
+ #region 按类型统计
+ ChartValues achievement2 = new ChartValues();
+ Random random2 = new Random();
+ for (int i = 0; i < 2; i++)
+ {
+ achievement2.Add(random2.Next(0, 30));
+ }
+ var column2 = new ColumnSeries();
+ column2.DataLabels = true;
+ column2.Title = "当日型号产量统计";
+ column2.Values = achievement2;
+ column2.Foreground = Brushes.White;
+ ModelStatistics.Add(column2);
+
+ MaterialNameList = new List()
+ {
+ "玻璃门,SC-439", "玻璃门,SC-439,AC"
+ };
+ #endregion
+ //await InitExecMethod();
+ return Task.CompletedTask;
+ }
+
+
+ #endregion
+
+ #region 日产量柱状图X轴日期
+ ///
+ /// 日产量柱状图X轴日期
+ ///
+ private List productionHourList;
+
+ public List ProductionHourList
+ {
+ get { return productionHourList; }
+ set { productionHourList = value; }
+ }
+ #endregion
+
+ #region 型号统计
+
+
+ #region 型号统计柱状图x轴物料类型
+ ///
+ /// 型号统计柱状图x轴物料类型
+ ///
+ private List materialNameList;
+
+ public List MaterialNameList
+ {
+ get { return materialNameList; }
+ set { materialNameList = value; }
+ }
+ #endregion
+
+ #region 型号统计柱状图
+ ///
+ /// 型号统计柱状图
+ ///
+ private SeriesCollection modelStatistics = new SeriesCollection();
+
+ public SeriesCollection ModelStatistics
+ {
+ get { return modelStatistics; }
+ set { modelStatistics = value; }
+ }
+ #endregion
+
+ #endregion
+
+ #region 日产量柱状图
+ ///
+ /// 日产量柱状图
+ ///
+ private SeriesCollection achievement = new SeriesCollection();
+
+ public SeriesCollection Achievement
+ {
+ get { return achievement; }
+ set { achievement = value; }
+ }
+ #endregion
+ }
+}
diff --git a/Aucma.Core.BoxFoam/ViewModels/MainWindowViewModel.cs b/Aucma.Core.BoxFoam/ViewModels/MainWindowViewModel.cs
index 68fb566f..9ad0b283 100644
--- a/Aucma.Core.BoxFoam/ViewModels/MainWindowViewModel.cs
+++ b/Aucma.Core.BoxFoam/ViewModels/MainWindowViewModel.cs
@@ -17,6 +17,7 @@ namespace Aucma.Core.BoxFoam.ViewModels
private MonitorPageView monitorPage= new MonitorPageView();//任务监控
private RealTimeInventoryPageView realTimeInventoryPage = new RealTimeInventoryPageView();
FoamPlanPageView foamPlanPageView = new FoamPlanPageView();
+ FoamMonitorPageView foamMonitorPageView = new FoamMonitorPageView();
public MainWindowViewModel()
{
UserContent = firstPage;
@@ -128,6 +129,9 @@ namespace Aucma.Core.BoxFoam.ViewModels
case "FoamPlanPage":
UserContent = foamPlanPageView;
break;
+ case "FoamMonitorPage":
+ UserContent = foamMonitorPageView;
+ break;
default:
break;
}
diff --git a/Aucma.Core.BoxFoam/Views/FoamMonitorPageView.xaml b/Aucma.Core.BoxFoam/Views/FoamMonitorPageView.xaml
index 7bcc38d6..e6a5d873 100644
--- a/Aucma.Core.BoxFoam/Views/FoamMonitorPageView.xaml
+++ b/Aucma.Core.BoxFoam/Views/FoamMonitorPageView.xaml
@@ -4,8 +4,11 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Aucma.Core.BoxFoam.Views"
+ xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800">
+ d:DesignHeight="1080"
+ d:DesignWidth="1920">
+
@@ -90,22 +93,22 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -143,7 +146,7 @@
-
+
@@ -193,22 +196,22 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -269,11 +272,55 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Aucma.Core.BoxFoam/Views/FoamMonitorPageView.xaml.cs b/Aucma.Core.BoxFoam/Views/FoamMonitorPageView.xaml.cs
index 04f9bc9d..32394ca2 100644
--- a/Aucma.Core.BoxFoam/Views/FoamMonitorPageView.xaml.cs
+++ b/Aucma.Core.BoxFoam/Views/FoamMonitorPageView.xaml.cs
@@ -1,4 +1,5 @@
-using System;
+using Aucma.Core.BoxFoam.ViewModels;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -23,6 +24,7 @@ namespace Aucma.Core.BoxFoam.Views
public FoamMonitorPageView()
{
InitializeComponent();
+ this.DataContext = new FoamMonitorPageViewModel();
}
}
}
diff --git a/Aucma.Core.BoxFoam/Views/MainWindow.xaml b/Aucma.Core.BoxFoam/Views/MainWindow.xaml
index 8fa2e05b..77c8ca08 100644
--- a/Aucma.Core.BoxFoam/Views/MainWindow.xaml
+++ b/Aucma.Core.BoxFoam/Views/MainWindow.xaml
@@ -8,8 +8,8 @@
Title="澳柯玛箱体发泡控制系统"
d:DesignHeight="800"
d:DesignWidth="1000" FontFamily="Microsoft YaHei"
- MinHeight="1080" MinWidth="1920" WindowState="Normal"
- WindowStartupLocation="CenterScreen"
+ WindowStyle="ToolWindow" WindowState="Maximized"
+ WindowStartupLocation="CenterScreen"
>
@@ -69,7 +69,7 @@
-
+
diff --git a/Aucma.Core.BoxFoam/appsettings.json b/Aucma.Core.BoxFoam/appsettings.json
index adb844b2..df6b5977 100644
--- a/Aucma.Core.BoxFoam/appsettings.json
+++ b/Aucma.Core.BoxFoam/appsettings.json
@@ -109,7 +109,7 @@
"TriggerType": 1,
"IntervalSecond": 1,
"CycleRunTimes": 1,
- "IsStart": true,
+ "IsStart": false,
"JobParams": null,
"DelFlag": false,
"CreateBy": "admin",
@@ -131,7 +131,7 @@
"TriggerType": 1,
"IntervalSecond": 1,
"CycleRunTimes": 1,
- "IsStart": true,
+ "IsStart": false,
"JobParams": null,
"DelFlag": false,
"CreateBy": "admin",
diff --git a/Aucma.Core.Palletiz/Aucma.Core.Palletiz.csproj b/Aucma.Core.Palletiz/Aucma.Core.Palletiz.csproj
index eacc5a50..9caaaa5b 100644
--- a/Aucma.Core.Palletiz/Aucma.Core.Palletiz.csproj
+++ b/Aucma.Core.Palletiz/Aucma.Core.Palletiz.csproj
@@ -78,6 +78,9 @@
+
+ Code
+
Code
diff --git a/Aucma.Core.Palletiz/Aucma.Core.Palletiz.csproj.user b/Aucma.Core.Palletiz/Aucma.Core.Palletiz.csproj.user
index 63c4cc93..d828b87d 100644
--- a/Aucma.Core.Palletiz/Aucma.Core.Palletiz.csproj.user
+++ b/Aucma.Core.Palletiz/Aucma.Core.Palletiz.csproj.user
@@ -7,6 +7,9 @@
+
+ Designer
+
Designer
diff --git a/Aucma.Core.Palletiz/ViewModels/MainWindowViewModel.cs b/Aucma.Core.Palletiz/ViewModels/MainWindowViewModel.cs
index 5d3062d9..28e5b5d5 100644
--- a/Aucma.Core.Palletiz/ViewModels/MainWindowViewModel.cs
+++ b/Aucma.Core.Palletiz/ViewModels/MainWindowViewModel.cs
@@ -15,7 +15,7 @@ namespace Aucma.Core.Palletiz.ViewModels
private static readonly log4net.ILog log = LogManager.GetLogger(typeof(MainWindowViewModel));
private IndexPageView firstPage = new IndexPageView();//首页
private StatisticsPageView recordPage = new StatisticsPageView();
-
+ private PalletizPageView palletizPage = new PalletizPageView();
public MainWindowViewModel()
{
UserContent = firstPage;
@@ -118,6 +118,9 @@ namespace Aucma.Core.Palletiz.ViewModels
case "RecordPage":
UserContent = recordPage;
break;
+ case "PalletizPage":
+ UserContent = palletizPage;
+ break;
default:
break;
}
diff --git a/Aucma.Core.Palletiz/ViewModels/PalletizPageViewModel.cs b/Aucma.Core.Palletiz/ViewModels/PalletizPageViewModel.cs
new file mode 100644
index 00000000..5476d417
--- /dev/null
+++ b/Aucma.Core.Palletiz/ViewModels/PalletizPageViewModel.cs
@@ -0,0 +1,15 @@
+using CommunityToolkit.Mvvm.ComponentModel;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Aucma.Core.Palletiz.ViewModels
+{
+ public partial class PalletizPageViewModel : ObservableObject
+ {
+ public PalletizPageViewModel() { }
+
+ }
+}
diff --git a/Aucma.Core.Palletiz/Views/MainWindow.xaml b/Aucma.Core.Palletiz/Views/MainWindow.xaml
index 729c1fdd..d960eda4 100644
--- a/Aucma.Core.Palletiz/Views/MainWindow.xaml
+++ b/Aucma.Core.Palletiz/Views/MainWindow.xaml
@@ -8,7 +8,7 @@
d:DesignHeight="800"
d:DesignWidth="1000" FontFamily="Microsoft YaHei"
MinHeight="1080" MinWidth="1920" WindowState="Maximized"
- WindowStartupLocation="CenterScreen" WindowStyle="None"
+ WindowStartupLocation="CenterScreen" WindowStyle="ToolWindow"
>
@@ -65,6 +65,7 @@
+
diff --git a/Aucma.Core.Palletiz/Views/PalletizPageView.xaml b/Aucma.Core.Palletiz/Views/PalletizPageView.xaml
new file mode 100644
index 00000000..d0e7f921
--- /dev/null
+++ b/Aucma.Core.Palletiz/Views/PalletizPageView.xaml
@@ -0,0 +1,371 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Aucma.Core.Palletiz/Views/PalletizPageView.xaml.cs b/Aucma.Core.Palletiz/Views/PalletizPageView.xaml.cs
new file mode 100644
index 00000000..75e63b56
--- /dev/null
+++ b/Aucma.Core.Palletiz/Views/PalletizPageView.xaml.cs
@@ -0,0 +1,17 @@
+using Aucma.Core.Palletiz.ViewModels;
+using System.Windows.Controls;
+
+namespace Aucma.Core.Palletiz.Views
+{
+ ///
+ /// FoamPlanPageView.xaml 的交互逻辑
+ ///
+ public partial class PalletizPageView : UserControl
+ {
+ public PalletizPageView()
+ {
+ InitializeComponent();
+ this.DataContext = new PalletizPageViewModel();
+ }
+ }
+}
diff --git a/Aucma.Core.SheetMetal/Views/MainWindow.xaml b/Aucma.Core.SheetMetal/Views/MainWindow.xaml
index 78e67a97..edd6c4c3 100644
--- a/Aucma.Core.SheetMetal/Views/MainWindow.xaml
+++ b/Aucma.Core.SheetMetal/Views/MainWindow.xaml
@@ -8,7 +8,7 @@
Title="澳柯玛生产控制系统" Icon="/Assets/images/Icon.png"
d:DesignHeight="1080"
d:DesignWidth="1920" FontFamily="Microsoft YaHei"
- MinHeight="1080" MinWidth="1800" WindowStyle="ToolWindow" WindowState="Maximized"
+ MinHeight="1080" MinWidth="1920" WindowStyle="ToolWindow" WindowState="Maximized"
WindowStartupLocation="CenterScreen" >