revert: restore v1.1.14 (37a9f303)
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
shishengliang
2026-09-16 09:29:30 +08:00
parent c49a02e3d9
commit 6ea1b3d5dd
210 changed files with 4448 additions and 36179 deletions
+7 -6
View File
@@ -1,5 +1,4 @@
import * as XLSX from 'xlsx';
import { buildAoaSheet, writeWorkbook } from '../../shared/xlsx';
import type { MonitoringVehicle } from './types';
interface ExportContext {
@@ -75,7 +74,7 @@ export function exportMileageXlsx(vehicles: MonitoringVehicle[], ctx: ExportCont
}),
];
const ws = buildAoaSheet(summaryData);
const ws = XLSX.utils.aoa_to_sheet(summaryData);
const numFixedCols = BASE_HEADERS.length;
const wsCols: { wch: number }[] = [
@@ -115,8 +114,10 @@ export function exportMileageXlsx(vehicles: MonitoringVehicle[], ctx: ExportCont
}
}
const wb = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(wb, ws, '车辆汇总');
// 每日明细 sheet:保留原有格式
const sheets: Array<{ name: string; sheet: XLSX.WorkSheet }> = [{ name: '车辆汇总', sheet: ws }];
if (dayKeys.length > 0) {
const detailHeaders = [
'车牌号', '数据来源', '客户', '业务部门', '项目', '租赁状态', '运营区域',
@@ -139,7 +140,7 @@ export function exportMileageXlsx(vehicles: MonitoringVehicle[], ctx: ExportCont
v.totalKm != null ? v.totalKm : '',
]),
];
const detailWs = buildAoaSheet(detailData);
const detailWs = XLSX.utils.aoa_to_sheet(detailData);
detailWs['!cols'] = [
{ wch: 12 },
{ wch: 16 },
@@ -159,7 +160,7 @@ export function exportMileageXlsx(vehicles: MonitoringVehicle[], ctx: ExportCont
if (detailWs[ref]?.t === 'n') detailWs[ref].z = '0.##########';
}
}
sheets.push({ name: '每日明细', sheet: detailWs });
XLSX.utils.book_append_sheet(wb, detailWs, '每日明细');
}
const now = new Date();
@@ -177,5 +178,5 @@ export function exportMileageXlsx(vehicles: MonitoringVehicle[], ctx: ExportCont
? '统计时间'
: isRange ? '区间' : '今日';
const filename = `里程看板_${dateTag}_${hh}${mm}_${sortLabel}.xlsx`;
writeWorkbook(sheets, filename);
XLSX.writeFile(wb, filename);
}