This commit is contained in:
parent
148182c680
commit
132587e838
Binary file not shown.
@ -40,7 +40,7 @@ export class ReadingReportController extends Controller {
|
|||||||
const data: DeviceData[] = FullReportSchema.data;
|
const data: DeviceData[] = FullReportSchema.data;
|
||||||
const reportParams: ReportParams = FullReportSchema.report_params;
|
const reportParams: ReportParams = FullReportSchema.report_params;
|
||||||
const workbook = new ExcelJS.Workbook();
|
const workbook = new ExcelJS.Workbook();
|
||||||
const worksheet = workbook.addWorksheet('Event Records');
|
const worksheet = workbook.addWorksheet('Reading Records');
|
||||||
|
|
||||||
// ---------------- Logos ----------------
|
// ---------------- Logos ----------------
|
||||||
const jecLogoId = workbook.addImage({
|
const jecLogoId = workbook.addImage({
|
||||||
@ -55,7 +55,7 @@ export class ReadingReportController extends Controller {
|
|||||||
|
|
||||||
worksheet.addImage(jecLogoId, {
|
worksheet.addImage(jecLogoId, {
|
||||||
tl: { col: 0, row: 0 },
|
tl: { col: 0, row: 0 },
|
||||||
ext: { width: 120, height: 60 },
|
ext: { width: 120, height: 120 },
|
||||||
});
|
});
|
||||||
worksheet.addImage(fastLogoId, {
|
worksheet.addImage(fastLogoId, {
|
||||||
tl: { col: 7, row: 0 },
|
tl: { col: 7, row: 0 },
|
||||||
@ -133,8 +133,13 @@ export class ReadingReportController extends Controller {
|
|||||||
|
|
||||||
for (const type of types) {
|
for (const type of types) {
|
||||||
const row = worksheet.getRow(currentRow);
|
const row = worksheet.getRow(currentRow);
|
||||||
|
if (type == 'Temperature') {
|
||||||
row.getCell(4).value = type;
|
row.getCell(4).value = 'Temperature (°C)';
|
||||||
|
} else if (type == 'Humidity') {
|
||||||
|
row.getCell(4).value = 'Humidity (%)';
|
||||||
|
} else if (type == 'Battery') {
|
||||||
|
row.getCell(4).value = 'Battery (%)';
|
||||||
|
}
|
||||||
|
|
||||||
const stats = device.min_max_avg?.[type] ?? {};
|
const stats = device.min_max_avg?.[type] ?? {};
|
||||||
row.getCell(5).value = stats.min ?? '-';
|
row.getCell(5).value = stats.min ?? '-';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user