1
This commit is contained in:
@ -61,7 +61,7 @@ namespace 货架标准上位机
|
||||
}
|
||||
}
|
||||
|
||||
public class Scanner()
|
||||
public class Scanner
|
||||
{
|
||||
public SerialPortClient SerialPortClient { get; set; }
|
||||
|
||||
|
@ -49,34 +49,34 @@ namespace 货架标准上位机.ViewModel
|
||||
public async void AddUserControl()
|
||||
{
|
||||
//var dia = Dialog.Show(new TextDialog());
|
||||
try
|
||||
{
|
||||
var body = new GetShelfStatusRequest()
|
||||
{
|
||||
UserName = "xxx",
|
||||
DeviceType = "WCS前端",
|
||||
GroupNames = LocalFile.Config.GroupName,
|
||||
//try
|
||||
//{
|
||||
// var body = new GetShelfStatusRequest()
|
||||
// {
|
||||
// UserName = "xxx",
|
||||
// DeviceType = "WCS前端",
|
||||
// GroupNames = LocalFile.Config.GroupName,
|
||||
|
||||
};
|
||||
var Result = await ApiHelp.Post<GetShelfStatusResponse>([LocalFile.Config.ApiIpHost, "home/getShelfStatus"], body);
|
||||
if (Result != null && Result.Data?.Count > 0)
|
||||
{
|
||||
wrapPanel.Children.Clear();
|
||||
Result.Data.ForEach(t =>
|
||||
{
|
||||
var shelf = new ShelfStatusControl(t.ShelfCode, t.CurentMode, t.GroupName);
|
||||
wrapPanel.Children.Add(shelf);
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// };
|
||||
// var Result = await ApiHelp.Post<GetShelfStatusResponse>([LocalFile.Config.ApiIpHost, "home/getShelfStatus"], body);
|
||||
// if (Result != null && Result.Data?.Count > 0)
|
||||
// {
|
||||
// wrapPanel.Children.Clear();
|
||||
// Result.Data.ForEach(t =>
|
||||
// {
|
||||
// var shelf = new ShelfStatusControl(t.ShelfCode, t.CurentMode, t.GroupName);
|
||||
// wrapPanel.Children.Add(shelf);
|
||||
// });
|
||||
// }
|
||||
//}
|
||||
//catch (Exception ex)
|
||||
//{
|
||||
|
||||
}
|
||||
finally
|
||||
{
|
||||
//dia.Close();
|
||||
}
|
||||
//}
|
||||
//finally
|
||||
//{
|
||||
// //dia.Close();
|
||||
//}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
@ -108,7 +108,7 @@ namespace 货架标准上位机.ViewModel
|
||||
}
|
||||
Items.CanNotify = true;
|
||||
}
|
||||
public class DataModel()
|
||||
public class DataModel
|
||||
{
|
||||
public string MatCode { get; set; }
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ namespace 货架标准上位机.ViewModel
|
||||
}
|
||||
Items.CanNotify = true;
|
||||
}
|
||||
public class DataModel()
|
||||
public class DataModel
|
||||
{
|
||||
public string MatCode { get; set; }
|
||||
}
|
||||
|
@ -128,43 +128,43 @@ namespace 货架标准上位机
|
||||
/// </summary>
|
||||
public static void NotLogin()
|
||||
{
|
||||
try
|
||||
{
|
||||
var body = new GetUsersRequest()
|
||||
{
|
||||
UserName = "admin",
|
||||
DeviceType = "WCS前端",
|
||||
Info = "123",
|
||||
};
|
||||
var Result = ApiHelp.Post<ResponseCommon<List<UserModel>>>([LocalFile.Config.ApiIpHost, "user/getUsers"], body).Result;
|
||||
if (Result != null && Result.Data.Any())
|
||||
{
|
||||
UserInfoView.viewModel.User = Result.Data.First();
|
||||
}
|
||||
//try
|
||||
//{
|
||||
// var body = new GetUsersRequest()
|
||||
// {
|
||||
// UserName = "admin",
|
||||
// DeviceType = "WCS前端",
|
||||
// Info = "123",
|
||||
// };
|
||||
// var Result = ApiHelp.Post<ResponseCommon<List<UserModel>>>([LocalFile.Config.ApiIpHost, "user/getUsers"], body).Result;
|
||||
// if (Result != null && Result.Data.Any())
|
||||
// {
|
||||
// UserInfoView.viewModel.User = Result.Data.First();
|
||||
// }
|
||||
|
||||
var bodyRole = new GetUsersRequest()
|
||||
{
|
||||
UserName = "admin",
|
||||
DeviceType = "WCS前端",
|
||||
Info = "123",
|
||||
// var bodyRole = new GetUsersRequest()
|
||||
// {
|
||||
// UserName = "admin",
|
||||
// DeviceType = "WCS前端",
|
||||
// Info = "123",
|
||||
|
||||
};
|
||||
var ResultRole = ApiHelp.Post<ResponseCommon<List<RoleModel>>>([LocalFile.Config.ApiIpHost, "user/getRoles"], body).Result;
|
||||
if (ResultRole != null && ResultRole.Data.Any())
|
||||
{
|
||||
UserInfoView.viewModel.Roles = ResultRole.Data;
|
||||
}
|
||||
// };
|
||||
// var ResultRole = ApiHelp.Post<ResponseCommon<List<RoleModel>>>([LocalFile.Config.ApiIpHost, "user/getRoles"], body).Result;
|
||||
// if (ResultRole != null && ResultRole.Data.Any())
|
||||
// {
|
||||
// UserInfoView.viewModel.Roles = ResultRole.Data;
|
||||
// }
|
||||
|
||||
UserInfoView.viewModel.IsLogin = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Growl.Error("加载数据失败:" + ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
//dia.Close();
|
||||
}
|
||||
// UserInfoView.viewModel.IsLogin = true;
|
||||
//}
|
||||
//catch (Exception ex)
|
||||
//{
|
||||
// Growl.Error("加载数据失败:" + ex.Message);
|
||||
//}
|
||||
//finally
|
||||
//{
|
||||
// //dia.Close();
|
||||
//}
|
||||
}
|
||||
|
||||
//接口获取User对象
|
||||
|
Reference in New Issue
Block a user