数据查询新增功能

This commit is contained in:
2026-06-25 15:13:52 +08:00
parent 4b8ff9af65
commit e8833b458d
2 changed files with 680 additions and 0 deletions
+53
View File
@@ -145,6 +145,59 @@ export function deleteReport(id: number) {
});
}
/** 获取某业务下所有报表(不分页,供下拉选择) */
export function listAllReports(businessCode: string) {
return request({
url: '/data-engine/report/reports',
method: 'get',
params: { businessCode, pageNum: 1, pageSize: 9999 },
});
}
// --- 查询相关类型 ---
export interface ReportFilter {
fieldCode: string;
operator: string;
value: string;
}
export interface ReportIndicator {
fieldCode: string;
aggregate: string;
alias: string;
}
export interface ReportOrderBy {
fieldCode: string;
direction: 'ASC' | 'DESC';
}
export interface ReportQueryParams {
businessCode: string;
reportCode: string;
dimensions: string[];
indicators: ReportIndicator[];
filters: ReportFilter[];
timeRange: {
startDate: string;
endDate: string;
};
timeGroup: string;
orderBy: ReportOrderBy[];
page: number;
pageSize: number;
}
/** 数据查询 */
export function reportQuery(data: ReportQueryParams) {
return request({
url: '/data-engine/report/query',
method: 'post',
data,
});
}
/** 按天回刷(支持单天或日期范围) */
export function execDailyBackfill(data: { businessCode: string; reportCode: string; startDate: string; endDate: string }) {
return request({