执行恢复任务接口接入 机器人状态显示 完善数据
This commit is contained in:
@@ -425,7 +425,7 @@ export default function DeviceOverviewPage({ onViewStatus, selectedSn, onDeviceS
|
||||
name: d.deviceAlias || d.deviceName || d.callsign || '未知设备',
|
||||
type: d.productName || '未知类型',
|
||||
status: d.onlineStatus === 1 ? '在线' : '离线',
|
||||
mode: d.status === 4 ? '待命' : '作业中',
|
||||
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,
|
||||
position: d.position || '站内',
|
||||
task: d.status === 4 ? '待命' : '作业中',
|
||||
@@ -551,19 +551,23 @@ export default function DeviceOverviewPage({ onViewStatus, selectedSn, onDeviceS
|
||||
return <Tag color={color} style={{ margin: 0 }}>{text}</Tag>;
|
||||
}
|
||||
}, {
|
||||
title: '模式', dataIndex: 'feStatus', width: 70, render: (feStatus) => {
|
||||
console.log('feStatus:', feStatus);
|
||||
const text = feStatus == 1 ? '任务中' : feStatus == 2 ? '空闲' : '离线';
|
||||
const color = feStatus === 1 ? 'processing' : feStatus === 2 ? 'success' : 'default';
|
||||
title: '模式', dataIndex: 'mode', width: 70, render: (text) => {
|
||||
let color = 'default';
|
||||
if (text === '作业中') color = 'processing';
|
||||
if (text === '空闲') color = 'success';
|
||||
if (text === '空闲中') color = 'success';
|
||||
if (text === '现场调试') color = 'warning';
|
||||
if (text === '远程调试') color = 'warning';
|
||||
if (text === '固件升级中') color = 'error';
|
||||
return <Tag color={color} style={{ margin: 0 }}>{text}</Tag>;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '电量',
|
||||
dataIndex: 'lastrunning',
|
||||
dataIndex: 'lastRunningStatus',
|
||||
width: 70,
|
||||
render: (lastrunning) => {
|
||||
const v = lastrunning?.battery || 0;
|
||||
render: (lastRunningStatus) => {
|
||||
const v = lastRunningStatus?.battery || 100;
|
||||
return <Progress
|
||||
percent={v}
|
||||
size="small"
|
||||
@@ -571,8 +575,8 @@ export default function DeviceOverviewPage({ onViewStatus, selectedSn, onDeviceS
|
||||
/>;
|
||||
}
|
||||
}, { title: '位置', dataIndex: 'position', width: 90 },
|
||||
{ title: '当前任务', dataIndex: 'task', width: 100 },
|
||||
{ title: '通讯状态', dataIndex: 'comm', width: 70, render: v => <Badge status={v.includes('-') ? 'warning' : 'success'} text={v} /> },
|
||||
//{ title: '当前任务', dataIndex: 'task', width: 100 },
|
||||
{ title: '通讯状态', dataIndex: 'comm', width: 100, render: v => <Badge status={v.includes('-') ? 'warning' : 'success'} text={v} /> },
|
||||
{ title: '操作', key: 'action', width: 80, render: () => <Space size={4}><Button size="small" type="text" icon={<EditOutlined />} /><Button size="small" type="text" icon={<SettingOutlined />} /></Space> },
|
||||
]}
|
||||
dataSource={dynamicScheduleList}
|
||||
@@ -822,12 +826,12 @@ export default function DeviceOverviewPage({ onViewStatus, selectedSn, onDeviceS
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<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' }} />
|
||||
<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}>
|
||||
<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' }} />
|
||||
<Statistic title={<span style={{ fontSize: 12, color: '#86909C' }}>累计作业时长</span>} value={12} suffix="min" valueStyle={{ fontSize: 20, fontWeight: 700, color: '#1D2129' }} />
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
Reference in New Issue
Block a user