|
|
@ -40,33 +40,46 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="bottom"> |
|
|
|
<div class="middle"> |
|
|
|
<!-- <div class="bottom1">--> |
|
|
|
<!-- <div class="bottom1">--> |
|
|
|
<!-- <div class="bottom1-1">--> |
|
|
|
<!-- <div class="bottom1-1">--> |
|
|
|
<!-- 日用电量--> |
|
|
|
<!-- 日用电量--> |
|
|
|
<!-- </div>--> |
|
|
|
<!-- </div>--> |
|
|
|
<!-- <div id="myEcharts" style="width: 100%; height: 86.7%"></div>--> |
|
|
|
<!-- <div id="myEcharts" style="width: 100%; height: 86.7%"></div>--> |
|
|
|
<!-- </div>--> |
|
|
|
<!-- </div>--> |
|
|
|
<!-- <div class="bottom1">--> |
|
|
|
<!-- <div class="bottom1">--> |
|
|
|
<!-- <div class="bottom1-1">--> |
|
|
|
<!-- <div class="bottom1-1">--> |
|
|
|
<!-- 月用电量--> |
|
|
|
<!-- 月用电量--> |
|
|
|
<!-- </div>--> |
|
|
|
<!-- </div>--> |
|
|
|
<!-- <div id="myEcharts2" style="width: 100%; height: 86.7%"></div>--> |
|
|
|
<!-- <div id="myEcharts2" style="width: 100%; height: 86.7%"></div>--> |
|
|
|
<!-- </div>--> |
|
|
|
<!-- </div>--> |
|
|
|
<div class="bottom1"> |
|
|
|
<div class="middle1"> |
|
|
|
<div class="bottom1-1"> |
|
|
|
<div class="title"> |
|
|
|
|
|
|
|
当前功率 |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div id="myEcharts1" style="width: 100%; height: 88.6%"></div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="middle2"> |
|
|
|
|
|
|
|
<div class="title"> |
|
|
|
当前功率 |
|
|
|
当前功率 |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div id="myEcharts3" style="width: 100%; height: 86.7%"></div> |
|
|
|
<div id="myEcharts3" style="width: 100%; height: 86.7%"></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="bottom1"> |
|
|
|
<!-- <div class="bottom1">--> |
|
|
|
<div class="bottom1-1"> |
|
|
|
<!-- <div class="bottom1-1">--> |
|
|
|
|
|
|
|
<!-- 当前温度--> |
|
|
|
|
|
|
|
<!-- </div>--> |
|
|
|
|
|
|
|
<!-- <div id="myEcharts4" style="width: 100%; height: 86.7%"></div>--> |
|
|
|
|
|
|
|
<!-- </div>--> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="bottom"> |
|
|
|
|
|
|
|
<div class="title"> |
|
|
|
当前温度 |
|
|
|
当前温度 |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div id="myEcharts4" style="width: 100%; height: 86.7%"></div> |
|
|
|
<div id="myEcharts4" style="width: 100%; height: 86.7%"></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script name="Index"> |
|
|
|
<script name="Index"> |
|
|
@ -227,11 +240,77 @@ export default { |
|
|
|
deviceId: 4, |
|
|
|
deviceId: 4, |
|
|
|
}) |
|
|
|
}) |
|
|
|
onMounted(() => {//需要获取到element,所以是onMounted的Hook |
|
|
|
onMounted(() => {//需要获取到element,所以是onMounted的Hook |
|
|
|
|
|
|
|
getPowerPie() |
|
|
|
getSbFun() |
|
|
|
getSbFun() |
|
|
|
getFrldFun() |
|
|
|
getFrldFun() |
|
|
|
getFrdlFun() |
|
|
|
getFrdlFun() |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//渲染发热电缆当前功率饼图 |
|
|
|
|
|
|
|
function getPowerPie(){ |
|
|
|
|
|
|
|
let myChart1 = echarts.getInstanceByDom(document.getElementById("myEcharts1")); |
|
|
|
|
|
|
|
if (myChart1){ |
|
|
|
|
|
|
|
myChart1.dispose() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
myChart1 = echarts.init(document.getElementById("myEcharts1")); |
|
|
|
|
|
|
|
myChart1.setOption({ |
|
|
|
|
|
|
|
series: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: 'gauge', |
|
|
|
|
|
|
|
axisLine: { |
|
|
|
|
|
|
|
lineStyle: { |
|
|
|
|
|
|
|
width: 10, |
|
|
|
|
|
|
|
color: [ |
|
|
|
|
|
|
|
[0.3, '#67e0e3'], |
|
|
|
|
|
|
|
[0.7, '#37a2da'], |
|
|
|
|
|
|
|
[1, '#fd666d'] |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
pointer: { |
|
|
|
|
|
|
|
itemStyle: { |
|
|
|
|
|
|
|
color: 'inherit' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// axisTick: { |
|
|
|
|
|
|
|
// distance: -30, |
|
|
|
|
|
|
|
// length: 8, |
|
|
|
|
|
|
|
// lineStyle: { |
|
|
|
|
|
|
|
// color: '#fff', |
|
|
|
|
|
|
|
// width: 2 |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
// splitLine: { |
|
|
|
|
|
|
|
// distance: -30, |
|
|
|
|
|
|
|
// length: 30, |
|
|
|
|
|
|
|
// lineStyle: { |
|
|
|
|
|
|
|
// color: '#fff', |
|
|
|
|
|
|
|
// width: 4 |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
axisLabel: { |
|
|
|
|
|
|
|
color: 'inherit', |
|
|
|
|
|
|
|
distance: 10, |
|
|
|
|
|
|
|
fontSize: 10 |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
detail: { |
|
|
|
|
|
|
|
valueAnimation: true, |
|
|
|
|
|
|
|
formatter: '{value} kW', |
|
|
|
|
|
|
|
color: 'inherit' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
data: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
value: data.totp |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
window.onresize = function () {//自适应大小 |
|
|
|
|
|
|
|
myChart1.resize(); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//渲染发热电缆数据 |
|
|
|
//渲染发热电缆数据 |
|
|
|
function getFrldFun(){ |
|
|
|
function getFrldFun(){ |
|
|
|
getFrld(data.deviceId).then((res) => { |
|
|
|
getFrld(data.deviceId).then((res) => { |
|
|
@ -469,6 +548,7 @@ export default { |
|
|
|
borderColor: '#767da1', |
|
|
|
borderColor: '#767da1', |
|
|
|
}, |
|
|
|
}, |
|
|
|
legend: { |
|
|
|
legend: { |
|
|
|
|
|
|
|
top: 10, |
|
|
|
data: ['当前温度'], |
|
|
|
data: ['当前温度'], |
|
|
|
textStyle:{ |
|
|
|
textStyle:{ |
|
|
|
color:'#F5901A' |
|
|
|
color:'#F5901A' |
|
|
@ -562,6 +642,7 @@ export default { |
|
|
|
myChart3.setOption({ |
|
|
|
myChart3.setOption({ |
|
|
|
title: {}, |
|
|
|
title: {}, |
|
|
|
legend:{ |
|
|
|
legend:{ |
|
|
|
|
|
|
|
top: 10, |
|
|
|
data:['当前功率'], |
|
|
|
data:['当前功率'], |
|
|
|
textStyle: { |
|
|
|
textStyle: { |
|
|
|
color: "white" //标题的颜色 |
|
|
|
color: "white" //标题的颜色 |
|
|
@ -698,25 +779,42 @@ export default { |
|
|
|
align-items: center; |
|
|
|
align-items: center; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.bottom{ |
|
|
|
.middle{ |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
height: 640px; |
|
|
|
//height: 640px; |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
flex-wrap: wrap; |
|
|
|
flex-wrap: wrap; |
|
|
|
justify-content: space-between; |
|
|
|
justify-content: space-between; |
|
|
|
|
|
|
|
margin-bottom: 12px; |
|
|
|
} |
|
|
|
} |
|
|
|
.bottom1{ |
|
|
|
.middle1{ |
|
|
|
width: 49.6%; |
|
|
|
width: 24.4%; |
|
|
|
height: 300px; |
|
|
|
height: 350px; |
|
|
|
|
|
|
|
background-color: #2F3D8A; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.middle2{ |
|
|
|
|
|
|
|
width: 74.8%; |
|
|
|
|
|
|
|
height: 350px; |
|
|
|
|
|
|
|
background-color: #2F3D8A; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.middle1-1{ |
|
|
|
|
|
|
|
width: 100%; |
|
|
|
|
|
|
|
height: 13.3%; |
|
|
|
|
|
|
|
background-color: #374590; |
|
|
|
|
|
|
|
padding-top: 10px; |
|
|
|
|
|
|
|
padding-left: 10px; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.bottom{ |
|
|
|
|
|
|
|
width: 100%; |
|
|
|
|
|
|
|
height: 305px; |
|
|
|
background-color: #2F3D8A; |
|
|
|
background-color: #2F3D8A; |
|
|
|
margin-bottom: 12px; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
p{ |
|
|
|
p{ |
|
|
|
margin-bottom: 10px; |
|
|
|
margin-bottom: 10px; |
|
|
|
} |
|
|
|
} |
|
|
|
.bottom1-1{ |
|
|
|
.title{ |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
height: 40px; |
|
|
|
height: 13.3%; |
|
|
|
background-color: #374590; |
|
|
|
background-color: #374590; |
|
|
|
padding-top: 10px; |
|
|
|
padding-top: 10px; |
|
|
|
padding-left: 10px; |
|
|
|
padding-left: 10px; |
|
|
|