This commit is contained in:
mmc
2026-05-26 15:49:22 +08:00
parent 793e473ab9
commit aa19fa9670
5 changed files with 14 additions and 26 deletions

View File

@@ -81,9 +81,9 @@ export default function DeviceManagementPage() {
// 无人机分页 + 筛选
const [droneParams, setDroneParams] = useState({
pageNum: 1,
pageSize: 10,
gateway_sn: '',
status: "",
pageSize: 20,
sn: '',
status: ""
});
const [droneTotal, setDroneTotal] = useState(0);
@@ -94,7 +94,7 @@ export default function DeviceManagementPage() {
const [bindSmartForm] = Form.useForm();
const [smartParams, setSmartParams] = useState({
pageNum: 1,
pageSize: 10,
pageSize: 20,
serialNumber: '',
});
const [smartTotal, setSmartTotal] = useState(0);
@@ -389,7 +389,7 @@ export default function DeviceManagementPage() {
const droneColumns = [
{ 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: '所属组织', width: 150, key: 'orgName',
@@ -636,8 +636,9 @@ export default function DeviceManagementPage() {
<Input
placeholder="机场SN"
style={{ width: 200 }}
value={droneParams.gateway_sn}
onChange={(e) => setDroneParams({ ...droneParams, gateway_sn: e.target.value })}
allowClear
value={droneParams.sn}
onChange={(e) => setDroneParams({ ...droneParams, sn: e.target.value })}
/>
<Select
placeholder="状态"
@@ -649,7 +650,7 @@ export default function DeviceManagementPage() {
<Select.Option value="1">在线</Select.Option>
<Select.Option value="2">离线</Select.Option>
</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 disabled={selectedDroneKeys.length === 0} onClick={() => handleUnbind(selectedDroneKeys, 1)}>批量解绑(用户)</Button>

View File

@@ -404,7 +404,7 @@ const SerialNumGenerate = () => {
};
return (
<div style={{ padding: '0px 20px 40px', minHeight: '100vh' }}>
<div style={{ padding: '0px 0px 40px', minHeight: '100vh' }}>
{contextHolder}
<Card

View File

@@ -15,9 +15,7 @@ import {
CarOutlined
} 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 DroneVideoPlayer from './DroneVideoPlayer';
import AgoraTextTest from '../AgoraRtc.tsx';

View File

@@ -186,9 +186,6 @@ export default function WayLinePage({ planedevices }) {
setTaskForm(prev => ({ ...prev, sn: listDrone.gateway_sn || '' }));
}
}, [listDrone]);
// ==============================================
// ✅ 创建任务模块结束
// ==============================================
// 顶部统计
const topCards = [
@@ -503,7 +500,8 @@ export default function WayLinePage({ planedevices }) {
allowClear
options={planedevices?.map(item => ({
value: item.device_sn,
label: item.drone_callsign || item.device_sn
label: item.drone_callsign || item.device_sn || item.callsign
}))}
value={listDrone?.device_sn}
onChange={(val) => {