From 370f042f439bd16b682b712a920a70794d7878cb Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期三, 19 十一月 2025 10:53:42 +0800
Subject: [PATCH] 1.添加EE级别的操作员;

---
 SourceCode/Bond/Servo/CUserManager2.cpp |    9 ++++++++-
 SourceCode/Bond/Servo/ServoDlg.cpp      |    2 +-
 SourceCode/Bond/Servo/CPageGraph1.cpp   |    2 +-
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/SourceCode/Bond/Servo/CPageGraph1.cpp b/SourceCode/Bond/Servo/CPageGraph1.cpp
index 84b7d0c..2ae613e 100644
--- a/SourceCode/Bond/Servo/CPageGraph1.cpp
+++ b/SourceCode/Bond/Servo/CPageGraph1.cpp
@@ -180,7 +180,7 @@
 {
 	CDialogEx::OnInitDialog();
 	InitRxWindows();
-	SetTimer(TIMER_ID_DEVICE_STATUS, 3000, nullptr);
+	SetTimer(TIMER_ID_DEVICE_STATUS, 800, nullptr);
 	SetTimer(TIMER_ID_ROBOT_STATUS, 1000, nullptr); // 姣� 1000ms 鏇存柊涓�娆$姸鎬�
 
 	// 鍥剧ず
diff --git a/SourceCode/Bond/Servo/CUserManager2.cpp b/SourceCode/Bond/Servo/CUserManager2.cpp
index 4f45e52..373025f 100644
--- a/SourceCode/Bond/Servo/CUserManager2.cpp
+++ b/SourceCode/Bond/Servo/CUserManager2.cpp
@@ -4,6 +4,7 @@
 #include <vector>
 #include <map>
 #include <utility>
+#include <algorithm>
 #include <sstream>
 #include <cwchar>
 
@@ -146,9 +147,15 @@
 		}
 	}
 
+	std::sort(roles.begin(), roles.end(), [](const RoleInfo& a, const RoleInfo& b) {
+		if (a.level == b.level) {
+			return a.name < b.name;
+		}
+		return a.level > b.level;
+	});
+
 	return roles;
 }
-
 std::vector<CUserManager2::UserInfo> CUserManager2::getUsers()
 {
 	std::vector<UserInfo> users;
diff --git a/SourceCode/Bond/Servo/ServoDlg.cpp b/SourceCode/Bond/Servo/ServoDlg.cpp
index f563fbc..c886f66 100644
--- a/SourceCode/Bond/Servo/ServoDlg.cpp
+++ b/SourceCode/Bond/Servo/ServoDlg.cpp
@@ -372,7 +372,7 @@
 
 	// model init
 	theApp.m_model.init();
-	SetTimer(TIMER_ID_LOGIN, 1000, nullptr);
+	SetTimer(TIMER_ID_LOGIN, 1500, nullptr);
 
 	// 鑿滃崟
 	CMenu menu;

--
Gitblit v1.9.3