Merge pull request 'dev' (#410) from dev into main

Reviewed-on: #410
This commit is contained in:
mkm 2024-12-24 16:43:08 +08:00
commit 74540a66b8

View File

@ -74,14 +74,10 @@ class ActivityZoneService
}
$count = count($data);
$sheet->mergeCells('A' . ($count + 7) . ':F' . ($count + 7));
$sheet->setCellValue('A' . ($count + 7), "专区类型:{$typeName}");
$sheet->mergeCells('A' . ($count + 8) . ':F' . ($count + 8));
$sheet->setCellValue('A' . ($count + 8), "");
$sheet->mergeCells('A' . ($count + 9) . ':F' . ($count + 9));
$sheet->setCellValue('A' . ($count + 9), "备注:{$remark}");
$sheet->getRowDimension($count + 9)->setRowHeight(50);
$sheet->getStyle('A' . ($count + 9))->getAlignment()->setWrapText(true);
$sheet->getStyle('A' . ($count + 7). ':' . 'F' . ($count + 9))->applyFromArray($leftStyle);
$sheet->setCellValue('A' . ($count + 7), "备注:{$remark}");
$sheet->getRowDimension($count + 7)->setRowHeight(50);
$sheet->getStyle('A' . ($count + 7))->getAlignment()->setWrapText(true);
$sheet->getStyle('A' . ($count + 7). ':' . 'F' . ($count + 7))->applyFromArray($leftStyle);
// 设置单元格的样式
$styleArray = [
@ -100,7 +96,7 @@ class ActivityZoneService
],
],
];
$sheet->getStyle('A1:F' . ($count + 9))->applyFromArray($styleArray);
$sheet->getStyle('A1:F' . ($count + 7))->applyFromArray($styleArray);
$writer = new Xlsx($spreadsheet);
$url = '/export/' . date('Y-m') . $title . date('YmdHi') . '.xlsx';