diff --git a/frontend/src/views/DeviceManagement.vue b/frontend/src/views/DeviceManagement.vue index a266d57..a42881d 100644 --- a/frontend/src/views/DeviceManagement.vue +++ b/frontend/src/views/DeviceManagement.vue @@ -11,12 +11,18 @@

{{ device.name }}

-
-
- {{ device.enabled ? '已启用' : '已禁用' }} +
+
+ + {{ device.enabled ? '已启用' : '已禁用' }} + + + {{ typeof device.status === 'object' && device.status.online ? '在线' : '离线' }} +
-
- {{ typeof device.status === 'object' && device.status.online ? '在线' : '离线' }} +
+ 编辑 + 删除
@@ -104,8 +110,6 @@ @click="controlDevice2(device, 'emergency_stop', 0)" >急停 - 编辑 - 删除
@@ -749,41 +753,63 @@ onMounted(() => { margin-bottom: 15px; } +.device-header-right { + display: flex; + align-items: center; + gap: 16px; +} + .device-status-container { display: flex; gap: 8px; } .device-enabled { - padding: 4px 8px; - border-radius: 4px; - font-size: 0.9rem; + padding: 2px 6px; + border-radius: 2px; + font-size: 0.75rem; + font-weight: 500; } .device-enabled.enabled { - background-color: #67C23A; - color: white; + background-color: #E8F5E9; + color: #2E7D32; + border: 1px solid #C8E6C9; } .device-enabled.disabled { - background-color: #909399; - color: white; + background-color: #F5F5F5; + color: #757575; + border: 1px solid #E0E0E0; } .device-status { - padding: 4px 8px; - border-radius: 4px; - font-size: 0.9rem; + padding: 2px 6px; + border-radius: 2px; + font-size: 0.75rem; + font-weight: 500; } .device-status.online { - background-color: #67C23A; - color: white; + background-color: #E3F2FD; + color: #1565C0; + border: 1px solid #BBDEFB; } .device-status.offline { - background-color: #F56C6C; - color: white; + background-color: #FFEBEE; + color: #C62828; + border: 1px solid #FFCDD2; +} + +.device-header-actions { + display: flex; + gap: 8px; +} + +.device-header-actions .el-button--text { + padding: 4px 8px; + font-size: 0.85rem; } .device-info {