修改显示

yangwl
夜笙歌 3 days ago
parent 7f2e0234b0
commit 9d297d9ea9

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 KiB

After

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

@ -7,18 +7,18 @@
<!-- <div class="modelTitle" style="top:65%;left:32%">近7天产量</div>--> <!-- <div class="modelTitle" style="top:65%;left:32%">近7天产量</div>-->
<div class="modelTitle" style="top:65%;left:32%">烘房耗电量</div> <div class="modelTitle" style="top:65%;left:32%">烘房耗电量</div>
<div class="modelTitle" style="top:65%;left:71%">计划达成率</div> <div class="modelTitle" style="top:65%;left:71%">计划达成率</div>
<div class="title1" style="top:24%;left:34%">成型机产量</div> <!-- <div class="title1" style="top:24%;left:34%">成型机产量</div>-->
<div class="title1" style="top:24%;left:52.5%">烘房产量</div> <!-- <div class="title1" style="top:24%;left:52.5%">烘房产量</div>-->
<div class="title1" style="top:45%;left:34%">烘房耗电量</div> <!-- <div class="title1" style="top:45%;left:34%">烘房耗电量</div>-->
<div class="title1" style="top:45%;left:52.5%">AGV开动数量</div> <!-- <div class="title1" style="top:45%;left:52.5%">AGV开动数量</div>-->
<div class="unit1" style="top: 31.3%;left: 45.5%;"></div> <!-- <div class="unit1" style="top: 31.3%;left: 45.5%;"></div>-->
<div class="unit1" style="top: 31.3%;left: 63.5%"></div> <!-- <div class="unit1" style="top: 31.3%;left: 63.5%"></div>-->
<div class="unit1" style="top: 51.3%;left: 45.5%;">KWh</div> <!-- <div class="unit1" style="top: 51.3%;left: 45.5%;">KWh</div>-->
<div class="unit1" style="top: 51.3%;left: 63.5%;"></div> <!-- <div class="unit1" style="top: 51.3%;left: 63.5%;"></div>-->
<div class="num1" style="top: 31.5%;left: 39.5%;">{{ CData.map(e=>parseFloat(e.quantity)||0).reduce((a,b)=>a+b,0) }}</div> <!-- <div class="num1" style="top: 31.5%;left: 39.5%;">{{ CData.map(e=>parseFloat(e.quantity)||0).reduce((a,b)=>a+b,0) }}</div>-->
<div class="num1" style="top:31.5%;left:57.7%">{{ HData.map(e=>parseFloat(e.quantity)||0).reduce((a,b)=>a+b,0) }}</div> <!-- <div class="num1" style="top:31.5%;left:57.7%">{{ HData.map(e=>parseFloat(e.quantity)||0).reduce((a,b)=>a+b,0) }}</div>-->
<div class="num1" style="top:51.6%;left:39.5%">{{ expend }}</div> <!-- <div class="num1" style="top:51.6%;left:39.5%">{{ expend }}</div>-->
<div class="num1" style="top:51.6%;left:57.7%">{{ agvData.length }}</div> <!-- <div class="num1" style="top:51.6%;left:57.7%">{{ agvData.length }}</div>-->
<div class="title2" style="top: 73.5%;left: 86.8%;">计划生产数量</div> <div class="title2" style="top: 73.5%;left: 86.8%;">计划生产数量</div>
<div class="title2" style="top: 85.3%;left: 86.8%;">实际生产数量</div> <div class="title2" style="top: 85.3%;left: 86.8%;">实际生产数量</div>
<div class="unit2" style="top: 76.5%;left: 95%;"></div> <div class="unit2" style="top: 76.5%;left: 95%;"></div>
@ -84,6 +84,7 @@
</div> </div>
<Chart ref="chart1" class="chart1"></Chart> <Chart ref="chart1" class="chart1"></Chart>
<Chart ref="chart2" class="chart2"></Chart> <Chart ref="chart2" class="chart2"></Chart>
<Chart ref="chart3" class="chart3"></Chart>
</div> </div>
</template> </template>
<script> <script>
@ -139,6 +140,104 @@ export default {
}) })
EnergyExpend().then(e => { EnergyExpend().then(e => {
this.expend = e.map(v => v.expend).reduce((a, b) => a + b, 0).toFixed(2) this.expend = e.map(v => v.expend).reduce((a, b) => a + b, 0).toFixed(2)
let option2 = {
grid: {
top: '15%',
bottom: '10%',
// left: '5%',
right: '3%'
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
label: {
show: true
}
}
},
legend: {
right: 0,
textStyle: {
color: '#eee'
}
},
xAxis: {
data: e.map(v => v.monitorName.split(' - ')?.[1]?.split('(')?.[0]),
axisLine: {
show: true, //X线
lineStyle: {
color: '#fff'
}
},
axisTick: {
show: true //X
},
axisLabel: {
interval:0,
show: true,
textStyle: {
color: '#fff' //X
}
}
},
yAxis: [
{
type: 'value',
name: '单位KWh',
nameTextStyle: {
color: '#fff'
},
splitLine: {
show: false
},
axisTick: {
show: true
},
axisLine: {
show: true,
lineStyle: {
color: '#fff'
}
},
axisLabel: {
show: true,
textStyle: {
color: '#fff'
}
}
}
],
series: [
{
label: {
show: true,
position: 'top',
formatter: "{c}",
color: "#fff"
},
name: '耗电量',
type: 'bar',
smooth: true, //线
showAllSymbol: true, //
symbol: "emptyCircle", //
symbolSize: 5, //
// itemStyle: {
// //线
// color: "#058cff",
// },
// lineStyle: {
// color: "#058cff",
// },
// areaStyle: {
// color: "rgba(5,140,255, 0.2)",
// },
data: e.map(v => parseFloat(v.expend)),
},
]
};
this.$refs.chart3.setData(option2)
}) })
agvdata().then(e => { agvdata().then(e => {
console.log(e) console.log(e)
@ -259,8 +358,7 @@ export default {
this.$refs.chart1.setData(option) this.$refs.chart1.setData(option)
}) })
EnergyExpend().then(e => { getHourProductionLists().then(e => {
console.log(e)
let option1 = { let option1 = {
grid: { grid: {
top: '15%', top: '15%',
@ -284,7 +382,7 @@ export default {
} }
}, },
xAxis: { xAxis: {
data: e.map(v => v.monitorName.split(' - ')?.[1]?.split('(')?.[0]), data: e.map(v => v.pdate),
axisLine: { axisLine: {
show: true, //X线 show: true, //X线
lineStyle: { lineStyle: {
@ -295,7 +393,6 @@ export default {
show: true //X show: true //X
}, },
axisLabel: { axisLabel: {
interval:0,
show: true, show: true,
textStyle: { textStyle: {
color: '#fff' //X color: '#fff' //X
@ -337,8 +434,8 @@ export default {
formatter: "{c}", formatter: "{c}",
color: "#fff" color: "#fff"
}, },
name: '耗电量', name: '量',
type: 'bar', type: 'line',
smooth: true, //线 smooth: true, //线
showAllSymbol: true, // showAllSymbol: true, //
symbol: "emptyCircle", // symbol: "emptyCircle", //
@ -353,110 +450,12 @@ export default {
// areaStyle: { // areaStyle: {
// color: "rgba(5,140,255, 0.2)", // color: "rgba(5,140,255, 0.2)",
// }, // },
data: e.map(v => parseFloat(v.expend)), data: e.map(v => parseFloat(v.quantity)),
}, },
] ]
}; };
this.$refs.chart2.setData(option1) this.$refs.chart2.setData(option1)
}) })
getHourProductionLists().then(e => {
// let option1 = {
// grid: {
// top: '15%',
// bottom: '10%',
// // left: '5%',
// right: '3%'
// },
// tooltip: {
// trigger: 'axis',
// axisPointer: {
// type: 'shadow',
// label: {
// show: true
// }
// }
// },
// legend: {
// right: 0,
// textStyle: {
// color: '#eee'
// }
// },
// xAxis: {
// data: e.map(v => v.pdate),
// axisLine: {
// show: true, //X线
// lineStyle: {
// color: '#fff'
// }
// },
// axisTick: {
// show: true //X
// },
// axisLabel: {
// show: true,
// textStyle: {
// color: '#fff' //X
// }
// }
// },
// yAxis: [
// {
// type: 'value',
// name: '',
// nameTextStyle: {
// color: '#fff'
// },
// splitLine: {
// show: false
// },
// axisTick: {
// show: true
// },
// axisLine: {
// show: true,
// lineStyle: {
// color: '#fff'
// }
// },
// axisLabel: {
// show: true,
// textStyle: {
// color: '#fff'
// }
// }
// }
// ],
// series: [
// {
// label: {
// show: true,
// position: 'top',
// formatter: "{c}",
// color: "#fff"
// },
// name: '',
// type: 'line',
// smooth: true, //线
// showAllSymbol: true, //
// symbol: "emptyCircle", //
// symbolSize: 5, //
// // itemStyle: {
// // //线
// // color: "#058cff",
// // },
// // lineStyle: {
// // color: "#058cff",
// // },
// // areaStyle: {
// // color: "rgba(5,140,255, 0.2)",
// // },
// data: e.map(v => parseFloat(v.quantity)),
// },
// ]
// };
// this.$refs.chart2.setData(option1)
})
}, },
}, },
} }
@ -592,9 +591,16 @@ export default {
top: 67.6%; top: 67.6%;
left: 31.3%; left: 31.3%;
}
.chart3 {
position: absolute;
width: 37.4%;
height: 42.5%;
top: 17.6%;
left: 31.3%;
} }
.case-item { .case-item {
border: 2px solid #0c61ad; border: 2px solid #0c61ad;
border-radius: 2px; border-radius: 2px;
margin: 8px 0 0 0; margin: 8px 0 0 0;

Loading…
Cancel
Save