feat: support WPS report material workbooks

This commit is contained in:
hectorzhao
2026-09-04 17:10:04 +08:00
parent 48d0363920
commit fb39c8b606
29 changed files with 2737 additions and 734 deletions
+10 -5
View File
@@ -162,7 +162,7 @@ export const adminChannelsReportsApi = {
file: File,
body: {
tenantId: string;
applicationId?: string;
applicationId: string;
reportType: 'signature' | 'drainage';
sheetName?: string;
headerRowCount?: number;
@@ -170,7 +170,7 @@ export const adminChannelsReportsApi = {
profileId?: string;
},
) => {
assertUploadFileSize(file);
assertUploadFileSize(file, { bytes: 100 * 1024 * 1024, message: '报备资料文件大小不能超过 100MB' });
const form = new FormData();
form.set('file', file);
Object.entries(body).forEach(([key, value]) => {
@@ -223,9 +223,13 @@ export const adminChannelsReportsApi = {
query: { keyword?: string; startAt?: string; endAt?: string; page?: number; pageSize?: number } = {},
) => request<PagedResult<ReportMaterialBatch>>(withQuery('/admin/report-materials/batches', query)),
getReportMaterialBatch: (id: string) => request<ReportMaterialBatch>(`/admin/report-materials/batches/${id}`),
downloadReportMaterialBatch: (id: string) => requestBlob(`/admin/report-materials/batches/${id}/download`),
downloadReportMaterialBatchFile: (id: string, fileId: string) =>
requestBlob(`/admin/report-materials/batches/${id}/files/${fileId}/download`),
downloadReportMaterialBatch: (id: string, outputFormat: 'excel_drawing' | 'wps_cell_image' = 'excel_drawing') =>
requestBlob(withQuery(`/admin/report-materials/batches/${id}/download`, { outputFormat })),
downloadReportMaterialBatchFile: (
id: string,
fileId: string,
outputFormat: 'excel_drawing' | 'wps_cell_image' = 'excel_drawing',
) => requestBlob(withQuery(`/admin/report-materials/batches/${id}/files/${fileId}/download`, { outputFormat })),
listReportMaterialBatchTasks: (
id: string,
query: {
@@ -314,6 +318,7 @@ export const adminChannelsReportsApi = {
carrier?: 'mobile' | 'unicom' | 'telecom';
drainageItemId?: string;
batchItemId?: string;
outputFormat?: 'excel_drawing' | 'wps_cell_image';
}) => requestBlob('/admin/report-materials/single-export', { method: 'POST', body: JSON.stringify(body) }),
createReportTask: (body: {
tenantId: string;