修改显示

yangwl
夜笙歌 2 months ago
parent 7d9b2e83f8
commit e9d41194f0

@ -138,6 +138,104 @@ export default {
getData() { getData() {
dryRoomDataCarousel().then(e => { dryRoomDataCarousel().then(e => {
this.table1Data = e.data.dryingroomList.filter(v => parseFloat(v.expend / v.yield)) || [] this.table1Data = e.data.dryingroomList.filter(v => parseFloat(v.expend / v.yield)) || []
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: data.map(v => v.equipment_code),
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: data.map(v => parseFloat((parseFloat(v.expend) / parseFloat(v.yield) / 14).toFixed(2))),
},
]
};
this.$refs.chart3.setData(option2)
}) })
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)
@ -245,7 +343,7 @@ export default {
}, },
] ]
}; };
this.$refs.chart3.setData(option2) // this.$refs.chart3.setData(option2)
}) })
agvdata().then(e => { agvdata().then(e => {
this.agvData = e.Data.filter(v => v.State === 2) this.agvData = e.Data.filter(v => v.State === 2)

Loading…
Cancel
Save