修复场站管理中编辑场站之后 侧边栏电站的显示信息 完善 home页面的天气信息

This commit is contained in:
mmc
2026-09-09 17:13:51 +08:00
parent 3797701d43
commit 5c0adefcc7
6 changed files with 165 additions and 29 deletions

View File

@@ -647,8 +647,8 @@ export default function DeviceOverviewPage() {
<Card title={<><SettingOutlined />{t('devices.fixed2EquipmentListFixed2')}</>} variant="borderless" style={{ borderRadius: 8, marginBottom: 8 }}>
<Table rowKey={(record) => record.id || record.serialNumber || record.device_sn} size="small" pagination={false}
columns={[
{ title: t('devices.fixed2EquipmentFixed2NameFixed2'), dataIndex: 'name', width: 140 },
{ title: t('common.type'), dataIndex: 'type', width: 90 },
{ title: t('devices.fixed2EquipmentFixed2NameFixed2'), dataIndex: 'name', width: 180 },
{ title: t('common.type'), dataIndex: 'type', },
{
title: t('workOrder.currentStatus'),
dataIndex: 'onlineStatus',
@@ -659,15 +659,16 @@ export default function DeviceOverviewPage() {
return <Tag color={color} style={{ margin: 0 }}>{text}</Tag>;
}
}, {
title: t('devices.abMode'), dataIndex: 'mode', width: 70, render: (text) => {
let color = 'default';
if (text === '作业中') color = 'processing';
if (text === t('devices.idle')) 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: t('workOrder.currentStatus'), dataIndex: 'feStatus', width: 70, render: (text) => {
let color;
if (text == '1') color = 'processing';
if (text == '2') color = 'success';
if (text == '3') color = 'default'; // default 就是灰色标签
return <Tag color={color} style={{ margin: 0 }}>
{text == '1' ? "工作中" : text == '2' ? "空闲中" : "离线"}
</Tag>;
}
},
{