细节
This commit is contained in:
@@ -81,9 +81,9 @@ export default function DeviceManagementPage() {
|
|||||||
// 无人机分页 + 筛选
|
// 无人机分页 + 筛选
|
||||||
const [droneParams, setDroneParams] = useState({
|
const [droneParams, setDroneParams] = useState({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
gateway_sn: '',
|
sn: '',
|
||||||
status: "",
|
status: ""
|
||||||
});
|
});
|
||||||
const [droneTotal, setDroneTotal] = useState(0);
|
const [droneTotal, setDroneTotal] = useState(0);
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@ export default function DeviceManagementPage() {
|
|||||||
const [bindSmartForm] = Form.useForm();
|
const [bindSmartForm] = Form.useForm();
|
||||||
const [smartParams, setSmartParams] = useState({
|
const [smartParams, setSmartParams] = useState({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
serialNumber: '',
|
serialNumber: '',
|
||||||
});
|
});
|
||||||
const [smartTotal, setSmartTotal] = useState(0);
|
const [smartTotal, setSmartTotal] = useState(0);
|
||||||
@@ -389,7 +389,7 @@ export default function DeviceManagementPage() {
|
|||||||
|
|
||||||
const droneColumns = [
|
const droneColumns = [
|
||||||
{ title: '设备名称', width: 150, dataIndex: 'drone_callsign', key: 'name' },
|
{ title: '设备名称', width: 150, dataIndex: 'drone_callsign', key: 'name' },
|
||||||
{ title: 'SN码', width: 150, dataIndex: 'device_sn', key: 'sn' },
|
{ title: 'SN码', width: 180, dataIndex: 'device_sn', key: 'sn' },
|
||||||
{ title: '机场SN', width: 150, dataIndex: 'gateway_sn', key: 'gsn' },
|
{ title: '机场SN', width: 150, dataIndex: 'gateway_sn', key: 'gsn' },
|
||||||
{
|
{
|
||||||
title: '所属组织', width: 150, key: 'orgName',
|
title: '所属组织', width: 150, key: 'orgName',
|
||||||
@@ -636,8 +636,9 @@ export default function DeviceManagementPage() {
|
|||||||
<Input
|
<Input
|
||||||
placeholder="机场SN"
|
placeholder="机场SN"
|
||||||
style={{ width: 200 }}
|
style={{ width: 200 }}
|
||||||
value={droneParams.gateway_sn}
|
allowClear
|
||||||
onChange={(e) => setDroneParams({ ...droneParams, gateway_sn: e.target.value })}
|
value={droneParams.sn}
|
||||||
|
onChange={(e) => setDroneParams({ ...droneParams, sn: e.target.value })}
|
||||||
/>
|
/>
|
||||||
<Select
|
<Select
|
||||||
placeholder="状态"
|
placeholder="状态"
|
||||||
@@ -649,7 +650,7 @@ export default function DeviceManagementPage() {
|
|||||||
<Select.Option value="1">在线</Select.Option>
|
<Select.Option value="1">在线</Select.Option>
|
||||||
<Select.Option value="2">离线</Select.Option>
|
<Select.Option value="2">离线</Select.Option>
|
||||||
</Select>
|
</Select>
|
||||||
<Button icon={<ReloadOutlined />} onClick={() => setDroneParams({ pageNum: 1, pageSize: 10, gateway_sn: '', status: '' })}>重置</Button>
|
<Button icon={<ReloadOutlined />} onClick={() => setDroneParams({ pageNum: 1, pageSize: 10, sn: '', status: '' })}>重置</Button>
|
||||||
|
|
||||||
<Button type="primary" icon={<LinkOutlined />} onClick={openBindModal}>绑定无人机</Button>
|
<Button type="primary" icon={<LinkOutlined />} onClick={openBindModal}>绑定无人机</Button>
|
||||||
<Button disabled={selectedDroneKeys.length === 0} onClick={() => handleUnbind(selectedDroneKeys, 1)}>批量解绑(用户)</Button>
|
<Button disabled={selectedDroneKeys.length === 0} onClick={() => handleUnbind(selectedDroneKeys, 1)}>批量解绑(用户)</Button>
|
||||||
|
|||||||
@@ -404,7 +404,7 @@ const SerialNumGenerate = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ padding: '0px 20px 40px', minHeight: '100vh' }}>
|
<div style={{ padding: '0px 0px 40px', minHeight: '100vh' }}>
|
||||||
{contextHolder}
|
{contextHolder}
|
||||||
|
|
||||||
<Card
|
<Card
|
||||||
|
|||||||
@@ -15,9 +15,7 @@ import {
|
|||||||
CarOutlined
|
CarOutlined
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
|
|
||||||
import { useSelector } from 'react-redux';
|
|
||||||
import { getDeviceListApi } from '../../api/device.ts';
|
|
||||||
import { RootState } from '@/src/store';
|
|
||||||
import DroneLivePlayer from '../VolcRtcPlayer.jsx';
|
import DroneLivePlayer from '../VolcRtcPlayer.jsx';
|
||||||
import DroneVideoPlayer from './DroneVideoPlayer';
|
import DroneVideoPlayer from './DroneVideoPlayer';
|
||||||
import AgoraTextTest from '../AgoraRtc.tsx';
|
import AgoraTextTest from '../AgoraRtc.tsx';
|
||||||
|
|||||||
@@ -186,9 +186,6 @@ export default function WayLinePage({ planedevices }) {
|
|||||||
setTaskForm(prev => ({ ...prev, sn: listDrone.gateway_sn || '' }));
|
setTaskForm(prev => ({ ...prev, sn: listDrone.gateway_sn || '' }));
|
||||||
}
|
}
|
||||||
}, [listDrone]);
|
}, [listDrone]);
|
||||||
// ==============================================
|
|
||||||
// ✅ 创建任务模块结束
|
|
||||||
// ==============================================
|
|
||||||
|
|
||||||
// 顶部统计
|
// 顶部统计
|
||||||
const topCards = [
|
const topCards = [
|
||||||
@@ -503,7 +500,8 @@ export default function WayLinePage({ planedevices }) {
|
|||||||
allowClear
|
allowClear
|
||||||
options={planedevices?.map(item => ({
|
options={planedevices?.map(item => ({
|
||||||
value: item.device_sn,
|
value: item.device_sn,
|
||||||
label: item.drone_callsign || item.device_sn
|
label: item.drone_callsign || item.device_sn || item.callsign
|
||||||
|
|
||||||
}))}
|
}))}
|
||||||
value={listDrone?.device_sn}
|
value={listDrone?.device_sn}
|
||||||
onChange={(val) => {
|
onChange={(val) => {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { Layout, Typography, Menu, Tabs } from 'antd';
|
|||||||
import { AimOutlined, AppstoreOutlined, SettingOutlined } from '@ant-design/icons';
|
import { AimOutlined, AppstoreOutlined, SettingOutlined } from '@ant-design/icons';
|
||||||
import DeviceOverviewPage from '../components/devices/DeviceOverviewPage';
|
import DeviceOverviewPage from '../components/devices/DeviceOverviewPage';
|
||||||
import DeviceStatusPage from '../components/devices/DeviceStatusPage';
|
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 { useSelector } from 'react-redux';
|
||||||
import { RootState } from '../store';
|
import { RootState } from '../store';
|
||||||
import WayLinePage from '../components/devices/WayLinePage';
|
import WayLinePage from '../components/devices/WayLinePage';
|
||||||
@@ -11,12 +11,6 @@ import WayLinePage from '../components/devices/WayLinePage';
|
|||||||
const { Header, Content } = Layout;
|
const { Header, Content } = Layout;
|
||||||
const { Text } = Typography;
|
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() {
|
export default function DeviceIndexPage() {
|
||||||
const [activeTab, setActiveTab] = useState('overview');
|
const [activeTab, setActiveTab] = useState('overview');
|
||||||
@@ -53,14 +47,11 @@ export default function DeviceIndexPage() {
|
|||||||
// ====================== ✅ 核心改造 ======================
|
// ====================== ✅ 核心改造 ======================
|
||||||
planeData = planeData.map(item => ({
|
planeData = planeData.map(item => ({
|
||||||
...item,
|
...item,
|
||||||
// 给无人机统一设置 type: plane
|
|
||||||
type: 'plane',
|
type: 'plane',
|
||||||
// 自动生成 lastRunningStatus(经纬度取无人机自身字段)
|
|
||||||
lastRunningStatus: {
|
lastRunningStatus: {
|
||||||
longitude: item.longitude || 0,
|
longitude: item.longitude || 0,
|
||||||
latitude: item.latitude || 0,
|
latitude: item.latitude || 0,
|
||||||
},
|
},
|
||||||
// 兼容地图取设备名/序列号
|
|
||||||
deviceAlias: item.drone_callsign || item.device_sn
|
deviceAlias: item.drone_callsign || item.device_sn
|
||||||
|| '无人机',
|
|| '无人机',
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user