refactor(station): inrerface Station

This commit is contained in:
yangsy
2025-11-27 15:59:15 +08:00
parent dec1c4ea17
commit d4eade65c4
2 changed files with 3 additions and 2 deletions

View File

@@ -2,5 +2,5 @@ export interface Station {
code: string;
name: string;
online: boolean;
ip?: string;
ip: string;
}

View File

@@ -45,6 +45,7 @@ function useLineStationsMutation() {
code: station.code ?? '',
name: station.name ?? '',
online: false,
ip: '',
}));
if (stationVerifyMode.value === 'concurrent') {
// 方案一并发ping所有station
@@ -60,7 +61,7 @@ function useLineStationsMutation() {
return {
...station,
online: !!verifyList.find((stn) => stn.stationCode === station.code)?.onlineState,
ip: verifyList.find((stn) => stn.stationCode === station.code)?.ipAddress,
ip: verifyList.find((stn) => stn.stationCode === station.code)?.ipAddress ?? '',
};
});
}