KWD 3 ماه پیش
والد
کامیت
7bd9253b74
2فایلهای تغییر یافته به همراه5 افزوده شده و 4 حذف شده
  1. 4 3
      TeamAAS-VM/Core/Management.cs
  2. 1 1
      TeamAAS-VM/ViewModels/User/LoginViewModel.cs

+ 4 - 3
TeamAAS-VM/Core/Management.cs

@@ -2583,7 +2583,7 @@ namespace TeamAAS_VP.Core
                                         CTtime = ct;
                                     }
 
-                        
+
 
                                     //目前只记录当前站
                                     if (i == 0)
@@ -3689,7 +3689,7 @@ namespace TeamAAS_VP.Core
             {
                 return;
             }
-            concurrenty = true;
+            concurrenty = false;
             bool connectStaus = true;
             bool mesStatus = true;
             bool paraStatus = true;
@@ -3718,7 +3718,8 @@ namespace TeamAAS_VP.Core
             {
                 connectStaus = false;
             }
-            if (connectStaus && mesStatus && _LastAutoRunning)
+            var curUser = _systemDatabaseService.GetCurrentUser();
+            if (connectStaus && mesStatus && _LastAutoRunning && curUser.userPart == UserPart.Operator)
             {
                 RunModelBackground = System.Windows.Media.Brushes.Green;
                 ClearModeBackground = System.Windows.Media.Brushes.White;

+ 1 - 1
TeamAAS-VM/ViewModels/User/LoginViewModel.cs

@@ -197,7 +197,7 @@ namespace TeamAAS_VP.ViewModels.User
                     // mark current user in system DB and record login
                     await _systemDatabaseService.SetCurrentUserAsync(user.Id);
                     //await _systemDatabaseService.RecordUserLoginAsync(new UserLoginRecord { UserId = user.Id, Success = true, Time = DateTime.UtcNow, Message = "Login success" });
-
+                    _eventAggregator.GetEvent<CurrentStatusNotification>().Publish();
                     _eventAggregator.GetEvent<SnackbarMessageNotification>().Publish(new MessageParameter() { Msg = $"{Lang.登录成功}!", Duration = 1 });
                     UserPassword = string.Empty;
                     _eventAggregator.GetEvent<UserLoginNotification>().Publish(_systemDatabaseService.GetCurrentUser());