我叫洪圣文

This commit is contained in:
2026-05-15 16:36:50 +08:00
parent b6006e0dfe
commit 6687cf0339
36 changed files with 2201 additions and 271 deletions

View File

@@ -0,0 +1,18 @@
import http from '@/api'
import type { SteadyDataView } from './interface'
export const getSteadyTrendLedgerTree = (params?: { keyword?: string }) => {
return http.get<SteadyDataView.SteadyLedgerNode[]>('/steady/data-view/ledger-tree', params, { loading: false })
}
export const getSteadyTrendIndicatorTree = () => {
return http.get<SteadyDataView.SteadyIndicatorNode[]>('/steady/data-view/indicator-tree', {}, { loading: false })
}
export const querySteadyTrend = (params: SteadyDataView.SteadyTrendQueryParams) => {
return http.post<SteadyDataView.SteadyTrendQueryResult>('/steady/data-view/trend/query', params)
}
export const querySteadyTrendDay = (params: SteadyDataView.SteadyTrendQueryParams) => {
return http.post<SteadyDataView.SteadyTrendQueryResult>('/steady/data-view/trend/day', params)
}

View File

@@ -0,0 +1,78 @@
export namespace SteadyDataView {
export interface SteadyLedgerNode {
id: string
parentId?: string
name: string
level: 0 | 1 | 2 | 3
sort?: number
deviceCount?: number
lineCount?: number
selectable?: boolean
children?: SteadyLedgerNode[]
}
export interface SteadyIndicatorSeriesField {
field: string
name: string
}
export interface SteadyIndicatorNode {
id?: string
treeKey?: string
indicatorCode?: string
name: string
groupCode?: string
tableName?: string
baseFields?: string[]
phaseCodes?: string[]
seriesFields?: SteadyIndicatorSeriesField[]
supportStats?: SteadyTrendStatType[]
harmonic?: boolean
harmonicOrderStart?: number | null
harmonicOrderEnd?: number | null
unit?: string
children?: SteadyIndicatorNode[]
}
export type SteadyTrendStatType = 'AVG' | 'MAX' | 'MIN' | 'CP95'
export interface SteadyTrendQueryParams {
lineIds: string[]
indicatorCodes: string[]
statTypes: SteadyTrendStatType[]
phases: string[]
timeStart: string
timeEnd: string
bucket?: string
qualityFlag?: number
harmonicOrders?: number[]
}
export interface SteadyTrendPoint {
time: string
value: number | null
}
export interface SteadyTrendSeries {
seriesKey: string
lineId: string
lineName?: string
indicatorCode: string
indicatorName?: string
seriesName?: string
phase?: string
statType?: SteadyTrendStatType
unit?: string
points: SteadyTrendPoint[]
}
export interface SteadyTrendQueryResult {
sampled?: boolean
bucket?: string
sourcePointCount?: number
displayPointCount?: number
loadableDays?: string[]
series: SteadyTrendSeries[]
}
}