xx
This commit is contained in:
@@ -135,11 +135,9 @@ export default function DeviceStatusPage({
|
||||
|
||||
// 当MQTT数据更新时,更新持久化数据(只在有新数据时更新)
|
||||
const handleMqttMessage = (topic, message) => {
|
||||
console.log('DeviceStatusPage MQTT 消息到达 - Topic:', topic);
|
||||
console.log('DeviceStatusPage MQTT 消息内容:', message);
|
||||
|
||||
try {
|
||||
const parsedMessage = JSON.parse(message);
|
||||
console.log('DeviceStatusPage 解析后的消息:', parsedMessage);
|
||||
|
||||
if (parsedMessage.data && parsedMessage.data.host) {
|
||||
const { host } = parsedMessage.data;
|
||||
@@ -571,11 +569,11 @@ export default function DeviceStatusPage({
|
||||
</>
|
||||
}
|
||||
bordered={false}
|
||||
style={{ borderRadius: 12 }}
|
||||
style={{ borderRadius: 12, marginBottom: 8 }}
|
||||
bodyStyle={{ padding: 12 }}
|
||||
>
|
||||
{!isUAV && (
|
||||
<Space style={{ marginBottom: 12 }}>
|
||||
<Space style={{ marginBottom: 8 }}>
|
||||
<Button type={mowerView === 'front' ? 'primary' : 'default'} icon={<CameraOutlined />} onClick={() => setMowerView('front')}>前视</Button>
|
||||
<Button type={mowerView === 'back' ? 'primary' : 'default'} onClick={() => setMowerView('back')}>后视</Button>
|
||||
<Button type={mowerView === 'left' ? 'primary' : 'default'} onClick={() => setMowerView('left')}>左视</Button>
|
||||
@@ -713,7 +711,7 @@ export default function DeviceStatusPage({
|
||||
<Card
|
||||
title={<><DashboardOutlined /> {isUAV ? '无人机状态' : '机器人状态'}详情</>}
|
||||
bordered={false}
|
||||
style={{ borderRadius: 12, marginBottom: 16 }}
|
||||
style={{ borderRadius: 12, marginBottom: 8 }}
|
||||
extra={<Tag color={device.onlineStatus === 1 ? 'success' : 'default'}>{device.onlineStatus === 1 ? '在线' : '离线'}</Tag>}
|
||||
>
|
||||
{isUAV ? (
|
||||
@@ -771,10 +769,10 @@ export default function DeviceStatusPage({
|
||||
</Tag>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="GPS 卫星数">
|
||||
<Badge count={(currentDroneData || uavState || device).position_state?.gps_number || 0} style={{ backgroundColor: '#1890ff' }} />
|
||||
<Badge showZero count={(currentDroneData || uavState || device).position_state?.gps_number || 0} style={{ backgroundColor: '#1890ff' }} />
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="RTK 卫星数">
|
||||
<Badge count={(currentDroneData || uavState || device).position_state?.rtk_number || 0} style={{ backgroundColor: '#52c41a' }} />
|
||||
<Badge showZero count={(currentDroneData || uavState || device).position_state?.rtk_number || 0} style={{ backgroundColor: '#52c41a' }} />
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="RTK 状态">
|
||||
<Tag color={(currentDroneData || uavState || device).position_state?.is_fixed === 2 || (currentDroneData || uavState || device).position_state?.is_fixed === 'fixing_successful' ? 'success' : 'warning'}>
|
||||
|
||||
Reference in New Issue
Block a user