xiaoyi
4 天以前 a4025834e2304dc57f6e98d58feeb9416bd90609
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { requestClient } from '#/api/request';
 
export namespace DecisionForecastApi {
  export interface ForecastItem {
    id: number;
    forecastCode: string;
    forecastName: string;
    pointTime: string;
    forecastValue: number;
    actualValue?: number;
    lowerBound?: number;
    upperBound?: number;
    confidenceLevel?: number;
    modelVersion?: string;
    dimension?: string;
    dimensionValue?: string;
  }
}
 
export function getForecastList(forecastCode: string, params?: Record<string, unknown>) {
  return requestClient.get<DecisionForecastApi.ForecastItem[]>('/bi/decision/forecast/list', {
    params: { forecastCode, ...params },
  });
}
 
export function generateForecast(forecastCode: string) {
  return requestClient.post('/bi/decision/forecast/generate', null, {
    params: { forecastCode },
  });
}