手动控制策略导入

master
wj 3 years ago
parent ec189d295f
commit 4b4649088b
  1. 15
      psdc-ui/src/App.vue
  2. 218
      psdc-ui/src/views/control/manual/index.vue
  3. 5
      psdc-ui/src/views/control/timer/index.vue
  4. 10
      psdc-ui/src/views/emonitor/db/index.vue
  5. 443
      psdc-ui/src/views/emonitor/drgl/index.vue
  6. 443
      psdc-ui/src/views/emonitor/frdl/index.vue
  7. 442
      psdc-ui/src/views/emonitor/kqyrb/index.vue
  8. 2
      psdc-ui/src/views/emonitor/wdcgq/index.vue
  9. 443
      psdc-ui/src/views/emonitor/xrgl/index.vue

@ -27,4 +27,19 @@ onMounted(() => {
color: #f3ffff;
font-size: 14px;
}
/* 滚动条 */
::-webkit-scrollbar {
width: 5px;
height: 10px;
}
/* 滚动槽 */
::-webkit-scrollbar-track {
border-radius: 0px;
background: rgba(0,0,0,0);
}
/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
border-radius: 0px;
background: rgba(123, 153, 184, 0.31);
}
</style>

@ -66,16 +66,30 @@
<template #default>
<el-radio v-for="(item,index) in celueList" :key="index" class="celueBox" v-model="radio" :label="item.sceneName" size="large" @change="selectCeLue(item)">
<span style="font-weight: bold; display: inline-block; margin-bottom: 20px;">{{ item.sceneName }}</span>
<div class="celueItem" v-for="items in item.data" :key="items.device_id">
<span>{{ items.device_name }}</span>
<div class="itemsValue">
<span class="txtInput" v-for="itemsValue in items.value" :key="itemsValue.sceneKey">
<span class="txt">{{ itemsValue.sceneContext }}</span>
<input type="text" :value="`${itemsValue.sceneValue}℃`" disabled/>
</span>
</div>
</div>
<el-timeline>
<el-timeline-item v-for="(items,index) in item.flow" :key="index" :timestamp="items.timestamp" :hollow="items.hollow" :type="items.type" placement="top">
{{items.step}}
</el-timeline-item>
</el-timeline>
<!-- <div class="celueItem" v-for="items in item.data" :key="items.device_id">-->
<!-- <span>{{ items.device_name }}</span>-->
<!-- <div class="itemsValue">-->
<!-- <span class="txtInput" v-for="itemsValue in items.value" :key="itemsValue.sceneKey">-->
<!-- <span class="txt">{{ itemsValue.sceneContext }}</span>-->
<!-- <input type="text" :value="`${itemsValue.sceneValue}℃`" disabled/>-->
<!-- </span>-->
<!-- </div>-->
<!-- </div>-->
</el-radio>
<!-- <div style="display: flex; flex-direction: column;">-->
<!-- <el-checkbox v-for="item in celueList" :key="item.sceneId" v-model="item.isCheck" :label="item.sceneName + '(' + item.sceneRemark + ')'"/>-->
<!-- </div>-->
</template>
<template #footer>
<div style="flex: auto">
@ -188,43 +202,152 @@ function indexMethod1(index){
/** 策略导入处理*/
const drawerIshow = ref(false)
const radio = ref()
const celueList = ref([])
const celueList = ref([
{
sceneName:'电磁锅炉供暖模式',
flow:[
{
timestamp:'第一步',
step:'开启断路器,锅炉循环泵供电。',
hollow: false,
type: '',
},
{
timestamp:'第二步',
step:'开启断路器,电磁锅炉供电,在控制界面可启停和调节锅炉出水温度。锅炉启动时会自动开启锅炉循环泵。',
hollow: true,
type: '',
},
{
timestamp:'第三步',
step:'当中间水箱温度达到实验要求时,开启断路器,启动热网循环泵。',
hollow: false,
type: '',
}
]
},
{
sceneName:'空气源热泵供暖模式',
flow:[
{
timestamp:'第一步',
step:'开启空气源热泵循环泵断路器,空气源热泵循环泵供电。',
hollow: false,
},
{
timestamp:'第二步',
step:'开启空气源热泵断路器,空气源热泵供电,在控制界面可启停和调节空气源热泵出水温度。锅炉启动时会自动开启空气源热泵循环泵。',
hollow: true,
},
{
timestamp:'第三步',
step:'当中间水箱温度达到实验要求时,开启热网循环泵断路器和风机盘管断路器断路器,启动热网循环泵和风机盘管,通过风机盘管控制界面可进行设置控制。',
hollow: false,
}
]
},
{
sceneName:'电磁锅炉水蓄热模式',
flow:[
{
timestamp:'第一步',
step:'开启锅炉蓄热循环泵断路器,锅炉蓄热循环泵供电。',
hollow: false,
},
{
timestamp:'第二步',
step:'开启电磁锅炉电箱中的电磁锅炉断路器,电磁锅炉供电。',
hollow: true,
},
{
timestamp:'第三步',
step:'在控制界面进行锅炉启动和出水温度设置,锅炉启动会自动启动相应循环水泵。',
hollow: true,
},
{
timestamp:'第四步',
step:'蓄热完成后关闭电磁锅炉及水泵。',
hollow: false,
}
]
},
{
sceneName:'空气源热泵水蓄热模式',
flow:[
{
timestamp:'第一步',
step:'开启空气源热泵蓄热循环泵断路器,蓄热循环水泵供电。',
hollow: false,
},
{
timestamp:'第二步',
step:'开启空气源热泵电箱中的空气源热泵断路器,空气源热泵供电。',
hollow: true,
},
{
timestamp:'第三步',
step:'在控制界面进行空气源热泵启动和出水温度设置,空气源启动会自动启动相应循环水泵。',
hollow: true,
},
{
timestamp:'第四步',
step:'蓄热完成后关闭空气源热泵及水泵。',
hollow: false,
}
]
},
{
sceneName:'蓄热水箱暖气片供暖模式',
flow:[
{
timestamp:'第一步',
step:'开启热网循环泵断路器,热网循环泵开启。',
hollow: false,
}
]
},
])
function getStrategyListFun(){
getStrategyList().then((res)=>{
celueList.value = res.data
// celueList.value = res.data
})
}
//
const SenceControlArr = ref([])
function selectCeLue(item){
//
//1
let dataArr = [];
for(let i = 0;i < item.data.length;i++){
//2
let dataObject = {};
// deviceId = item.data[i].device_id;
dataObject.deviceId = item.data[i].device_id;
//3
let tempArr = [];
for(let j = 0;j < item.data[i].value.length;j++){
//4
let tempObject = {};
tempObject.controlKey = item.data[i].value[j].sceneKey
tempObject.controlValue = item.data[i].value[j].sceneValue
//5
tempArr.push(tempObject)
dataObject.data = tempArr
}
//6
dataArr.push(dataObject);
}
console.log(item)
// for(let i = 0;i < item.flow.length;i++){
// item.flow[i].type = 'primary'
// }
//
// console.log(JSON.stringify(dataArr, null, 4));
SenceControlArr.value = JSON.stringify(dataArr, null, 4)
// //
// //1
// let dataArr = [];
// for(let i = 0;i < item.data.length;i++){
// //2
// let dataObject = {};
// // deviceId = item.data[i].device_id;
// dataObject.deviceId = item.data[i].device_id;
//
// //3
// let tempArr = [];
// for(let j = 0;j < item.data[i].value.length;j++){
// //4
// let tempObject = {};
// tempObject.controlKey = item.data[i].value[j].sceneKey
// tempObject.controlValue = item.data[i].value[j].sceneValue
//
// //5
// tempArr.push(tempObject)
// dataObject.data = tempArr
// }
// //6
// dataArr.push(dataObject);
// }
//
// //
// // console.log(JSON.stringify(dataArr, null, 4));
// SenceControlArr.value = JSON.stringify(dataArr, null, 4)
}
//
function confirmClick() {
@ -303,10 +426,11 @@ function getSetTemperatureFun(item){
flex-wrap: wrap;
width: 100%;
height: 50%;
margin-bottom: 12px;
overflow-y: auto;
.dev_control_item{
width: 24%;
height: 47%;
height: 49%;
margin-right: 12px;
margin-bottom: 12px;
background-color: #2F3D8A;
@ -321,7 +445,7 @@ function getSetTemperatureFun(item){
background-color: #374590;
padding: 0 10px;
span{
font-size: 16px;
font-size: 14px;
font-weight: bold;
line-height: 37px;
}
@ -455,6 +579,12 @@ function getSetTemperatureFun(item){
float: right;
margin-top: 5px;
}
::v-deep .el-timeline-item__content{
white-space: normal;
}
::v-deep .el-timeline{
padding-left: 3px;
}
::v-deep .el-button{
border-radius: 2px;
margin-bottom: 12px;
@ -504,5 +634,13 @@ function getSetTemperatureFun(item){
::v-deep .el-button.is-disabled{
background-color: #dddddd;
}
::v-deep .el-drawer{
width: 45% !important;
}
::v-deep .el-checkbox{
width: 100% !important;
white-space: normal !important;
//margin-bottom: 20px;
}
</style>

@ -538,7 +538,7 @@ const { queryParams } = toRefs(data);
.dev_control_table{
position: relative;
width: 100%;
min-height: 745px;
min-height: 740px;
background-color: #2F3D8A;
}
.mr30{
@ -583,6 +583,9 @@ const { queryParams } = toRefs(data);
::v-deep .el-button{
border-radius: 2px;
}
::v-deep .mb8{
margin-bottom: 12px;
}
::v-deep .el-pagination{
position: absolute;
bottom: 10px;

@ -491,7 +491,7 @@ p{
justify-content: space-between;
}
.card{
width: 24%;
width: 24.4%;
height: 100%;
background-color: #2F3D8A;
display: flex;
@ -501,13 +501,13 @@ p{
.mid{
width: 100%;
height: 350px;
margin-top: 20px;
margin-bottom: 20px;
margin-top: 12px;
margin-bottom: 12px;
display: flex;
justify-content: space-between;
}
.mid1{
width: 24%;
width: 24.4%;
height: 100%;
background-color: #2F3D8A;
}
@ -519,7 +519,7 @@ p{
padding-left: 10px;
}
.mid2{
width: 74.67%;
width: 74.8%;
height: 100%;
background-color: #2F3D8A;
}

@ -45,18 +45,18 @@
</div>
<div class="bottom">
<div class="bottom1">
<div class="bottom1-1">
日用电量
</div>
<div id="myEcharts" style="width: 100%; height: 86.7%"></div>
</div>
<div class="bottom1">
<div class="bottom1-1">
月用电量
</div>
<div id="myEcharts2" style="width: 100%; height: 86.7%"></div>
</div>
<!-- <div class="bottom1">-->
<!-- <div class="bottom1-1">-->
<!-- 日用电量-->
<!-- </div>-->
<!-- <div id="myEcharts" style="width: 100%; height: 86.7%"></div>-->
<!-- </div>-->
<!-- <div class="bottom1">-->
<!-- <div class="bottom1-1">-->
<!-- 月用电量-->
<!-- </div>-->
<!-- <div id="myEcharts2" style="width: 100%; height: 86.7%"></div>-->
<!-- </div>-->
<div class="bottom1">
<div class="bottom1-1">
当前功率
@ -241,212 +241,212 @@ export default {
getDcgl(data.deviceId).then((res)=>{
console.log(res)
//
let arr = []
let brr = []
for(let i in res.dcglqhour){
arr.push(res.dcglqhour[i].useElectric)
brr.push(res.dcglqhour[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: {},
grid:{
show: true,
top: '20%',
bottom:'15%',
left:'5%',
right:'3%',
borderWidth: 1,
borderColor: '#767da1',
},
legend:{
data:['日用电量'],
textStyle: {
color: "white" //
},
},
textStyle:{
color:'#BEC3DA'
},
xAxis: {
type:'category',
data:data.dayXz,
axisLine:{
lineStyle:{
color:'#767da1',
// type:'dashed'
}
},
axisTick: {
show: false // x
},
splitArea: {
show: true,
interval:0,
areaStyle: {
color: ['rgb(54,68,148,.8)', 'rgb(37,51,133,.8)'] //
//
}
}
},
yAxis: {
type: 'value',
name: "kWh",
splitLine:{
show:true,
lineStyle:{
type:'solid',
color:'#f3ffff'
}
},
axisLine: {
show: false,
lineStyle:{
type:'dashed',
color:'#BEC3DA'
}
},
},
series: [
{
name: "日用电量",
type: "bar",
data: data.dayData,
itemStyle:{
color:'#2F8EE0'
},
markPoint: {
itemStyle: {
normal: {
label: {
color: '#fff',
// fontSize: 9
// borderColor: '#000',
// borderWidth: 1,
}
}
},
data: [
{type: "max", name: "最大值"},
{type: "min", name: "最小值"}
]
},
},
],
});
window.onresize = function () {//
myChart.resize();
};
// let arr = []
// let brr = []
// for(let i in res.dcglqhour){
// arr.push(res.dcglqhour[i].useElectric)
// brr.push(res.dcglqhour[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: {},
// grid:{
// show: true,
// top: '20%',
// bottom:'15%',
// left:'5%',
// right:'3%',
// borderWidth: 1,
// borderColor: '#767da1',
// },
// legend:{
// data:[''],
// textStyle: {
// color: "white" //
// },
// },
// textStyle:{
// color:'#BEC3DA'
// },
// xAxis: {
// type:'category',
// data:data.dayXz,
// axisLine:{
// lineStyle:{
// color:'#767da1',
// // type:'dashed'
// }
// },
// axisTick: {
// show: false // x
// },
// splitArea: {
// show: true,
// interval:0,
// areaStyle: {
// color: ['rgb(54,68,148,.8)', 'rgb(37,51,133,.8)'] //
// //
// }
// }
// },
// yAxis: {
// type: 'value',
// name: "kWh",
// splitLine:{
// show:true,
// lineStyle:{
// type:'solid',
// color:'#f3ffff'
// }
// },
// axisLine: {
// show: false,
// lineStyle:{
// type:'dashed',
// color:'#BEC3DA'
// }
// },
// },
// series: [
// {
// name: "",
// type: "bar",
// data: data.dayData,
// itemStyle:{
// color:'#2F8EE0'
// },
// markPoint: {
// itemStyle: {
// normal: {
// label: {
// color: '#fff',
// // fontSize: 9
// // borderColor: '#000',
// // borderWidth: 1,
// }
// }
// },
// data: [
// {type: "max", name: ""},
// {type: "min", name: ""}
// ]
// },
// },
// ],
// });
// 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: {},
grid:{
show: true,
top: '20%',
bottom:'15%',
left:'5%',
right:'3%',
borderWidth: 1,
borderColor: '#767da1',
},
legend:{
data:['月用电量'],
textStyle: {
color: "white" //
},
},
textStyle:{
color:'#BEC3DA'
},
xAxis: {
type:'category',
data:data.emonthXz,
axisLine:{
lineStyle:{
color:'#767da1',
// type:'dashed'
}
},
axisTick: {
show: false // x
},
splitArea: {
show: true,
interval:0,
areaStyle: {
color: ['rgb(54,68,148,.8)', 'rgb(37,51,133,.8)'] //
//
}
}
},
yAxis: {
type: 'value',
name: "kWh",
splitLine:{
show:true,
lineStyle:{
type:'solid',
color:'#f3ffff'
}
},
axisLine: {
show: false,
lineStyle:{
type:'dashed',
color:'#BEC3DA'
}
},
},
series: [
{
name: "月用电量",
type: "bar",
data: data.emonthData,
itemStyle:{
color:'#2F8EE0'
},
markPoint: {
itemStyle: {
normal: {
label: {
color: '#fff',
// fontSize: 9
// borderColor: '#000',
// borderWidth: 1,
}
}
},
data: [
{type: "max", name: "最大值"},
{type: "min", name: "最小值"}
]
},
},
],
});
window.onresize = function () {//
myChart2.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: {},
// grid:{
// show: true,
// top: '20%',
// bottom:'15%',
// left:'5%',
// right:'3%',
// borderWidth: 1,
// borderColor: '#767da1',
// },
// legend:{
// data:[''],
// textStyle: {
// color: "white" //
// },
// },
// textStyle:{
// color:'#BEC3DA'
// },
// xAxis: {
// type:'category',
// data:data.emonthXz,
// axisLine:{
// lineStyle:{
// color:'#767da1',
// // type:'dashed'
// }
// },
// axisTick: {
// show: false // x
// },
// splitArea: {
// show: true,
// interval:0,
// areaStyle: {
// color: ['rgb(54,68,148,.8)', 'rgb(37,51,133,.8)'] //
// //
// }
// }
// },
// yAxis: {
// type: 'value',
// name: "kWh",
// splitLine:{
// show:true,
// lineStyle:{
// type:'solid',
// color:'#f3ffff'
// }
// },
// axisLine: {
// show: false,
// lineStyle:{
// type:'dashed',
// color:'#BEC3DA'
// }
// },
// },
// series: [
// {
// name: "",
// type: "bar",
// data: data.emonthData,
// itemStyle:{
// color:'#2F8EE0'
// },
// markPoint: {
// itemStyle: {
// normal: {
// label: {
// color: '#fff',
// // fontSize: 9
// // borderColor: '#000',
// // borderWidth: 1,
// }
// }
// },
// data: [
// {type: "max", name: ""},
// {type: "min", name: ""}
// ]
// },
// },
// ],
// });
// window.onresize = function () {//
// myChart2.resize();
// };
//
data.time=res.times
@ -701,10 +701,10 @@ export default {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: 20px;
margin-bottom: 12px;
}
.card{
width: 24%;
width: 24.4%;
height: 110px;
background-color: #2F3D8A;
display: flex;
@ -720,10 +720,10 @@ export default {
justify-content: space-between;
}
.bottom1{
width: 49.35%;
width: 49.6%;
height: 300px;
background-color: #2F3D8A;
margin-bottom: 20px;
margin-bottom: 12px;
}
p{
margin-bottom: 10px;
@ -741,5 +741,8 @@ p{
.red{
color: red;
}
::v-deep .el-form-item{
margin-bottom: 12px;
}
</style>

@ -41,18 +41,18 @@
</div>
<div class="bottom">
<div class="bottom1">
<div class="bottom1-1">
日用电量
</div>
<div id="myEcharts" style="width: 100%; height: 86.7%"></div>
</div>
<div class="bottom1">
<div class="bottom1-1">
月用电量
</div>
<div id="myEcharts2" style="width: 100%; height: 86.7%"></div>
</div>
<!-- <div class="bottom1">-->
<!-- <div class="bottom1-1">-->
<!-- 日用电量-->
<!-- </div>-->
<!-- <div id="myEcharts" style="width: 100%; height: 86.7%"></div>-->
<!-- </div>-->
<!-- <div class="bottom1">-->
<!-- <div class="bottom1-1">-->
<!-- 月用电量-->
<!-- </div>-->
<!-- <div id="myEcharts2" style="width: 100%; height: 86.7%"></div>-->
<!-- </div>-->
<div class="bottom1">
<div class="bottom1-1">
当前功率
@ -237,218 +237,216 @@ export default {
getFrld(data.deviceId).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"));
myChart.setOption({
title: {},
tooltip: {},
grid:{
show: true,
top: '20%',
bottom:'15%',
left:'5%',
right:'3%',
borderWidth: 1,
borderColor: '#767da1',
},
legend:{
data:['日用电量'],
textStyle: {
color: "white" //
},
},
textStyle:{
color:'#BEC3DA'
},
xAxis: {
type:'category',
data:data.dayXz,
axisLine:{
lineStyle:{
color:'#767da1',
// type:'dashed'
}
},
axisTick: {
show: false // x
},
splitArea: {
show: true,
interval:0,
areaStyle: {
color: ['rgb(54,68,148,.8)', 'rgb(37,51,133,.8)'] //
//
}
}
},
yAxis: {
type: 'value',
name: "kWh",
splitLine:{
show:true,
lineStyle:{
type:'solid',
color:'#f3ffff'
}
},
axisLine: {
show: false,
lineStyle:{
type:'dashed',
color:'#BEC3DA'
}
},
},
series: [
{
name: "日用电量",
type: "bar",
data: data.dayData,
itemStyle:{
color:'#2F8EE0'
},
markPoint: {
itemStyle: {
normal: {
label: {
color: '#fff',
// fontSize: 9
// borderColor: '#000',
// borderWidth: 1,
}
}
},
data: [
{type: "max", name: "最大值"},
{type: "min", name: "最小值"}
]
},
},
],
});
window.onresize = function () {//
myChart.resize();
};
// 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"));
// myChart.setOption({
// title: {},
// tooltip: {},
// grid:{
// show: true,
// top: '20%',
// bottom:'15%',
// left:'5%',
// right:'3%',
// borderWidth: 1,
// borderColor: '#767da1',
// },
// legend:{
// data:[''],
// textStyle: {
// color: "white" //
// },
// },
// textStyle:{
// color:'#BEC3DA'
// },
// xAxis: {
// type:'category',
// data:data.dayXz,
// axisLine:{
// lineStyle:{
// color:'#767da1',
// // type:'dashed'
// }
// },
// axisTick: {
// show: false // x
// },
// splitArea: {
// show: true,
// interval:0,
// areaStyle: {
// color: ['rgb(54,68,148,.8)', 'rgb(37,51,133,.8)'] //
// //
// }
// }
// },
// yAxis: {
// type: 'value',
// name: "kWh",
// splitLine:{
// show:true,
// lineStyle:{
// type:'solid',
// color:'#f3ffff'
// }
// },
// axisLine: {
// show: false,
// lineStyle:{
// type:'dashed',
// color:'#BEC3DA'
// }
// },
// },
// series: [
// {
// name: "",
// type: "bar",
// data: data.dayData,
// itemStyle:{
// color:'#2F8EE0'
// },
// markPoint: {
// itemStyle: {
// normal: {
// label: {
// color: '#fff',
// // fontSize: 9
// // borderColor: '#000',
// // borderWidth: 1,
// }
// }
// },
// data: [
// {type: "max", name: ""},
// {type: "min", name: ""}
// ]
// },
// },
// ],
// });
// 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: {},
grid:{
show: true,
top: '20%',
bottom:'15%',
left:'5%',
right:'3%',
borderWidth: 1,
borderColor: '#767da1',
},
legend:{
data:['月用电量'],
textStyle: {
color: "white" //
},
},
textStyle:{
color:'#BEC3DA'
},
xAxis: {
type:'category',
data:data.emonthXz,
axisLine:{
lineStyle:{
color:'#767da1',
// type:'dashed'
}
},
axisTick: {
show: false // x
},
splitArea: {
show: true,
interval:0,
areaStyle: {
color: ['rgb(54,68,148,.8)', 'rgb(37,51,133,.8)'] //
//
}
}
},
yAxis: {
type: 'value',
name: "kWh",
splitLine:{
show:true,
lineStyle:{
type:'solid',
color:'#f3ffff'
}
},
axisLine: {
show: false,
lineStyle:{
type:'dashed',
color:'#BEC3DA'
}
},
},
series: [
{
name: "月用电量",
type: "bar",
data: data.emonthData,
itemStyle:{
color:'#2F8EE0'
},
markPoint: {
itemStyle: {
normal: {
label: {
color: '#fff',
// fontSize: 9
// borderColor: '#000',
// borderWidth: 1,
}
}
},
data: [
{type: "max", name: "最大值"},
{type: "min", name: "最小值"}
]
},
},
],
});
window.onresize = function () {//
myChart2.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: {},
// grid:{
// show: true,
// top: '20%',
// bottom:'15%',
// left:'5%',
// right:'3%',
// borderWidth: 1,
// borderColor: '#767da1',
// },
// legend:{
// data:[''],
// textStyle: {
// color: "white" //
// },
// },
// textStyle:{
// color:'#BEC3DA'
// },
// xAxis: {
// type:'category',
// data:data.emonthXz,
// axisLine:{
// lineStyle:{
// color:'#767da1',
// // type:'dashed'
// }
// },
// axisTick: {
// show: false // x
// },
// splitArea: {
// show: true,
// interval:0,
// areaStyle: {
// color: ['rgb(54,68,148,.8)', 'rgb(37,51,133,.8)'] //
// //
// }
// }
// },
// yAxis: {
// type: 'value',
// name: "kWh",
// splitLine:{
// show:true,
// lineStyle:{
// type:'solid',
// color:'#f3ffff'
// }
// },
// axisLine: {
// show: false,
// lineStyle:{
// type:'dashed',
// color:'#BEC3DA'
// }
// },
// },
// series: [
// {
// name: "",
// type: "bar",
// data: data.emonthData,
// itemStyle:{
// color:'#2F8EE0'
// },
// markPoint: {
// itemStyle: {
// normal: {
// label: {
// color: '#fff',
// // fontSize: 9
// // borderColor: '#000',
// // borderWidth: 1,
// }
// }
// },
// data: [
// {type: "max", name: ""},
// {type: "min", name: ""}
// ]
// },
// },
// ],
// });
// window.onresize = function () {//
// myChart2.resize();
// };
//
data.time=res.times
data.tem=res.temps
let myChart4 = echarts.getInstanceByDom(document.getElementById("myEcharts4"));
if (myChart4){
myChart4.dispose()
@ -689,10 +687,10 @@ export default {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: 20px;
margin-bottom: 12px;
}
.card{
width: 24%;
width: 24.4%;
height: 110px;
background-color: #2F3D8A;
display: flex;
@ -708,10 +706,10 @@ export default {
justify-content: space-between;
}
.bottom1{
width: 49.35%;
width: 49.6%;
height: 300px;
background-color: #2F3D8A;
margin-bottom: 20px;
margin-bottom: 12px;
}
p{
margin-bottom: 10px;
@ -729,5 +727,8 @@ p{
.red{
color: red;
}
::v-deep .el-form-item{
margin-bottom: 12px;
}
</style>

@ -45,18 +45,18 @@
</div>
<div class="bottom">
<div class="bottom1">
<div class="bottom1-1">
日用电量
</div>
<div id="myEcharts" style="width: 100%; height: 86.7%"></div>
</div>
<div class="bottom1">
<div class="bottom1-1">
月用电量
</div>
<div id="myEcharts2" style="width: 100%; height: 86.7%"></div>
</div>
<!-- <div class="bottom1">-->
<!-- <div class="bottom1-1">-->
<!-- 日用电量-->
<!-- </div>-->
<!-- <div id="myEcharts" style="width: 100%; height: 86.7%"></div>-->
<!-- </div>-->
<!-- <div class="bottom1">-->
<!-- <div class="bottom1-1">-->
<!-- 月用电量-->
<!-- </div>-->
<!-- <div id="myEcharts2" style="width: 100%; height: 86.7%"></div>-->
<!-- </div>-->
<div class="bottom1">
<div class="bottom1-1">
当前功率
@ -241,212 +241,211 @@ export default {
getKqyrb(data.deviceId).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"));
myChart.setOption({
title: {},
tooltip: {},
grid:{
show: true,
top: '20%',
bottom:'15%',
left:'5%',
right:'3%',
borderWidth: 1,
borderColor: '#767da1',
},
legend:{
data:['日用电量'],
textStyle: {
color: "white" //
},
},
textStyle:{
color:'#BEC3DA'
},
xAxis: {
type:'category',
data:data.dayXz,
axisLine:{
lineStyle:{
color:'#767da1',
// type:'dashed'
}
},
axisTick: {
show: false // x
},
splitArea: {
show: true,
interval:0,
areaStyle: {
color: ['rgb(54,68,148,.8)', 'rgb(37,51,133,.8)'] //
//
}
}
},
yAxis: {
type: 'value',
name: "kWh",
splitLine:{
show:true,
lineStyle:{
type:'solid',
color:'#f3ffff'
}
},
axisLine: {
show: false,
lineStyle:{
type:'dashed',
color:'#BEC3DA'
}
},
},
series: [
{
name: "日用电量",
type: "bar",
data: data.dayData,
itemStyle:{
color:'#2F8EE0'
},
markPoint: {
itemStyle: {
normal: {
label: {
color: '#fff',
// fontSize: 9
// borderColor: '#000',
// borderWidth: 1,
}
}
},
data: [
{type: "max", name: "最大值"},
{type: "min", name: "最小值"}
]
},
},
],
});
window.onresize = function () {//
myChart.resize();
};
// 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"));
// myChart.setOption({
// title: {},
// tooltip: {},
// grid:{
// show: true,
// top: '20%',
// bottom:'15%',
// left:'5%',
// right:'3%',
// borderWidth: 1,
// borderColor: '#767da1',
// },
// legend:{
// data:[''],
// textStyle: {
// color: "white" //
// },
// },
// textStyle:{
// color:'#BEC3DA'
// },
// xAxis: {
// type:'category',
// data:data.dayXz,
// axisLine:{
// lineStyle:{
// color:'#767da1',
// // type:'dashed'
// }
// },
// axisTick: {
// show: false // x
// },
// splitArea: {
// show: true,
// interval:0,
// areaStyle: {
// color: ['rgb(54,68,148,.8)', 'rgb(37,51,133,.8)'] //
// //
// }
// }
// },
// yAxis: {
// type: 'value',
// name: "kWh",
// splitLine:{
// show:true,
// lineStyle:{
// type:'solid',
// color:'#f3ffff'
// }
// },
// axisLine: {
// show: false,
// lineStyle:{
// type:'dashed',
// color:'#BEC3DA'
// }
// },
// },
// series: [
// {
// name: "",
// type: "bar",
// data: data.dayData,
// itemStyle:{
// color:'#2F8EE0'
// },
// markPoint: {
// itemStyle: {
// normal: {
// label: {
// color: '#fff',
// // fontSize: 9
// // borderColor: '#000',
// // borderWidth: 1,
// }
// }
// },
// data: [
// {type: "max", name: ""},
// {type: "min", name: ""}
// ]
// },
// },
// ],
// });
// 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: {},
grid:{
show: true,
top: '20%',
bottom:'15%',
left:'5%',
right:'3%',
borderWidth: 1,
borderColor: '#767da1',
},
legend:{
data:['月用电量'],
textStyle: {
color: "white" //
},
},
textStyle:{
color:'#BEC3DA'
},
xAxis: {
type:'category',
data:data.emonthXz,
axisLine:{
lineStyle:{
color:'#767da1',
// type:'dashed'
}
},
axisTick: {
show: false // x
},
splitArea: {
show: true,
interval:0,
areaStyle: {
color: ['rgb(54,68,148,.8)', 'rgb(37,51,133,.8)'] //
//
}
}
},
yAxis: {
type: 'value',
name: "kWh",
splitLine:{
show:true,
lineStyle:{
type:'solid',
color:'#f3ffff'
}
},
axisLine: {
show: false,
lineStyle:{
type:'dashed',
color:'#BEC3DA'
}
},
},
series: [
{
name: "月用电量",
type: "bar",
data: data.emonthData,
itemStyle:{
color:'#2F8EE0'
},
markPoint: {
itemStyle: {
normal: {
label: {
color: '#fff',
// fontSize: 9
// borderColor: '#000',
// borderWidth: 1,
}
}
},
data: [
{type: "max", name: "最大值"},
{type: "min", name: "最小值"}
]
},
},
],
});
window.onresize = function () {//
myChart2.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: {},
// grid:{
// show: true,
// top: '20%',
// bottom:'15%',
// left:'5%',
// right:'3%',
// borderWidth: 1,
// borderColor: '#767da1',
// },
// legend:{
// data:[''],
// textStyle: {
// color: "white" //
// },
// },
// textStyle:{
// color:'#BEC3DA'
// },
// xAxis: {
// type:'category',
// data:data.emonthXz,
// axisLine:{
// lineStyle:{
// color:'#767da1',
// // type:'dashed'
// }
// },
// axisTick: {
// show: false // x
// },
// splitArea: {
// show: true,
// interval:0,
// areaStyle: {
// color: ['rgb(54,68,148,.8)', 'rgb(37,51,133,.8)'] //
// //
// }
// }
// },
// yAxis: {
// type: 'value',
// name: "kWh",
// splitLine:{
// show:true,
// lineStyle:{
// type:'solid',
// color:'#f3ffff'
// }
// },
// axisLine: {
// show: false,
// lineStyle:{
// type:'dashed',
// color:'#BEC3DA'
// }
// },
// },
// series: [
// {
// name: "",
// type: "bar",
// data: data.emonthData,
// itemStyle:{
// color:'#2F8EE0'
// },
// markPoint: {
// itemStyle: {
// normal: {
// label: {
// color: '#fff',
// // fontSize: 9
// // borderColor: '#000',
// // borderWidth: 1,
// }
// }
// },
// data: [
// {type: "max", name: ""},
// {type: "min", name: ""}
// ]
// },
// },
// ],
// });
// window.onresize = function () {//
// myChart2.resize();
// };
//
data.time=res.times
@ -700,10 +699,10 @@ export default {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: 20px;
margin-bottom: 12px;
}
.card{
width: 24%;
width: 24.4%;
height: 110px;
background-color: #2F3D8A;
display: flex;
@ -719,10 +718,10 @@ export default {
justify-content: space-between;
}
.bottom1{
width: 49.35%;
width: 49.6%;
height: 300px;
background-color: #2F3D8A;
margin-bottom: 20px;
margin-bottom: 12px;
}
p{
margin-bottom: 10px;
@ -740,5 +739,8 @@ p{
.red{
color: red;
}
::v-deep .el-form-item{
margin-bottom: 12px;
}
</style>

@ -315,7 +315,7 @@ p{
justify-content: space-between;
}
.card{
width: 19.5%;
width: 19.45%;
height: 110px;
background-color: #2F3D8A;
margin-bottom: 12px;

@ -45,18 +45,18 @@
</div>
<div class="bottom">
<div class="bottom1">
<div class="bottom1-1">
日用电量
</div>
<div id="myEcharts" style="width: 100%; height: 86.7%"></div>
</div>
<div class="bottom1">
<div class="bottom1-1">
月用电量
</div>
<div id="myEcharts2" style="width: 100%; height: 86.7%"></div>
</div>
<!-- <div class="bottom1">-->
<!-- <div class="bottom1-1">-->
<!-- 日用电量-->
<!-- </div>-->
<!-- <div id="myEcharts" style="width: 100%; height: 86.7%"></div>-->
<!-- </div>-->
<!-- <div class="bottom1">-->
<!-- <div class="bottom1-1">-->
<!-- 月用电量-->
<!-- </div>-->
<!-- <div id="myEcharts2" style="width: 100%; height: 86.7%"></div>-->
<!-- </div>-->
<div class="bottom1">
<div class="bottom1-1">
当前功率
@ -362,212 +362,212 @@ export default {
getXcgl(data.deviceId).then((res)=>{
console.log(res)
//
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: {},
grid:{
show: true,
top: '20%',
bottom:'15%',
left:'5%',
right:'3%',
borderWidth: 1,
borderColor: '#767da1',
},
legend:{
data:['日用电量'],
textStyle: {
color: "white" //
},
},
textStyle:{
color:'#BEC3DA'
},
xAxis: {
type:'category',
data:data.dayXz,
axisLine:{
lineStyle:{
color:'#767da1',
// type:'dashed'
}
},
axisTick: {
show: false // x
},
splitArea: {
show: true,
interval:0,
areaStyle: {
color: ['rgb(54,68,148,.8)', 'rgb(37,51,133,.8)'] //
//
}
}
},
yAxis: {
type: 'value',
name: "kWh",
splitLine:{
show:true,
lineStyle:{
type:'solid',
color:'#f3ffff'
}
},
axisLine: {
show: false,
lineStyle:{
type:'dashed',
color:'#BEC3DA'
}
},
},
series: [
{
name: "日用电量",
type: "bar",
data: data.dayData,
itemStyle:{
color:'#2F8EE0'
},
markPoint: {
itemStyle: {
normal: {
label: {
color: '#fff',
// fontSize: 9
// borderColor: '#000',
// borderWidth: 1,
}
}
},
data: [
{type: "max", name: "最大值"},
{type: "min", name: "最小值"}
]
},
},
],
});
window.onresize = function () {//
myChart.resize();
};
// 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: {},
// grid:{
// show: true,
// top: '20%',
// bottom:'15%',
// left:'5%',
// right:'3%',
// borderWidth: 1,
// borderColor: '#767da1',
// },
// legend:{
// data:[''],
// textStyle: {
// color: "white" //
// },
// },
// textStyle:{
// color:'#BEC3DA'
// },
// xAxis: {
// type:'category',
// data:data.dayXz,
// axisLine:{
// lineStyle:{
// color:'#767da1',
// // type:'dashed'
// }
// },
// axisTick: {
// show: false // x
// },
// splitArea: {
// show: true,
// interval:0,
// areaStyle: {
// color: ['rgb(54,68,148,.8)', 'rgb(37,51,133,.8)'] //
// //
// }
// }
// },
// yAxis: {
// type: 'value',
// name: "kWh",
// splitLine:{
// show:true,
// lineStyle:{
// type:'solid',
// color:'#f3ffff'
// }
// },
// axisLine: {
// show: false,
// lineStyle:{
// type:'dashed',
// color:'#BEC3DA'
// }
// },
// },
// series: [
// {
// name: "",
// type: "bar",
// data: data.dayData,
// itemStyle:{
// color:'#2F8EE0'
// },
// markPoint: {
// itemStyle: {
// normal: {
// label: {
// color: '#fff',
// // fontSize: 9
// // borderColor: '#000',
// // borderWidth: 1,
// }
// }
// },
// data: [
// {type: "max", name: ""},
// {type: "min", name: ""}
// ]
// },
// },
// ],
// });
// 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: {},
grid:{
show: true,
top: '20%',
bottom:'15%',
left:'5%',
right:'3%',
borderWidth: 1,
borderColor: '#767da1',
},
legend:{
data:['月用电量'],
textStyle: {
color: "white" //
},
},
textStyle:{
color:'#BEC3DA'
},
xAxis: {
type:'category',
data:data.emonthXz,
axisLine:{
lineStyle:{
color:'#767da1',
// type:'dashed'
}
},
axisTick: {
show: false // x
},
splitArea: {
show: true,
interval:0,
areaStyle: {
color: ['rgb(54,68,148,.8)', 'rgb(37,51,133,.8)'] //
//
}
}
},
yAxis: {
type: 'value',
name: "kWh",
splitLine:{
show:true,
lineStyle:{
type:'solid',
color:'#f3ffff'
}
},
axisLine: {
show: false,
lineStyle:{
type:'dashed',
color:'#BEC3DA'
}
},
},
series: [
{
name: "月用电量",
type: "bar",
data: data.emonthData,
itemStyle:{
color:'#2F8EE0'
},
markPoint: {
itemStyle: {
normal: {
label: {
color: '#fff',
// fontSize: 9
// borderColor: '#000',
// borderWidth: 1,
}
}
},
data: [
{type: "max", name: "最大值"},
{type: "min", name: "最小值"}
]
},
},
],
});
window.onresize = function () {//
myChart2.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: {},
// grid:{
// show: true,
// top: '20%',
// bottom:'15%',
// left:'5%',
// right:'3%',
// borderWidth: 1,
// borderColor: '#767da1',
// },
// legend:{
// data:[''],
// textStyle: {
// color: "white" //
// },
// },
// textStyle:{
// color:'#BEC3DA'
// },
// xAxis: {
// type:'category',
// data:data.emonthXz,
// axisLine:{
// lineStyle:{
// color:'#767da1',
// // type:'dashed'
// }
// },
// axisTick: {
// show: false // x
// },
// splitArea: {
// show: true,
// interval:0,
// areaStyle: {
// color: ['rgb(54,68,148,.8)', 'rgb(37,51,133,.8)'] //
// //
// }
// }
// },
// yAxis: {
// type: 'value',
// name: "kWh",
// splitLine:{
// show:true,
// lineStyle:{
// type:'solid',
// color:'#f3ffff'
// }
// },
// axisLine: {
// show: false,
// lineStyle:{
// type:'dashed',
// color:'#BEC3DA'
// }
// },
// },
// series: [
// {
// name: "",
// type: "bar",
// data: data.emonthData,
// itemStyle:{
// color:'#2F8EE0'
// },
// markPoint: {
// itemStyle: {
// normal: {
// label: {
// color: '#fff',
// // fontSize: 9
// // borderColor: '#000',
// // borderWidth: 1,
// }
// }
// },
// data: [
// {type: "max", name: ""},
// {type: "min", name: ""}
// ]
// },
// },
// ],
// });
// window.onresize = function () {//
// myChart2.resize();
// };
//
data.time=res.times
@ -701,10 +701,10 @@ export default {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: 20px;
margin-bottom: 12px;
}
.card{
width: 24%;
width: 24.4%;
height: 110px;
background-color: #2F3D8A;
display: flex;
@ -720,10 +720,10 @@ export default {
justify-content: space-between;
}
.bottom1{
width: 49.35%;
width: 49.6%;
height: 300px;
background-color: #2F3D8A;
margin-bottom: 20px;
margin-bottom: 12px;
}
p{
margin-bottom: 10px;
@ -741,5 +741,8 @@ p{
.red{
color: red;
}
::v-deep .el-form-item{
margin-bottom: 12px;
}
</style>

Loading…
Cancel
Save