|
|
|
@ -179,6 +179,44 @@ export default { |
|
|
|
|
"23:30", |
|
|
|
|
"23:45" |
|
|
|
|
], |
|
|
|
|
dayData:[], |
|
|
|
|
dayXz:[], |
|
|
|
|
emonthData:[], |
|
|
|
|
emonthXz:[ |
|
|
|
|
1, |
|
|
|
|
2, |
|
|
|
|
3, |
|
|
|
|
4, |
|
|
|
|
5, |
|
|
|
|
6, |
|
|
|
|
7, |
|
|
|
|
8, |
|
|
|
|
9, |
|
|
|
|
10, |
|
|
|
|
11, |
|
|
|
|
12, |
|
|
|
|
13, |
|
|
|
|
14, |
|
|
|
|
15, |
|
|
|
|
16, |
|
|
|
|
17, |
|
|
|
|
18, |
|
|
|
|
19, |
|
|
|
|
20, |
|
|
|
|
21, |
|
|
|
|
22, |
|
|
|
|
23, |
|
|
|
|
24, |
|
|
|
|
25, |
|
|
|
|
26, |
|
|
|
|
27, |
|
|
|
|
28, |
|
|
|
|
29, |
|
|
|
|
30, |
|
|
|
|
31], |
|
|
|
|
temIn:'', |
|
|
|
|
temOut:'', |
|
|
|
|
time:'', |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -197,6 +235,7 @@ export default { |
|
|
|
|
//gl |
|
|
|
|
delete res.data.todayUsePowers.deviceId |
|
|
|
|
delete res.data.todayUsePowers.samDate |
|
|
|
|
delete res.data.todayUsePowers.userId |
|
|
|
|
let arr = Object.values(res.data.todayUsePowers) |
|
|
|
|
data.glData=arr |
|
|
|
|
let myChart3 = echarts.getInstanceByDom(document.getElementById("myEcharts3")); |
|
|
|
@ -254,188 +293,211 @@ export default { |
|
|
|
|
}) |
|
|
|
|
getXcgl(2).then((res)=>{ |
|
|
|
|
console.log(res) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let myChart = echarts.getInstanceByDom(document.getElementById("myEcharts")); |
|
|
|
|
if (myChart){ |
|
|
|
|
myChart.dispose() |
|
|
|
|
} |
|
|
|
|
myChart = echarts.init(document.getElementById("myEcharts")); |
|
|
|
|
|
|
|
|
|
let myChart2 = echarts.getInstanceByDom(document.getElementById("myEcharts2")); |
|
|
|
|
if (myChart2){ |
|
|
|
|
myChart2.dispose() |
|
|
|
|
} |
|
|
|
|
myChart2 = echarts.init(document.getElementById("myEcharts2")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let myChart4 = echarts.getInstanceByDom(document.getElementById("myEcharts4")); |
|
|
|
|
if (myChart4){ |
|
|
|
|
myChart4.dispose() |
|
|
|
|
} |
|
|
|
|
myChart4 = echarts.init(document.getElementById("myEcharts4")); |
|
|
|
|
// 绘制图表 |
|
|
|
|
myChart.setOption({ |
|
|
|
|
title: {}, |
|
|
|
|
tooltip: {}, |
|
|
|
|
textStyle:{ |
|
|
|
|
color:'#BEC3DA' |
|
|
|
|
}, |
|
|
|
|
xAxis: { |
|
|
|
|
data: ["12-3", "12-4", "12-5", "12-6", "12-7", "12-8"], |
|
|
|
|
axisLine:{ |
|
|
|
|
lineStyle:{ |
|
|
|
|
color:'#BEC3DA', |
|
|
|
|
type:'dashed' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
yAxis: { |
|
|
|
|
type: 'value', |
|
|
|
|
name: "kWh", |
|
|
|
|
splitLine:{ |
|
|
|
|
show:true, |
|
|
|
|
lineStyle:{ |
|
|
|
|
type:'dashed', |
|
|
|
|
color:'#BEC3DA' |
|
|
|
|
} |
|
|
|
|
//日用电量 |
|
|
|
|
let arr = [] |
|
|
|
|
let brr = [] |
|
|
|
|
for(let i in res.xrglqhour){ |
|
|
|
|
arr.push(res.xrglqhour[i].useElectric) |
|
|
|
|
brr.push(res.xrglqhour[i].hour) |
|
|
|
|
} |
|
|
|
|
data.dayData=arr |
|
|
|
|
data.dayXz=brr |
|
|
|
|
let myChart = echarts.getInstanceByDom(document.getElementById("myEcharts")); |
|
|
|
|
if (myChart){ |
|
|
|
|
myChart.dispose() |
|
|
|
|
} |
|
|
|
|
myChart = echarts.init(document.getElementById("myEcharts")); |
|
|
|
|
myChart.setOption({ |
|
|
|
|
title: {}, |
|
|
|
|
tooltip: {}, |
|
|
|
|
textStyle:{ |
|
|
|
|
color:'#BEC3DA' |
|
|
|
|
}, |
|
|
|
|
axisLine: { |
|
|
|
|
show: true, |
|
|
|
|
lineStyle:{ |
|
|
|
|
type:'dashed', |
|
|
|
|
color:'#BEC3DA' |
|
|
|
|
xAxis: { |
|
|
|
|
data: data.dayXz, |
|
|
|
|
axisLine:{ |
|
|
|
|
lineStyle:{ |
|
|
|
|
color:'#BEC3DA', |
|
|
|
|
type:'dashed' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
series: [ |
|
|
|
|
{ |
|
|
|
|
name: "日用电量", |
|
|
|
|
type: "bar", |
|
|
|
|
data: [5, 20, 36, 10, 10, 20], |
|
|
|
|
itemStyle:{ |
|
|
|
|
color:'#2F8EE0' |
|
|
|
|
yAxis: { |
|
|
|
|
type: 'value', |
|
|
|
|
name: "kWh", |
|
|
|
|
splitLine:{ |
|
|
|
|
show:true, |
|
|
|
|
lineStyle:{ |
|
|
|
|
type:'dashed', |
|
|
|
|
color:'#BEC3DA' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
axisLine: { |
|
|
|
|
show: true, |
|
|
|
|
lineStyle:{ |
|
|
|
|
type:'dashed', |
|
|
|
|
color:'#BEC3DA' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}); |
|
|
|
|
window.onresize = function () {//自适应大小 |
|
|
|
|
myChart.resize(); |
|
|
|
|
}; |
|
|
|
|
myChart2.setOption({ |
|
|
|
|
title: {}, |
|
|
|
|
tooltip: {}, |
|
|
|
|
textStyle:{ |
|
|
|
|
color:'#BEC3DA' |
|
|
|
|
}, |
|
|
|
|
xAxis: { |
|
|
|
|
data: ["12-3", "12-4", "12-5", "12-6", "12-7", "12-8"], |
|
|
|
|
axisLine:{ |
|
|
|
|
lineStyle:{ |
|
|
|
|
color:'#BEC3DA', |
|
|
|
|
type:'dashed' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
yAxis: { |
|
|
|
|
type: 'value', |
|
|
|
|
name: "kWh", |
|
|
|
|
splitLine:{ |
|
|
|
|
show:true, |
|
|
|
|
lineStyle:{ |
|
|
|
|
type:'dashed', |
|
|
|
|
color:'#BEC3DA' |
|
|
|
|
} |
|
|
|
|
series: [ |
|
|
|
|
{ |
|
|
|
|
name: "日用电量", |
|
|
|
|
type: "bar", |
|
|
|
|
data: data.dayData, |
|
|
|
|
itemStyle:{ |
|
|
|
|
color:'#2F8EE0' |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}); |
|
|
|
|
window.onresize = function () {//自适应大小 |
|
|
|
|
myChart.resize(); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
//月用电量 |
|
|
|
|
let crr = [] |
|
|
|
|
for(let i in res.xrglqday){ |
|
|
|
|
crr.push(res.xrglqday[i].useElectric) |
|
|
|
|
} |
|
|
|
|
data.emonthData=crr |
|
|
|
|
let myChart2 = echarts.getInstanceByDom(document.getElementById("myEcharts2")); |
|
|
|
|
if (myChart2){ |
|
|
|
|
myChart2.dispose() |
|
|
|
|
} |
|
|
|
|
myChart2 = echarts.init(document.getElementById("myEcharts2")); |
|
|
|
|
|
|
|
|
|
myChart2.setOption({ |
|
|
|
|
title: {}, |
|
|
|
|
tooltip: {}, |
|
|
|
|
textStyle:{ |
|
|
|
|
color:'#BEC3DA' |
|
|
|
|
}, |
|
|
|
|
axisLine: { |
|
|
|
|
show: true, |
|
|
|
|
lineStyle:{ |
|
|
|
|
type:'dashed', |
|
|
|
|
color:'#BEC3DA' |
|
|
|
|
xAxis: { |
|
|
|
|
data: data.emonthXz, |
|
|
|
|
axisLine:{ |
|
|
|
|
lineStyle:{ |
|
|
|
|
color:'#BEC3DA', |
|
|
|
|
type:'dashed' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
series: [ |
|
|
|
|
{ |
|
|
|
|
name: "月用电量", |
|
|
|
|
type: "bar", |
|
|
|
|
data: [5, 20, 36, 10, 10, 20], |
|
|
|
|
itemStyle:{ |
|
|
|
|
color:'#2F8EE0' |
|
|
|
|
yAxis: { |
|
|
|
|
type: 'value', |
|
|
|
|
name: "kWh", |
|
|
|
|
splitLine:{ |
|
|
|
|
show:true, |
|
|
|
|
lineStyle:{ |
|
|
|
|
type:'dashed', |
|
|
|
|
color:'#BEC3DA' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
axisLine: { |
|
|
|
|
show: true, |
|
|
|
|
lineStyle:{ |
|
|
|
|
type:'dashed', |
|
|
|
|
color:'#BEC3DA' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}); |
|
|
|
|
window.onresize = function () {//自适应大小 |
|
|
|
|
myChart2.resize(); |
|
|
|
|
}; |
|
|
|
|
series: [ |
|
|
|
|
{ |
|
|
|
|
name: "月用电量", |
|
|
|
|
type: "bar", |
|
|
|
|
data: data.emonthData, |
|
|
|
|
itemStyle:{ |
|
|
|
|
color:'#2F8EE0' |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}); |
|
|
|
|
window.onresize = function () {//自适应大小 |
|
|
|
|
myChart2.resize(); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
myChart4.setOption({ |
|
|
|
|
title: {}, |
|
|
|
|
tooltip: {}, |
|
|
|
|
legend: { |
|
|
|
|
data: ['进水', '出水'], |
|
|
|
|
textStyle:{ |
|
|
|
|
color:'#BEC3DA' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
textStyle:{ |
|
|
|
|
color:'#BEC3DA' |
|
|
|
|
}, |
|
|
|
|
xAxis: { |
|
|
|
|
data: ["12-3", "12-4", "12-5", "12-6", "12-7", "12-8"], |
|
|
|
|
axisLine:{ |
|
|
|
|
lineStyle:{ |
|
|
|
|
color:'#BEC3DA', |
|
|
|
|
type:'dashed' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
yAxis: { |
|
|
|
|
type: 'value', |
|
|
|
|
name: "℃", |
|
|
|
|
splitLine:{ |
|
|
|
|
show:true, |
|
|
|
|
lineStyle:{ |
|
|
|
|
type:'dashed', |
|
|
|
|
//进出水温度 |
|
|
|
|
data.time=res.times |
|
|
|
|
data.temIn=res.tempIn |
|
|
|
|
data.temOut=res.tempOut |
|
|
|
|
|
|
|
|
|
let myChart4 = echarts.getInstanceByDom(document.getElementById("myEcharts4")); |
|
|
|
|
if (myChart4){ |
|
|
|
|
myChart4.dispose() |
|
|
|
|
} |
|
|
|
|
myChart4 = echarts.init(document.getElementById("myEcharts4")); |
|
|
|
|
myChart4.setOption({ |
|
|
|
|
title: {}, |
|
|
|
|
tooltip: {}, |
|
|
|
|
legend: { |
|
|
|
|
data: ['进水', '出水'], |
|
|
|
|
textStyle:{ |
|
|
|
|
color:'#BEC3DA' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
axisLine: { |
|
|
|
|
show: true, |
|
|
|
|
lineStyle:{ |
|
|
|
|
type:'dashed', |
|
|
|
|
color:'#BEC3DA' |
|
|
|
|
textStyle:{ |
|
|
|
|
color:'#BEC3DA' |
|
|
|
|
}, |
|
|
|
|
xAxis: { |
|
|
|
|
data: data.time, |
|
|
|
|
axisLine:{ |
|
|
|
|
lineStyle:{ |
|
|
|
|
color:'#BEC3DA', |
|
|
|
|
type:'dashed' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
series: [ |
|
|
|
|
{ |
|
|
|
|
name: '进水', |
|
|
|
|
type: 'line', |
|
|
|
|
stack: 'Total', |
|
|
|
|
itemStyle:{ |
|
|
|
|
color:'#2F8EE0' |
|
|
|
|
yAxis: { |
|
|
|
|
type: 'value', |
|
|
|
|
name: "℃", |
|
|
|
|
splitLine:{ |
|
|
|
|
show:true, |
|
|
|
|
lineStyle:{ |
|
|
|
|
type:'dashed', |
|
|
|
|
color:'#BEC3DA' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
data: [120, 132, 101, 134, 90, 230, 210] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '出水', |
|
|
|
|
type: 'line', |
|
|
|
|
stack: 'Total', |
|
|
|
|
itemStyle:{ |
|
|
|
|
color:'#2F8EE0' |
|
|
|
|
axisLine: { |
|
|
|
|
show: true, |
|
|
|
|
lineStyle:{ |
|
|
|
|
type:'dashed', |
|
|
|
|
color:'#BEC3DA' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
data: [220, 182, 191, 234, 290, 330, 310] |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}); |
|
|
|
|
window.onresize = function () {//自适应大小 |
|
|
|
|
myChart4.resize(); |
|
|
|
|
}; |
|
|
|
|
series: [ |
|
|
|
|
{ |
|
|
|
|
name: '进水', |
|
|
|
|
type: 'line', |
|
|
|
|
stack: 'Total', |
|
|
|
|
itemStyle:{ |
|
|
|
|
color:'#2F8EE0' |
|
|
|
|
}, |
|
|
|
|
data: data.temIn |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '出水', |
|
|
|
|
type: 'line', |
|
|
|
|
stack: 'Total', |
|
|
|
|
itemStyle:{ |
|
|
|
|
color:'#2F8EE0' |
|
|
|
|
}, |
|
|
|
|
data: data.temOut |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}); |
|
|
|
|
window.onresize = function () {//自适应大小 |
|
|
|
|
myChart4.resize(); |
|
|
|
|
}; |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
return{ |
|
|
|
|
data |
|
|
|
|