diff --git a/src/apis/domain/biz/station/station.ts b/src/apis/domain/biz/station/station.ts index 2021ecf..5113778 100644 --- a/src/apis/domain/biz/station/station.ts +++ b/src/apis/domain/biz/station/station.ts @@ -2,5 +2,5 @@ export interface Station { code: string; name: string; online: boolean; - ip?: string; + ip: string; } diff --git a/src/composables/query/use-station-list-query.ts b/src/composables/query/use-station-list-query.ts index 3acc215..993378e 100644 --- a/src/composables/query/use-station-list-query.ts +++ b/src/composables/query/use-station-list-query.ts @@ -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 ?? '', }; }); }