根据场站 和 管理界面的无人机 加上筛选参数 修改逻辑

This commit is contained in:
mmc
2026-05-26 14:14:57 +08:00
parent ce097f78d6
commit ba272ea3ac
4 changed files with 99 additions and 146 deletions

View File

@@ -195,7 +195,9 @@ export default function DeviceOverviewPage({ devices, planedevices, devicesAll,
showSearch
allowClear
optionFilterProp="label"
filterOption={(input, option) => option.label.toLowerCase().includes(input.toLowerCase())}
filterOption={(input, option) =>
String(option?.label || "").toLowerCase().includes(input.toLowerCase())
}
options={[
{ label: <span>机器人</span>, options: devices.map(item => ({ value: item.device_sn || item.serialNumber, label: item.deviceAlias || item.deviceName || '未知设备' })) },
{ label: <span>无人机</span>, options: planedevices.map(item => ({ value: item.device_sn, label: item.drone_callsign || item.callsign || '未知设备' })) },