优化创建任务之后 需要重新获取无人机接口

This commit is contained in:
mmc
2026-05-27 15:26:29 +08:00
parent 2ab9e3715a
commit 834f93b947
4 changed files with 14 additions and 13 deletions

View File

@@ -29,7 +29,7 @@ export default function DeviceIndexPage() {
// 👇 核心:给无人机补全 lastRunningStatus + type: 'plane'
const fetchAllData = async () => {
if (!userInfo?.username || !stationId) return;
if (!stationId) return;
try {
// 1. 同时发请求
@@ -101,7 +101,7 @@ export default function DeviceIndexPage() {
onDeviceChange={(sn) => setSelectedSn(sn)}
/>;
}
if (activeTab === 'wayLineTask') return <WayLinePage planedevices={planedevices} />;
if (activeTab === 'wayLineTask') return <WayLinePage planedevices={planedevices} onRefresh={fetchAllData} />;
return null;
};