| | |
| | | </template> |
| | | <el-table-column type="index" label="序号" width="60" align="center" /> |
| | | <el-table-column |
| | | prop="timePeriod" |
| | | prop="meterReadingDate" |
| | | :label="timeColumnLabel" |
| | | align="center" |
| | | sortable="custom" |
| | |
| | | const rows = Array.isArray(tableData.value) ? tableData.value : []; |
| | | const byTime = new Map(); |
| | | for (const r of rows) { |
| | | const t = r?.timePeriod ?? ""; |
| | | const t = r?.meterReadingDate ?? ""; |
| | | if (!t) continue; |
| | | if (!byTime.has(t)) byTime.set(t, { total: 0, production: 0, office: 0 }); |
| | | const bucket = byTime.get(t); |
| | |
| | | }, |
| | | xAxis: { |
| | | type: "category", |
| | | data: data.map((item) => item.timePeriod), |
| | | data: data.map((item) => item.meterReadingDate), |
| | | axisLabel: { |
| | | rotate: statisticsType.value === "day" ? 45 : 0, |
| | | color: "rgba(15, 23, 42, 0.62)", |