错误管理初始化
This commit is contained in:
@@ -408,11 +408,13 @@ export default function DeviceOverviewPage({ onViewStatus, selectedSn, onDeviceS
|
|||||||
const dynamicTopCards = useMemo(() => {
|
const dynamicTopCards = useMemo(() => {
|
||||||
const totalDrones = planedevices?.length || 0;
|
const totalDrones = planedevices?.length || 0;
|
||||||
const onlineDrones = planedevices?.filter(d => d.onlineStatus === 1).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 无任务
|
//key 0 有任务 1 无任务
|
||||||
const activeRobots = 0;
|
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 activeMowers = devices?.filter(d => d.feStatus == 1).length || 0; // 作业中状态数量
|
||||||
const washDroneStandby = planedevices?.[0]?.modeStatistics?.["0"] || 0;
|
const washDroneStandby = planedevices?.[0]?.modeStatistics?.["0"] || 0;
|
||||||
//key 设备状态:{"0":"空闲中","1":"现场调试","2":"远程调试","3":"固件升级中","4":"作业中"}
|
//key 设备状态:{"0":"空闲中","1":"现场调试","2":"远程调试","3":"固件升级中","4":"作业中"}
|
||||||
@@ -482,7 +484,7 @@ export default function DeviceOverviewPage({ onViewStatus, selectedSn, onDeviceS
|
|||||||
...d,
|
...d,
|
||||||
id: d.deviceId || index,
|
id: d.deviceId || index,
|
||||||
name: d.deviceAlias || d.deviceName || d.callsign || '未知设备',
|
name: d.deviceAlias || d.deviceName || d.callsign || '未知设备',
|
||||||
type: d.productName || '未知类型',
|
type: d.productName || '无人机',
|
||||||
status: d.onlineStatus === 1 ? '在线' : '离线',
|
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 ? '固件升级中' : '作业中',
|
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,
|
capacity_percent: d.capacity_percent || 100,
|
||||||
@@ -955,7 +957,7 @@ export default function DeviceOverviewPage({ onViewStatus, selectedSn, onDeviceS
|
|||||||
</Card>
|
</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">
|
<Timeline mode="left">
|
||||||
{taskTimeline.map((item, idx) => (
|
{taskTimeline.map((item, idx) => (
|
||||||
<Timeline.Item key={idx} color={item.color} label={<div style={{ fontSize: 11, color: '#999' }}>{item.time}</div>}>
|
<Timeline.Item key={idx} color={item.color} label={<div style={{ fontSize: 11, color: '#999' }}>{item.time}</div>}>
|
||||||
|
|||||||
@@ -1306,7 +1306,7 @@ export default function WayLinePage({ onRefresh }) {
|
|||||||
|
|
||||||
<Col xs={24} xl={12}>
|
<Col xs={24} xl={12}>
|
||||||
<Card
|
<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 }} />}
|
extra={<MoreOutlined style={{ cursor: 'pointer', fontSize: 18 }} />}
|
||||||
bordered={false}
|
bordered={false}
|
||||||
bodyStyle={{ padding: 16 }}
|
bodyStyle={{ padding: 16 }}
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ import {
|
|||||||
KeyOutlined, AppstoreOutlined, BankOutlined,
|
KeyOutlined, AppstoreOutlined, BankOutlined,
|
||||||
NotificationOutlined,
|
NotificationOutlined,
|
||||||
ExperimentOutlined,
|
ExperimentOutlined,
|
||||||
EnvironmentOutlined
|
EnvironmentOutlined,
|
||||||
|
ExclamationCircleOutlined
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
import UserRolePage from '../components/SystemSetting/UserPage';
|
import UserRolePage from '../components/SystemSetting/UserPage';
|
||||||
import MenuList from '../components/SystemSetting/MenuList';
|
import MenuList from '../components/SystemSetting/MenuList';
|
||||||
@@ -116,6 +117,9 @@ export default function SystemSettings() {
|
|||||||
if (item.path === '/systemSetting/devices') {
|
if (item.path === '/systemSetting/devices') {
|
||||||
return { key: 'devices', label: '设备管理', icon: <AppstoreOutlined /> };
|
return { key: 'devices', label: '设备管理', icon: <AppstoreOutlined /> };
|
||||||
}
|
}
|
||||||
|
if (item.path === '/systemSetting/errorManage') {
|
||||||
|
return { key: 'errorManager', label: '错误管理', icon: <ExclamationCircleOutlined /> };
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}).filter(Boolean);
|
}).filter(Boolean);
|
||||||
|
|
||||||
@@ -131,6 +135,7 @@ export default function SystemSettings() {
|
|||||||
const NoticePage = () => <div style={{ padding: 20 }}><h2>通知策略页面</h2></div>;
|
const NoticePage = () => <div style={{ padding: 20 }}><h2>通知策略页面</h2></div>;
|
||||||
const DataSafetyPage = () => <div style={{ padding: 20 }}><h2>数据与安全页面</h2></div>;
|
const DataSafetyPage = () => <div style={{ padding: 20 }}><h2>数据与安全页面</h2></div>;
|
||||||
const SystemMaintenancePage = () => <div style={{ padding: 20 }}><h2>系统维护页面</h2></div>;
|
const SystemMaintenancePage = () => <div style={{ padding: 20 }}><h2>系统维护页面</h2></div>;
|
||||||
|
const ErrorManager = () => <div style={{ padding: 20 }}><h2>错误管理页面</h2></div>;
|
||||||
const DefaultPage = () => <div style={{ padding: 20 }}><h2>请选择菜单</h2></div>;
|
const DefaultPage = () => <div style={{ padding: 20 }}><h2>请选择菜单</h2></div>;
|
||||||
const renderTabContent = () => {
|
const renderTabContent = () => {
|
||||||
switch (activeTab) {
|
switch (activeTab) {
|
||||||
@@ -156,6 +161,8 @@ export default function SystemSettings() {
|
|||||||
return <OnlineUserPage />;
|
return <OnlineUserPage />;
|
||||||
case 'devices':
|
case 'devices':
|
||||||
return <DeviceManagementPage />;
|
return <DeviceManagementPage />;
|
||||||
|
case "errorManager":
|
||||||
|
return <ErrorManager />;
|
||||||
default:
|
default:
|
||||||
return <DefaultPage />;
|
return <DefaultPage />;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user