feat(设备管理): 使用函数替代映射表获取设备和状态信息

This commit is contained in:
zhang1106
2026-02-12 09:48:01 +08:00
parent e55031f8cc
commit b84b8f7594
8 changed files with 304 additions and 7 deletions
+3 -3
View File
@@ -2222,7 +2222,7 @@ function DeviceManagement() {
{selectedDevice.type ? (
<Space>
{getDeviceTypeIcon(selectedDevice.type)}
<span>{typeMap[selectedDevice.type] || selectedDevice.type}</span>
<span>{getTypeLabel(selectedDevice.type)}</span>
</Space>
) : (
'-'
@@ -2283,13 +2283,13 @@ function DeviceManagement() {
style={{
marginLeft: 8,
color: selectedDevice.status
? statusMap[selectedDevice.status]?.color
? getStatusConfig(selectedDevice.status).color
: '#666',
fontWeight: '600',
}}
>
{selectedDevice.status
? statusMap[selectedDevice.status]?.text || selectedDevice.status
? getStatusConfig(selectedDevice.status).text || selectedDevice.status
: '-'}
</span>
</div>
+1 -1
View File
@@ -368,7 +368,7 @@ const SystemSettings = () => {
'site_logo',
'timezone',
'date_format',
'session_timeout',
'idle_timeout',
'max_login_attempts',
'maintenance_mode',
];