diff --git a/BPASmartClient.Business/Plugin/MQTTMgr.cs b/BPASmartClient.Business/Plugin/MQTTMgr.cs index 6f8765c9..c14ffa2b 100644 --- a/BPASmartClient.Business/Plugin/MQTTMgr.cs +++ b/BPASmartClient.Business/Plugin/MQTTMgr.cs @@ -60,7 +60,7 @@ namespace BPASmartClient.Business var MqttServerConfig = Plugin.GetInstance().GetPlugin().MQTT_Config; var MqttServerAccount = Plugin.GetInstance().GetPlugin().Mqtt_Account; //MQTT 初始化 - mqttProxy.Connect(MqttServerAccount.UserName, MqttServerAccount.Password, MqttServerConfig.Host, MqttServerConfig.Port, Guid.NewGuid().ToString()); + mqttProxy.Connect(MqttServerAccount.UserName, MqttServerAccount.Password, MqttServerConfig.Host, MqttServerConfig.Port, "qsqd--morks--"+ Guid.NewGuid().ToString()); ThreadManage.GetInstance().Start(() => { diff --git a/BPASmartClient.CustomResource/Pages/Model/Global.cs b/BPASmartClient.CustomResource/Pages/Model/Global.cs index 86de75c5..5cbbbb66 100644 --- a/BPASmartClient.CustomResource/Pages/Model/Global.cs +++ b/BPASmartClient.CustomResource/Pages/Model/Global.cs @@ -1,6 +1,8 @@ using BPASmartClient.CustomResource.Pages.Enums; +using BPASmartClient.Model; using System; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -13,6 +15,10 @@ namespace BPASmartClient.CustomResource.Pages.Model public static UserInfo userInfo { get; set; } = new UserInfo(); /// + /// 设备原料集合 + /// + public static ObservableCollection DeviceRawMaterials { get; set; } = new ObservableCollection(); + /// /// 重置密码页面传值 /// public static UserInfo changeUserInfo { get; set; } = null; diff --git a/BPASmartClient.CustomResource/Pages/Model/LocaMaterial.cs b/BPASmartClient.CustomResource/Pages/Model/LocaMaterial.cs new file mode 100644 index 00000000..656813d4 --- /dev/null +++ b/BPASmartClient.CustomResource/Pages/Model/LocaMaterial.cs @@ -0,0 +1,15 @@ +using BPASmartClient.Model; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPASmartClient.CustomResource.Pages.Model +{ + public class LocaMaterial + { + public ObservableCollection LocalMaterails { get; set; } = new ObservableCollection(); + } +} diff --git a/BPASmartClient.CustomResource/Pages/Model/MaterailConfig.cs b/BPASmartClient.CustomResource/Pages/Model/MaterailConfig.cs new file mode 100644 index 00000000..af6d9c71 --- /dev/null +++ b/BPASmartClient.CustomResource/Pages/Model/MaterailConfig.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPASmartClient.CustomResource.Pages.Model +{ + public class MaterailConfig + { + public string MaterialName { get; set; } + + public string MaterialId { get; set; } + + public string DeviceAddress { get; set; } + } +} diff --git a/BPASmartClient.CustomResource/Pages/Model/UserInfo.cs b/BPASmartClient.CustomResource/Pages/Model/UserInfo.cs index 7f85b3dc..d9d67582 100644 --- a/BPASmartClient.CustomResource/Pages/Model/UserInfo.cs +++ b/BPASmartClient.CustomResource/Pages/Model/UserInfo.cs @@ -1,4 +1,5 @@ using BPASmartClient.CustomResource.Pages.Enums; +using BPASmartClient.Model; using Microsoft.Toolkit.Mvvm.ComponentModel; using System; using System.Collections.Generic; @@ -11,16 +12,29 @@ namespace BPASmartClient.CustomResource.Pages.Model public class UserInfo:ObservableObject { public String LastLogInTime { get; set; } = "无"; + public List userTreeViewModels { get; set; } + public string Id { get { return _id; }set { _id = value;OnPropertyChanged(); } } private string _id; + public Permission permission { get { return _perimission; } set { _perimission = value;OnPropertyChanged(); } } private Permission _perimission; + public string UserName { get { return _userName; } set { _userName = value;OnPropertyChanged(); } } private string _userName; + public string Password { get { return _password; } set { _password = value;OnPropertyChanged(); } } private string _password; + public List CardId { get; set; } = new List(); + public List locaRawMaterials { get; set; } = new List(); + + public List devRawMaterials { get; set; } = new List(); + + + + } } diff --git a/BPASmartClient.CustomResource/Pages/View/UserConfigView.xaml b/BPASmartClient.CustomResource/Pages/View/UserConfigView.xaml index 635a2b48..ddd5b27d 100644 --- a/BPASmartClient.CustomResource/Pages/View/UserConfigView.xaml +++ b/BPASmartClient.CustomResource/Pages/View/UserConfigView.xaml @@ -224,6 +224,131 @@ + + + + @@ -243,13 +368,13 @@ - - - - - + + + + + - + - + + + - + @@ -343,18 +470,18 @@ - + @@ -366,17 +493,271 @@ - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -385,14 +766,14 @@