优化创建任务之后 需要重新获取无人机接口
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user