图表组件接入 显示成功

This commit is contained in:
mmc
2026-05-14 15:15:50 +08:00
parent abe5631642
commit adf4c37b95
9 changed files with 673 additions and 487 deletions

View File

@@ -463,16 +463,72 @@ export default function DeviceOverviewPage({ devices, planedevices, devicesAll,
{/* 条件渲染:机器人显示其余信息(此处以任务详情为例) */}
{(!selectedDevice?.productName?.includes('无人机') && !selectedDevice?.device_sn) && (
<Card title={<><RobotOutlined /> 机器人作业状态</>} bordered={false} style={{ borderRadius: 12, marginBottom: 16 }}>
<Row gutter={16}>
<Card
title={
<div style={{ display: 'flex', alignItems: 'center', gap: 8, fontSize: 14, fontWeight: 600 }}>
<RobotOutlined style={{ color: '#165DFF' }} />
机器人作业状态
</div>
}
bordered={false}
style={{
borderRadius: 12,
marginBottom: 16,
boxShadow: '0 2px 8px rgba(0,0,0,0.06)',
border: '1px solid #f0f0f0',
}}
>
<Row gutter={16} style={{ alignItems: 'center' }}>
<Col span={8}>
<Statistic title="累计里程" value={128.5} suffix="km" valueStyle={{ fontSize: 20 }} />
<div
style={{
padding: '8px 12px',
borderRadius: 8,
background: '#f8fafc',
textAlign: 'center',
}}
>
<Statistic
title={<span style={{ fontSize: 12, color: '#86909C' }}>累计里程</span>}
value={128.5}
suffix="km"
valueStyle={{ fontSize: 20, fontWeight: 700, color: '#1D2129' }}
/>
</div>
</Col>
<Col span={8}>
<Statistic title="本次作业耗时" value={45} suffix="min" valueStyle={{ fontSize: 20 }} />
<div
style={{
padding: '8px 12px',
borderRadius: 8,
background: '#f8fafc',
textAlign: 'center',
}}
>
<Statistic
title={<span style={{ fontSize: 12, color: '#86909C' }}>本次作业耗时</span>}
value={45}
suffix="min"
valueStyle={{ fontSize: 20, fontWeight: 700, color: '#1D2129' }}
/>
</div>
</Col>
<Col span={8}>
<Statistic title="预计剩余时间" value={12} suffix="min" valueStyle={{ fontSize: 20 }} />
<div
style={{
padding: '8px 12px',
borderRadius: 8,
background: '#f8fafc',
textAlign: 'center',
}}
>
<Statistic
title={<span style={{ fontSize: 12, color: '#86909C' }}>预计剩余时间</span>}
value={12}
suffix="min"
valueStyle={{ fontSize: 20, fontWeight: 700, color: '#1D2129' }}
/>
</div>
</Col>
</Row>
</Card>