| | |
| | | }); |
| | | } |
| | | |
| | | /** 能耗综合分析 */ |
| | | export function analyticsStatisticEle(query) { |
| | | return request({ |
| | | url: "/statisticEle/analytics", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | /** 昨日用电量汇总 */ |
| | | export function getYesterdaySummary() { |
| | | return request({ |
| | |
| | | if ((dimension === "manual" || dimension === "minute") && timeKey.length >= 12) { |
| | | return `${timeKey.slice(0, 4)}-${timeKey.slice(4, 6)}-${timeKey.slice(6, 8)} ${timeKey.slice(8, 10)}:${timeKey.slice(10, 12)}`; |
| | | } |
| | | if (dimension === "week" && timeKey.includes("W")) { |
| | | const [y, w] = timeKey.split("W"); |
| | | return `${y}年 第${Number(w)}周`; |
| | | } |
| | | if (dimension === "day" && timeKey.length >= 8) { |
| | | return `${timeKey.slice(0, 4)}-${timeKey.slice(4, 6)}-${timeKey.slice(6, 8)}`; |
| | | } |