diff --git a/client/src/api/device.ts b/client/src/api/device.ts index 21a2c0f..d8a1552 100644 --- a/client/src/api/device.ts +++ b/client/src/api/device.ts @@ -272,4 +272,29 @@ export const electricGatewayApi = { sync: () => request.post('/electric-gateways/sync'), +}; + +// ==================== 线路用电(ICC 模拟量) ==================== + +export interface ElectricityAnalogRow { + analogType?: string; + analogName?: string; + analogUnit?: string; + analogValue?: number | string | null; +} + +export interface ElectricityLatestSnapshot { + lineId: number; + lineCode?: string; + lineName?: string; + imei?: string; + customerId?: number; + collectTime?: string | null; + hasData: boolean; + list: ElectricityAnalogRow[]; +} + +export const electricityDataApi = { + getLatestByLine: (lineId: number) => + request.get('/electricity-data/latest', { params: { lineId } }), }; \ No newline at end of file diff --git a/client/src/views/device/line/index.vue b/client/src/views/device/line/index.vue index 4ed5b50..155e212 100644 --- a/client/src/views/device/line/index.vue +++ b/client/src/views/device/line/index.vue @@ -140,6 +140,11 @@ + -