增加了机器人任务模块
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Layout, Typography, Menu, Tabs } from 'antd';
|
||||
import { AimOutlined, AppstoreOutlined, SettingOutlined } from '@ant-design/icons';
|
||||
import { AimOutlined, AppstoreOutlined, SettingOutlined, BranchesOutlined } from '@ant-design/icons';
|
||||
import DeviceOverviewPage from '../components/devices/DeviceOverviewPage';
|
||||
import DeviceStatusPage from '../components/devices/DeviceStatusPage';
|
||||
import { getSiteDevice, getSiteUAVList } from '../api/device';
|
||||
import { useSelector } from 'react-redux';
|
||||
import { RootState } from '../store';
|
||||
import WayLinePage from '../components/devices/WayLinePage';
|
||||
import RobotTaskPage from '../components/devices/RobotTaskPage';
|
||||
|
||||
const { Header, Content } = Layout;
|
||||
const { Text } = Typography;
|
||||
@@ -25,6 +26,7 @@ export default function DeviceIndexPage() {
|
||||
{ key: 'overview', label: '装备总览', icon: <AppstoreOutlined /> },
|
||||
{ key: 'status', label: '设备状态', icon: <SettingOutlined /> },
|
||||
{ key: 'wayLineTask', label: '航线任务', icon: <AimOutlined /> },
|
||||
{ key: 'robotTask', label: '机器人任务', icon: <BranchesOutlined /> },
|
||||
];
|
||||
|
||||
// 👇 核心:给无人机补全 lastRunningStatus + type: 'plane'
|
||||
@@ -102,6 +104,7 @@ export default function DeviceIndexPage() {
|
||||
/>;
|
||||
}
|
||||
if (activeTab === 'wayLineTask') return <WayLinePage planedevices={planedevices} onRefresh={fetchAllData} />;
|
||||
if (activeTab === 'robotTask') return <RobotTaskPage devices={devices} onRefresh={fetchAllData} />;
|
||||
return null;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user