Fix sorting

This commit is contained in:
2025-05-07 22:44:47 +08:00
parent 4b5003636b
commit 04ca719274
2 changed files with 3 additions and 1 deletions

View File

@@ -162,7 +162,9 @@ class ExtractHandler {
function fillMainPage(baseCells, worksheet, recordMap) {
baseCells['番号'] = baseCells['番号'].filter((_, index) => index % 2 !== 0);
const sortedRecords = Object.values(recordMap.byId).sort((a, b) => a['idKey'].localeCompare(b['idKey']));
const sortedRecords = Object.values(recordMap.byId).sort((a, b) =>
parseInt(a['id'], 10) - parseInt(b['id'], 10)
);
const lastPage = 2;
const baseForTemplate = baseCells['番号'][lastPage - 1]; // 番号 merged 2 rows