feat(报表): 重构报表模块并添加下载功能
Some checks failed
Close stale issues / stale (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled

重构各报表页面,提取公共逻辑到useMonthReport和MonthReportView组件
添加报表下载功能,支持单月下载和全年下载
统一各报表的API调用方式和数据处理逻辑
优化代码结构,减少重复代码
This commit is contained in:
2026-01-22 18:29:53 +08:00
parent be5078ae0d
commit 5c39bd4113
12 changed files with 632 additions and 551 deletions

View File

@@ -22,13 +22,10 @@ class FileDownloader {
* @param config 配置信息,可选。
* @returns 如果config.responseReturn为'body'则返回Blob(默认)否则返回RequestResponse<Blob>
*/
public async download<T = Blob>(
url: string,
config?: DownloadRequestConfig,
): Promise<T> {
public async download<T = Blob>(url: string, config?: DownloadRequestConfig): Promise<T> {
const finalConfig: DownloadRequestConfig = {
responseReturn: 'body',
method: 'GET',
method: 'post',
...config,
responseType: 'blob',
};