From d4eade65c4936f1df7bd97f039aa7d72b751fe1a Mon Sep 17 00:00:00 2001 From: yangsy Date: Thu, 27 Nov 2025 15:59:15 +0800 Subject: [PATCH] refactor(station): inrerface Station --- src/apis/domain/biz/station/station.ts | 2 +- src/composables/query/use-station-list-query.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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 ?? '', }; }); }