refactor(station): inrerface Station
This commit is contained in:
@@ -2,5 +2,5 @@ export interface Station {
|
||||
code: string;
|
||||
name: string;
|
||||
online: boolean;
|
||||
ip?: string;
|
||||
ip: string;
|
||||
}
|
||||
|
||||
@@ -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 ?? '',
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user