细节
This commit is contained in:
@@ -3,7 +3,7 @@ import { Layout, Typography, Menu, Tabs } from 'antd';
|
||||
import { AimOutlined, AppstoreOutlined, SettingOutlined } from '@ant-design/icons';
|
||||
import DeviceOverviewPage from '../components/devices/DeviceOverviewPage';
|
||||
import DeviceStatusPage from '../components/devices/DeviceStatusPage';
|
||||
import { getDeviceListApi, getSiteDevice, getSiteUAVList } from '../api/device';
|
||||
import { getSiteDevice, getSiteUAVList } from '../api/device';
|
||||
import { useSelector } from 'react-redux';
|
||||
import { RootState } from '../store';
|
||||
import WayLinePage from '../components/devices/WayLinePage';
|
||||
@@ -11,12 +11,6 @@ import WayLinePage from '../components/devices/WayLinePage';
|
||||
const { Header, Content } = Layout;
|
||||
const { Text } = Typography;
|
||||
|
||||
const DeviceStatusSettingPage = ({ serialNumber }) => (
|
||||
<div style={{ padding: 20 }}>
|
||||
<h2>设置状态页面</h2>
|
||||
<p>当前查看设备序列号: <span style={{ fontWeight: 'bold', color: '#1890ff' }}>{serialNumber || '未选择设备'}</span></p>
|
||||
</div>
|
||||
);
|
||||
|
||||
export default function DeviceIndexPage() {
|
||||
const [activeTab, setActiveTab] = useState('overview');
|
||||
@@ -53,14 +47,11 @@ export default function DeviceIndexPage() {
|
||||
// ====================== ✅ 核心改造 ======================
|
||||
planeData = planeData.map(item => ({
|
||||
...item,
|
||||
// 给无人机统一设置 type: plane
|
||||
type: 'plane',
|
||||
// 自动生成 lastRunningStatus(经纬度取无人机自身字段)
|
||||
lastRunningStatus: {
|
||||
longitude: item.longitude || 0,
|
||||
latitude: item.latitude || 0,
|
||||
},
|
||||
// 兼容地图取设备名/序列号
|
||||
deviceAlias: item.drone_callsign || item.device_sn
|
||||
|| '无人机',
|
||||
|
||||
|
||||
Reference in New Issue
Block a user