feat(line): 智电改造线路台账新增「线路数据」弹窗展示最近一次模拟量快照 - 后端新增GET /api/electricity-data/latest(按lineId取最大collect_time的全部模拟量行,RBAC device:list);前端electricityDataApi.getLatestByLine与ElectricityLatestSnapshot类型;台账页表格新增固定右侧「操作」列与「线路数据」按钮,点击弹出720px弹窗显示线路信息(线路/编码/采集时间)及模拟量表格(模拟量名称/类型/数值/单位),无数据时显示空态提示
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
This commit is contained in:
1 parent
c92fc7f298
commit
c8a4330f3b
3 files changed
+153
-2
No files matched your search
@@ -272,4 +272,29 @@ export const electricGatewayApi = {
|
||||
|
||||
sync: () =>
|
||||
request.post<IccGatewaySyncResult>('/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<ElectricityLatestSnapshot>('/electricity-data/latest', { params: { lineId } }),
|
||||
};
|
||||
Reference in new issue
Block a user