错误管理初始化

This commit is contained in:
mmc
2026-07-06 14:09:05 +08:00
parent bfe802fa2a
commit 45774ec306
3 changed files with 15 additions and 6 deletions

View File

@@ -408,11 +408,13 @@ export default function DeviceOverviewPage({ onViewStatus, selectedSn, onDeviceS
const dynamicTopCards = useMemo(() => {
const totalDrones = planedevices?.length || 0;
const onlineDrones = planedevices?.filter(d => d.onlineStatus === 1).length || 0;
const totalRobots = devicesAll?.filter(d => d.productName?.includes('巡检')).length || 0;
const totalRobots = 1;
//const totalRobots = devicesAll?.filter(d => d.productName?.includes('巡检')).length || 0;
//key 0 有任务 1 无任务
const activeRobots = 0;
const totalMowers = devicesAll?.filter(d => d.productName?.includes('割草机')).length || 0;
const totalMowers = 1;
//const totalMowers = devicesAll?.filter(d => d.productName?.includes('割草机')).length || 0;
const activeMowers = devices?.filter(d => d.feStatus == 1).length || 0; // 作业中状态数量
const washDroneStandby = planedevices?.[0]?.modeStatistics?.["0"] || 0;
//key 设备状态:{"0":"空闲中","1":"现场调试","2":"远程调试","3":"固件升级中","4":"作业中"}
@@ -482,7 +484,7 @@ export default function DeviceOverviewPage({ onViewStatus, selectedSn, onDeviceS
...d,
id: d.deviceId || index,
name: d.deviceAlias || d.deviceName || d.callsign || '未知设备',
type: d.productName || '未知类型',
type: d.productName || '无人机',
status: d.onlineStatus === 1 ? '在线' : '离线',
mode: d.feStatus == 1 ? '作业中' : d.feStatus == 2 ? '空闲' : d.mode_code == 0 ? '空闲' : d.mode_code == 1 ? '现场调试' : d.mode_code == 2 ? '远程调试' : d.mode_code == 3 ? '固件升级中' : '作业中',
capacity_percent: d.capacity_percent || 100,
@@ -955,7 +957,7 @@ export default function DeviceOverviewPage({ onViewStatus, selectedSn, onDeviceS
</Card>
)}
<Card title={<><ClockCircleOutlined /> 任务执行时间线</>} bordered={false} style={{ borderRadius: 12 }} extra={<div style={{ fontSize: 12, color: '#666' }}>今天 2025-05-24</div>}>
<Card title={<><ClockCircleOutlined /> 任务执行时间线</>} bordered={false} style={{ borderRadius: 12 }} extra={<div style={{ fontSize: 12, color: '#666' }}></div>}>
<Timeline mode="left">
{taskTimeline.map((item, idx) => (
<Timeline.Item key={idx} color={item.color} label={<div style={{ fontSize: 11, color: '#999' }}>{item.time}</div>}>

View File

@@ -1306,7 +1306,7 @@ export default function WayLinePage({ onRefresh }) {
<Col xs={24} xl={12}>
<Card
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>任务甘特视图 / 排班视图 <Text type="secondary" style={{ fontSize: 11, fontWeight: 400, marginLeft: 12 }}>今日 (2025-05-24)</Text></span>}
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>任务甘特视图 / 排班视图 <Text type="secondary" style={{ fontSize: 11, fontWeight: 400, marginLeft: 12 }}></Text></span>}
extra={<MoreOutlined style={{ cursor: 'pointer', fontSize: 18 }} />}
bordered={false}
bodyStyle={{ padding: 16 }}