| | |
| | | }, |
| | | async getData() { |
| | | var rep1=await Getproductionvolume() |
| | | var rep=rep1.filter(it=>it.roadway.includes("JZ")) |
| | | console.log(rep1) |
| | | var rep=rep1.filter(it=>it.roadway.includes("CW")) |
| | | |
| | | |
| | | // (1) 按日期分组核心算法 |
| | | const groupedData = rep.reduce((acc, item) => { |
| | | const groupedData = rep.reduce((acc, item) => { |
| | | // 提取日期部分(格式:YYYY-MM-DD) |
| | | const dateKey = item.createDate.split(' ')[0]; // 或 item.createDate.substring(0,10) |
| | | |
| | |
| | | |
| | | // (2) 转换为排序后的数组 |
| | | const sortedGroups = Object.values(groupedData) |
| | | .sort((a, b) => new Date(b.date) - new Date(a.date)); // 降序排列 |
| | | |
| | | .sort((a, b) => new Date(b.date) - new Date(a.date)); // 降序排列// 降序排列 |
| | | |
| | | this.options = { |
| | | backgroundColor: '#0a1256', |
| | |
| | | symbol: "none", |
| | | label: { |
| | | normal: { |
| | | show: false, |
| | | show: true, |
| | | } |
| | | }, |
| | | lineStyle: { |