jiminglei 2 years ago
parent 229b471f33
commit c3c905d642
  1. 4
      psdc-ui/src/api/emonitor/api.js
  2. 8
      psdc-ui/src/views/emonitor/db/index.vue
  3. 327
      psdc-ui/src/views/emonitor/drgl/index.vue
  4. 280
      psdc-ui/src/views/emonitor/frdl/index.vue
  5. 319
      psdc-ui/src/views/emonitor/kqyrb/index.vue
  6. 214
      psdc-ui/src/views/emonitor/wdcgq/index.vue
  7. 17
      psdc-ui/src/views/emonitor/xrgl/index.vue

@ -35,6 +35,6 @@ export function getFrld(data) {
return request.get('/monitor/frdl/index/sel2/'+data)
}
//温度传感器
export function getWdcgq(data) {
return request.get('/monitor/wdcgq/index/sel1/'+data)
export function getWdcgq() {
return request.get('/monitor/wdcgq/index/sel1')
}

@ -2,28 +2,28 @@
<div class="app-container home">
<div class="top">
<div class="card">
<div>pic</div>
<div><img src="../../../assets/images/功率.png"></div>
<div>
<p>当前功率</p>
<h2>{{data.totp}}kW</h2>
</div>
</div>
<div class="card">
<div>pic</div>
<div><img src="../../../assets/images/用电量.png"></div>
<div>
<p>日用电量</p>
<h2>{{data.eday}}kWh</h2>
</div>
</div>
<div class="card">
<div>pic</div>
<div><img src="../../../assets/images/用电量.png"></div>
<div>
<p>月用电量</p>
<h2>{{data.emonth}}kWh</h2>
</div>
</div>
<div class="card">
<div>pic</div>
<div><img src="../../../assets/images/用电量.png"></div>
<div>
<p>累计用电量</p>
<h2>{{data.totwh}}kWh</h2>

@ -2,37 +2,37 @@
<div class="app-container home">
<div class="top">
<div class="card">
<div>pic</div>
<div><img src="../../../assets/images/用电量.png"></div>
<div>
<p>总用电量</p>
<h2>1641kWh</h2>
<h2>{{data.totwh}}kWh</h2>
</div>
</div>
<div class="card">
<div>pic</div>
<div><img src="../../../assets/images/功率.png"></div>
<div>
<p>当前功率</p>
<h2>11kW</h2>
<h2>{{data.totp}}kW</h2>
</div>
</div>
<div class="card">
<div>pic</div>
<div><img src="../../../assets/images/温度.png"></div>
<div>
<div style="display: flex; margin-bottom: 5px">
<p>进水温度:</p>
<h2>25</h2>
<h2>{{data.tempIn}}</h2>
</div>
<div style="display: flex">
<p>出水温度:</p>
<h2>85</h2>
<h2>{{data.tempOut}}</h2>
</div>
</div>
</div>
<div class="card">
<div>pic</div>
<div><img src="../../../assets/images/温度传感器.png"></div>
<div>
<p>运行状态</p>
<h2 style="color: #1ab394">开启</h2>
<h2 style="color: #1ab394">{{data.runStatus}}</h2>
</div>
</div>
</div>
@ -42,7 +42,7 @@
<div class="bottom1-1">
日用电量
</div>
<div id="myEcharts1" style="width: 100%; height: 86.7%"></div>
<div id="myEcharts" style="width: 100%; height: 86.7%"></div>
</div>
<div class="bottom1">
<div class="bottom1-1">
@ -68,52 +68,184 @@
<script name="Index">
import {getDrgl, getDcgl} from '../../../api/emonitor/api'
import { onMounted } from "vue";
import {onMounted, reactive} from "vue";
import * as echarts from 'echarts';
export default {
name: "drgl",
setup() {
let data = reactive({
totwh:'',
totp:'',
tempIn:'',
tempOut:'',
//1 2
runStatus:'',
glData:[],
glXz:[
"00:00",
"00:15",
"00:30",
"00:45",
"01:00",
"01:15",
"01:30",
"01:45",
"02:00",
"02:15",
"02:30",
"02:45",
"03:00",
"03:15",
"03:30",
"03:45",
"04:00",
"04:15",
"04:30",
"04:45",
"05:00",
"05:15",
"05:30",
"05:45",
"06:00",
"06:15",
"06:30",
"06:45",
"07:00",
"07:15",
"07:30",
"07:45",
"08:00",
"08:15",
"08:30",
"08:45",
"09:00",
"09:15",
"09:30",
"09:45",
"10:00",
"10:15",
"10:30",
"10:45",
"11:00",
"11:15",
"11:30",
"11:45",
"12:00",
"12:15",
"12:30",
"12:45",
"13:00",
"13:15",
"13:30",
"13:45",
"14:00",
"14:15",
"14:30",
"14:45",
"15:00",
"15:15",
"15:30",
"15:45",
"16:00",
"16:15",
"16:30",
"16:45",
"17:00",
"17:15",
"17:30",
"17:45",
"18:00",
"18:15",
"18:30",
"18:45",
"19:00",
"19:15",
"19:30",
"19:45",
"20:00",
"20:15",
"20:30",
"20:45",
"21:00",
"21:15",
"21:30",
"21:45",
"22:00",
"22:15",
"22:30",
"22:45",
"23:00",
"23:15",
"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:'',
})
onMounted(() => {//element,onMountedHook
// getDrgl(1).then((res)=>{
// console.log(res)
// })
getDcgl(1).then((res)=>{
console.log(res)
})
let myChart1 = echarts.getInstanceByDom(document.getElementById("myEcharts1"));
if (myChart1){
myChart1.dispose()
//
let arr = []
let brr = []
for(let i in res.dcglqhour){
arr.push(res.dcglqhour[i].useElectric)
brr.push(res.dcglqhour[i].hour)
}
myChart1 = echarts.init(document.getElementById("myEcharts1"));
let myChart2 = echarts.getInstanceByDom(document.getElementById("myEcharts2"));
if (myChart2){
myChart2.dispose()
data.dayData=arr
data.dayXz=brr
let myChart = echarts.getInstanceByDom(document.getElementById("myEcharts"));
if (myChart){
myChart.dispose()
}
myChart2 = echarts.init(document.getElementById("myEcharts2"));
let myChart3 = echarts.getInstanceByDom(document.getElementById("myEcharts3"));
if (myChart3){
myChart3.dispose()
}
myChart3 = echarts.init(document.getElementById("myEcharts3"));
let myChart4 = echarts.getInstanceByDom(document.getElementById("myEcharts4"));
if (myChart4){
myChart4.dispose()
}
myChart4 = echarts.init(document.getElementById("myEcharts4"));
//
myChart1.setOption({
myChart = echarts.init(document.getElementById("myEcharts"));
myChart.setOption({
title: {},
tooltip: {},
textStyle:{
color:'#BEC3DA'
},
xAxis: {
data: ["12-3", "12-4", "12-5", "12-6", "12-7", "12-8"],
data: data.dayXz,
axisLine:{
lineStyle:{
color:'#BEC3DA',
@ -143,7 +275,7 @@ export default {
{
name: "日用电量",
type: "bar",
data: [5, 20, 36, 10, 10, 20],
data: data.dayData,
itemStyle:{
color:'#2F8EE0'
},
@ -153,6 +285,19 @@ export default {
window.onresize = function () {//
myChart.resize();
};
//
let crr = []
for(let i in res.dcglqday){
crr.push(res.dcglqday[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: {},
@ -160,7 +305,7 @@ export default {
color:'#BEC3DA'
},
xAxis: {
data: ["12-3", "12-4", "12-5", "12-6", "12-7", "12-8"],
data: data.emonthXz,
axisLine:{
lineStyle:{
color:'#BEC3DA',
@ -190,7 +335,7 @@ export default {
{
name: "月用电量",
type: "bar",
data: [5, 20, 36, 10, 10, 20],
data: data.emonthData,
itemStyle:{
color:'#2F8EE0'
},
@ -200,14 +345,31 @@ export default {
window.onresize = function () {//
myChart2.resize();
};
myChart3.setOption({
//
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'
}
},
textStyle:{
color:'#BEC3DA'
},
xAxis: {
data: ["12-3", "12-4", "12-5", "12-6", "12-7", "12-8"],
data: data.time,
axisLine:{
lineStyle:{
color:'#BEC3DA',
@ -217,7 +379,7 @@ export default {
},
yAxis: {
type: 'value',
name: "kW",
name: "",
splitLine:{
show:true,
lineStyle:{
@ -235,32 +397,59 @@ export default {
},
series: [
{
name: "当前功率",
type: "line",
data: [5, 20, 36, 10, 10, 20],
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 () {//
myChart3.resize();
myChart4.resize();
};
myChart4.setOption({
})
getDrgl(1).then((res)=>{
console.log('1',res)
data.tempIn=res.data.tempIn
data.tempOut=res.data.tempOut
data.totp = res.data.totp
data.totwh = res.data.totwh
if(res.data.runStatus==1){
data.runStatus = '开启'
}else if (res.data.runStatus==2){
data.runStatus = '关闭'
}
//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"));
if (myChart3){
myChart3.dispose()
}
myChart3 = echarts.init(document.getElementById("myEcharts3"));
myChart3.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"],
data: data.glXz,
axisLine:{
lineStyle:{
color:'#BEC3DA',
@ -270,7 +459,7 @@ export default {
},
yAxis: {
type: 'value',
name: "",
name: "kW",
splitLine:{
show:true,
lineStyle:{
@ -288,29 +477,25 @@ export default {
},
series: [
{
name: '进水',
type: 'line',
stack: 'Total',
itemStyle:{
color:'#2F8EE0'
},
data: [120, 132, 101, 134, 90, 230, 210]
},
{
name: '出水',
type: 'line',
stack: 'Total',
name: "当前功率",
type: "line",
data: data.glData,
itemStyle:{
color:'#2F8EE0'
},
data: [220, 182, 191, 234, 290, 330, 310]
},
],
});
window.onresize = function () {//
myChart4.resize();
myChart3.resize();
};
})
});
return {
data
}
},
components: {},
mounted() {},

@ -2,21 +2,21 @@
<div class="app-container home">
<div class="top">
<div class="card">
<div>pic</div>
<div><img src="../../../assets/images/用电量.png"></div>
<div>
<p>总用电量</p>
<h2>1641kWh</h2>
</div>
</div>
<div class="card">
<div>pic</div>
<div><img src="../../../assets/images/功率.png"></div>
<div>
<p>当前功率</p>
<h2>11kW</h2>
</div>
</div>
<div class="card">
<div>pic</div>
<div><img src="../../../assets/images/温度.png"></div>
<div>
<div>
<p>当前温度</p>
@ -25,7 +25,7 @@
</div>
</div>
<div class="card">
<div>pic</div>
<div><img src="../../../assets/images/温度传感器.png"></div>
<div>
<p>运行状态</p>
<h2 style="color: #1ab394">开启</h2>
@ -64,44 +64,172 @@
<script name="Index">
import {getFrdl, getFrld} from '../../../api/emonitor/api'
import { onMounted } from "vue";
import {onMounted, reactive} from "vue";
import * as echarts from 'echarts';
export default {
name: "frdl",
setup() {
let data = reactive({
totwh:'',
totp:'',
tempIn:'',
tempOut:'',
//1 2
runStatus:'',
glData:[],
glXz:[
"00:00",
"00:15",
"00:30",
"00:45",
"01:00",
"01:15",
"01:30",
"01:45",
"02:00",
"02:15",
"02:30",
"02:45",
"03:00",
"03:15",
"03:30",
"03:45",
"04:00",
"04:15",
"04:30",
"04:45",
"05:00",
"05:15",
"05:30",
"05:45",
"06:00",
"06:15",
"06:30",
"06:45",
"07:00",
"07:15",
"07:30",
"07:45",
"08:00",
"08:15",
"08:30",
"08:45",
"09:00",
"09:15",
"09:30",
"09:45",
"10:00",
"10:15",
"10:30",
"10:45",
"11:00",
"11:15",
"11:30",
"11:45",
"12:00",
"12:15",
"12:30",
"12:45",
"13:00",
"13:15",
"13:30",
"13:45",
"14:00",
"14:15",
"14:30",
"14:45",
"15:00",
"15:15",
"15:30",
"15:45",
"16:00",
"16:15",
"16:30",
"16:45",
"17:00",
"17:15",
"17:30",
"17:45",
"18:00",
"18:15",
"18:30",
"18:45",
"19:00",
"19:15",
"19:30",
"19:45",
"20:00",
"20:15",
"20:30",
"20:45",
"21:00",
"21:15",
"21:30",
"21:45",
"22:00",
"22:15",
"22:30",
"22:45",
"23:00",
"23:15",
"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],
tem:'',
time:'',
})
onMounted(() => {//element,onMountedHook
getFrld(4).then((res) => {
console.log(res)
})
// getFrdl(4).then((res)=>{
// console.log(res)
// })
//
let arr = []
let brr = []
for(let i in res.frdlqhour){
arr.push(res.frdlqhour[i].useElectric)
brr.push(res.frdlqhour[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"));
let myChart2 = echarts.getInstanceByDom(document.getElementById("myEcharts2"));
if (myChart2){
myChart2.dispose()
}
myChart2 = echarts.init(document.getElementById("myEcharts2"));
let myChart3 = echarts.getInstanceByDom(document.getElementById("myEcharts3"));
if (myChart3){
myChart3.dispose()
}
myChart3 = echarts.init(document.getElementById("myEcharts3"));
let myChart4 = echarts.getInstanceByDom(document.getElementById("myEcharts4"));
if (myChart4){
myChart4.dispose()
}
myChart4 = echarts.init(document.getElementById("myEcharts4"));
//
myChart.setOption({
title: {},
tooltip: {},
@ -109,7 +237,7 @@ export default {
color:'#BEC3DA'
},
xAxis: {
data: ["12-3", "12-4", "12-5", "12-6", "12-7", "12-8"],
data: data.dayXz,
axisLine:{
lineStyle:{
color:'#BEC3DA',
@ -139,7 +267,7 @@ export default {
{
name: "日用电量",
type: "bar",
data: [5, 20, 36, 10, 10, 20],
data: data.dayData,
itemStyle:{
color:'#2F8EE0'
},
@ -149,6 +277,19 @@ export default {
window.onresize = function () {//
myChart.resize();
};
//
let crr = []
for(let i in res.frdlqday){
crr.push(res.frdlqday[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: {},
@ -156,7 +297,7 @@ export default {
color:'#BEC3DA'
},
xAxis: {
data: ["12-3", "12-4", "12-5", "12-6", "12-7", "12-8"],
data: data.emonthXz,
axisLine:{
lineStyle:{
color:'#BEC3DA',
@ -186,7 +327,7 @@ export default {
{
name: "月用电量",
type: "bar",
data: [5, 20, 36, 10, 10, 20],
data: data.emonthData,
itemStyle:{
color:'#2F8EE0'
},
@ -196,14 +337,25 @@ export default {
window.onresize = function () {//
myChart2.resize();
};
myChart3.setOption({
//
data.time=res.times
data.tem=res.temps
let myChart4 = echarts.getInstanceByDom(document.getElementById("myEcharts4"));
if (myChart4){
myChart4.dispose()
}
myChart4 = echarts.init(document.getElementById("myEcharts4"));
myChart4.setOption({
title: {},
tooltip: {},
textStyle:{
color:'#BEC3DA'
},
xAxis: {
data: ["12-3", "12-4", "12-5", "12-6", "12-7", "12-8"],
data: data.time,
axisLine:{
lineStyle:{
color:'#BEC3DA',
@ -213,7 +365,7 @@ export default {
},
yAxis: {
type: 'value',
name: "kW",
name: "",
splitLine:{
show:true,
lineStyle:{
@ -231,26 +383,50 @@ export default {
},
series: [
{
name: "当前功率",
type: "line",
data: [5, 20, 36, 10, 10, 20],
name: '当前温度',
type: 'line',
stack: 'Total',
itemStyle:{
color:'#2F8EE0'
},
data: data.tem
},
],
});
window.onresize = function () {//
myChart3.resize();
myChart4.resize();
};
myChart4.setOption({
})
getFrdl(4).then((res)=>{
console.log('1',res)
data.tempIn=res.data.tempIn
data.tempOut=res.data.tempOut
data.totp = res.data.totp
data.totwh = res.data.totwh
if(res.data.runStatus==1){
data.runStatus = '开启'
}else if (res.data.runStatus==2){
data.runStatus = '关闭'
}
//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"));
if (myChart3){
myChart3.dispose()
}
myChart3 = echarts.init(document.getElementById("myEcharts3"));
myChart3.setOption({
title: {},
tooltip: {},
textStyle:{
color:'#BEC3DA'
},
xAxis: {
data: ["12-3", "12-4", "12-5", "12-6", "12-7", "12-8"],
data: data.glXz,
axisLine:{
lineStyle:{
color:'#BEC3DA',
@ -260,7 +436,7 @@ export default {
},
yAxis: {
type: 'value',
name: "",
name: "kW",
splitLine:{
show:true,
lineStyle:{
@ -278,20 +454,24 @@ export default {
},
series: [
{
name: '当前温度',
type: 'line',
stack: 'Total',
name: "当前功率",
type: "line",
data: data.glData,
itemStyle:{
color:'#2F8EE0'
},
data: [120, 132, 101, 134, 90, 230, 210]
},
],
});
window.onresize = function () {//
myChart4.resize();
myChart3.resize();
};
});
})
})
return{
data
}
},
components: {},
mounted() {},

@ -2,37 +2,37 @@
<div class="app-container home">
<div class="top">
<div class="card">
<div>pic</div>
<div><img src="../../../assets/images/用电量.png"></div>
<div>
<p>总用电量</p>
<h2>1641kWh</h2>
<h2>{{data.totwh}}kWh</h2>
</div>
</div>
<div class="card">
<div>pic</div>
<div><img src="../../../assets/images/功率.png"></div>
<div>
<p>当前功率</p>
<h2>11kW</h2>
<h2>{{data.totp}}kW</h2>
</div>
</div>
<div class="card">
<div>pic</div>
<div><img src="../../../assets/images/温度.png"></div>
<div>
<div style="display: flex; margin-bottom: 5px">
<p>进水温度:</p>
<h2>25</h2>
<h2>{{data.tempIn}}</h2>
</div>
<div style="display: flex">
<p>出水温度:</p>
<h2>85</h2>
<h2>{{data.tempOut}}</h2>
</div>
</div>
</div>
<div class="card">
<div>pic</div>
<div><img src="../../../assets/images/温度传感器.png"></div>
<div>
<p>运行状态</p>
<h2 style="color: #1ab394">开启</h2>
<h2 style="color: #1ab394">{{data.runStatus}}</h2>
</div>
</div>
</div>
@ -68,43 +68,173 @@
<script name="Index">
import {getKqryb, getKqyrb} from '../../../api/emonitor/api'
import { onMounted } from "vue";
import {onMounted, reactive} from "vue";
import * as echarts from 'echarts';
export default {
name: "kqyrb",
setup() {
let data = reactive({
totwh:'',
totp:'',
tempIn:'',
tempOut:'',
//1 2
runStatus:'',
glData:[],
glXz:[
"00:00",
"00:15",
"00:30",
"00:45",
"01:00",
"01:15",
"01:30",
"01:45",
"02:00",
"02:15",
"02:30",
"02:45",
"03:00",
"03:15",
"03:30",
"03:45",
"04:00",
"04:15",
"04:30",
"04:45",
"05:00",
"05:15",
"05:30",
"05:45",
"06:00",
"06:15",
"06:30",
"06:45",
"07:00",
"07:15",
"07:30",
"07:45",
"08:00",
"08:15",
"08:30",
"08:45",
"09:00",
"09:15",
"09:30",
"09:45",
"10:00",
"10:15",
"10:30",
"10:45",
"11:00",
"11:15",
"11:30",
"11:45",
"12:00",
"12:15",
"12:30",
"12:45",
"13:00",
"13:15",
"13:30",
"13:45",
"14:00",
"14:15",
"14:30",
"14:45",
"15:00",
"15:15",
"15:30",
"15:45",
"16:00",
"16:15",
"16:30",
"16:45",
"17:00",
"17:15",
"17:30",
"17:45",
"18:00",
"18:15",
"18:30",
"18:45",
"19:00",
"19:15",
"19:30",
"19:45",
"20:00",
"20:15",
"20:30",
"20:45",
"21:00",
"21:15",
"21:30",
"21:45",
"22:00",
"22:15",
"22:30",
"22:45",
"23:00",
"23:15",
"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:'',
})
onMounted(() => {//element,onMountedHook
getKqyrb(3).then((res)=>{
console.log(res)
})
// getKqryb(3).then((res)=>{
// console.log(res)
// })
//
let arr = []
let brr = []
for(let i in res.kqyrbqhour){
arr.push(res.kqyrbqhour[i].useElectric)
brr.push(res.kqyrbqhour[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"));
let myChart2 = echarts.getInstanceByDom(document.getElementById("myEcharts2"));
if (myChart2){
myChart2.dispose()
}
myChart2 = echarts.init(document.getElementById("myEcharts2"));
let myChart3 = echarts.getInstanceByDom(document.getElementById("myEcharts3"));
if (myChart3){
myChart3.dispose()
}
myChart3 = echarts.init(document.getElementById("myEcharts3"));
let myChart4 = echarts.getInstanceByDom(document.getElementById("myEcharts4"));
if (myChart4){
myChart4.dispose()
}
myChart4 = echarts.init(document.getElementById("myEcharts4"));
//
myChart.setOption({
title: {},
tooltip: {},
@ -112,7 +242,7 @@ export default {
color:'#BEC3DA'
},
xAxis: {
data: ["12-3", "12-4", "12-5", "12-6", "12-7", "12-8"],
data: data.dayXz,
axisLine:{
lineStyle:{
color:'#BEC3DA',
@ -142,7 +272,7 @@ export default {
{
name: "日用电量",
type: "bar",
data: [5, 20, 36, 10, 10, 20],
data: data.dayData,
itemStyle:{
color:'#2F8EE0'
},
@ -152,6 +282,19 @@ export default {
window.onresize = function () {//
myChart.resize();
};
//
let crr = []
for(let i in res.kqyrbqday){
crr.push(res.kqyrbqday[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: {},
@ -159,7 +302,7 @@ export default {
color:'#BEC3DA'
},
xAxis: {
data: ["12-3", "12-4", "12-5", "12-6", "12-7", "12-8"],
data: data.emonthXz,
axisLine:{
lineStyle:{
color:'#BEC3DA',
@ -189,7 +332,7 @@ export default {
{
name: "月用电量",
type: "bar",
data: [5, 20, 36, 10, 10, 20],
data: data.emonthData,
itemStyle:{
color:'#2F8EE0'
},
@ -199,14 +342,31 @@ export default {
window.onresize = function () {//
myChart2.resize();
};
myChart3.setOption({
//
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'
}
},
textStyle:{
color:'#BEC3DA'
},
xAxis: {
data: ["12-3", "12-4", "12-5", "12-6", "12-7", "12-8"],
data: data.time,
axisLine:{
lineStyle:{
color:'#BEC3DA',
@ -216,7 +376,7 @@ export default {
},
yAxis: {
type: 'value',
name: "kW",
name: "",
splitLine:{
show:true,
lineStyle:{
@ -234,32 +394,59 @@ export default {
},
series: [
{
name: "当前功率",
type: "line",
data: [5, 20, 36, 10, 10, 20],
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 () {//
myChart3.resize();
myChart4.resize();
};
myChart4.setOption({
})
getKqryb(3).then((res)=>{
console.log('1',res)
data.tempIn=res.data.tempIn
data.tempOut=res.data.tempOut
data.totp = res.data.totp
data.totwh = res.data.totwh
if(res.data.runStatus==1){
data.runStatus = '开启'
}else if (res.data.runStatus==2){
data.runStatus = '关闭'
}
//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"));
if (myChart3){
myChart3.dispose()
}
myChart3 = echarts.init(document.getElementById("myEcharts3"));
myChart3.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"],
data: data.glXz,
axisLine:{
lineStyle:{
color:'#BEC3DA',
@ -269,7 +456,7 @@ export default {
},
yAxis: {
type: 'value',
name: "",
name: "kW",
splitLine:{
show:true,
lineStyle:{
@ -287,29 +474,25 @@ export default {
},
series: [
{
name: '进水',
type: 'line',
stack: 'Total',
itemStyle:{
color:'#2F8EE0'
},
data: [120, 132, 101, 134, 90, 230, 210]
},
{
name: '出水',
type: 'line',
stack: 'Total',
name: "当前功率",
type: "line",
data: data.glData,
itemStyle:{
color:'#2F8EE0'
},
data: [220, 182, 191, 234, 290, 330, 310]
},
],
});
window.onresize = function () {//
myChart4.resize();
myChart3.resize();
};
})
});
return{
data
}
},
components: {},
mounted() {},

@ -1,60 +1,11 @@
<template>
<div class="app-container home">
<div class="top">
<div class="card">
<div>pic</div>
<div class="card" v-for="(item,index) in data.info ">
<div><img src="../../../assets/images/温度.png"></div>
<div>
<p>温度传感器1</p>
<h2>40</h2>
</div>
</div>
<div class="card">
<div>pic</div>
<div>
<p>温度传感器2</p>
<h2>41</h2>
</div>
</div>
<div class="card">
<div>pic</div>
<div>
<p>温度传感器3</p>
<h2>33</h2>
</div>
</div>
<div class="card">
<div>pic</div>
<div>
<p>温度传感器4</p>
<h2>36</h2>
</div>
</div>
<div class="card">
<div>pic</div>
<div>
<p>温度传感器5</p>
<h2>35</h2>
</div>
</div>
<div class="card">
<div>pic</div>
<div>
<p>温度传感器6</p>
<h2>37</h2>
</div>
</div>
<div class="card">
<div>pic</div>
<div>
<p>温度传感器7</p>
<h2>38</h2>
</div>
</div>
<div class="card">
<div>pic</div>
<div>
<p>温度传感器8</p>
<h2>32</h2>
<p>{{item.name}}</p>
<h2>{{item.temp}}</h2>
</div>
</div>
</div>
@ -72,15 +23,49 @@
<script name="Index">
import {getWdcgq} from '../../../api/emonitor/api'
import { onMounted } from "vue";
import {onMounted, reactive} from "vue";
import * as echarts from 'echarts';
export default {
name: "wdcgq",
setup() {
let data = reactive({
info:[],
xinfo:[],
infos: [
{
name: "温度传感器1",
type: "line",
data: [5, 20, 36, 10, 10, 20],
itemStyle:{
color:'#2F8EE0'
},
},
{
name: "温度传感器2",
type: "line",
data: [25, 40, 66, 80, 120, 50],
itemStyle:{
color:'#2F8EE0'
},
},
],
})
onMounted(() => {//element,onMountedHook
//1-8 id 5-12
getWdcgq().then((res)=>{
console.log(res)
let arr = []
let brr = []
let crr = []
for (let i in res.data){
arr.push({name:res.data[i].deviceName,temp:res.data[i].deviceTemp})
brr.push({name:res.data[i].deviceName,type: "line",data:res.data[i].temps,itemStyle:{color:'#2F8EE0'}})
crr.push(res.data[i].times)
}
console.log(crr)
data.info=arr
data.infos=brr
data.xinfo=crr
let myChart = echarts.getInstanceByDom(document.getElementById("myEcharts"));
if (myChart){
@ -92,7 +77,7 @@ export default {
title: {},
tooltip: {},
legend: {
data: ['温度传感器1','温度传感器2'],
selectedMode: 'single',
textStyle:{
color:'#BEC3DA'
}
@ -101,7 +86,104 @@ export default {
color:'#BEC3DA'
},
xAxis: {
data: ["12-3", "12-4", "12-5", "12-6", "12-7", "12-8"],
data: [
"00:00",
"00:15",
"00:30",
"00:45",
"01:00",
"01:15",
"01:30",
"01:45",
"02:00",
"02:15",
"02:30",
"02:45",
"03:00",
"03:15",
"03:30",
"03:45",
"04:00",
"04:15",
"04:30",
"04:45",
"05:00",
"05:15",
"05:30",
"05:45",
"06:00",
"06:15",
"06:30",
"06:45",
"07:00",
"07:15",
"07:30",
"07:45",
"08:00",
"08:15",
"08:30",
"08:45",
"09:00",
"09:15",
"09:30",
"09:45",
"10:00",
"10:15",
"10:30",
"10:45",
"11:00",
"11:15",
"11:30",
"11:45",
"12:00",
"12:15",
"12:30",
"12:45",
"13:00",
"13:15",
"13:30",
"13:45",
"14:00",
"14:15",
"14:30",
"14:45",
"15:00",
"15:15",
"15:30",
"15:45",
"16:00",
"16:15",
"16:30",
"16:45",
"17:00",
"17:15",
"17:30",
"17:45",
"18:00",
"18:15",
"18:30",
"18:45",
"19:00",
"19:15",
"19:30",
"19:45",
"20:00",
"20:15",
"20:30",
"20:45",
"21:00",
"21:15",
"21:30",
"21:45",
"22:00",
"22:15",
"22:30",
"22:45",
"23:00",
"23:15",
"23:30",
"23:45"
],
axisLine:{
lineStyle:{
color:'#BEC3DA',
@ -127,21 +209,17 @@ export default {
}
},
},
series: [
{
name: "温度传感器1",
type: "line",
data: [5, 20, 36, 10, 10, 20],
itemStyle:{
color:'#2F8EE0'
},
},
],
series:data.infos,
});
window.onresize = function () {//
myChart.resize();
};
})
});
return{
data
}
},
components: {},
mounted() {},

@ -2,21 +2,21 @@
<div class="app-container home">
<div class="top">
<div class="card">
<div>pic</div>
<div><img src="../../../assets/images/用电量.png"></div>
<div>
<p>总用电量</p>
<h2>{{data.totwh}}kWh</h2>
</div>
</div>
<div class="card">
<div>pic</div>
<div><img src="../../../assets/images/功率.png"></div>
<div>
<p>当前功率</p>
<h2>{{data.totp}}kW</h2>
</div>
</div>
<div class="card">
<div>pic</div>
<div><img src="../../../assets/images/温度.png"></div>
<div>
<div style="display: flex; margin-bottom: 5px">
<p>进水温度:</p>
@ -29,7 +29,7 @@
</div>
</div>
<div class="card">
<div>pic</div>
<div><img src="../../../assets/images/温度传感器.png"></div>
<div>
<p>运行状态</p>
<h2 style="color: #1ab394">{{data.runStatus}}</h2>
@ -429,7 +429,6 @@ export default {
title: {},
tooltip: {},
legend: {
data: ['进水', '出水'],
textStyle:{
color:'#BEC3DA'
}
@ -490,14 +489,6 @@ export default {
};
})
});
return{
data

Loading…
Cancel
Save