<template>
|
<div>
|
<div class="charge-use-title">
|
<div style="margin-left:30px;padding-top:8px">
|
<img src="~@/assets/img/home/charge_icon.png" style="margin-top:0px" height="13px" width="15px">
|
<span style="color:white">充电桩使用数据</span>
|
</div>
|
</div>
|
<div class="charge-use-body">
|
<el-row style="padding:20px;padding-bottom:10px" :gutter="5">
|
<el-col style="text-align:center;font-size:16px;color:white" :span="6">
|
<span>设备数</span>
|
</el-col>
|
<el-col style="text-align:center;font-size:16px;color:white" :span="6">
|
<span>充电时间</span>
|
</el-col>
|
<el-col style="text-align:center;font-size:16px;color:white" :span="6">
|
<span>总金额</span>
|
</el-col>
|
<el-col style="text-align:center;font-size:16px;color:white" :span="6">
|
<span>总收益</span>
|
</el-col>
|
</el-row>
|
<el-row style="padding-left:20px;padding-right:20px;margin-top:0px" :gutter="5">
|
<el-col :span="6">
|
<div class="use-energy">
|
<span style="color:white">{{deviceNum}}</span>
|
<span style="color:white">台</span>
|
</div>
|
</el-col>
|
<el-col :span="6">
|
<div class="charge-time">
|
<span style="color:white">5600h</span>
|
</div>
|
</el-col>
|
<el-col :span="6">
|
<div class="total-money">
|
<span style="color:white">2655元</span>
|
</div>
|
</el-col>
|
<el-col :span="6">
|
<div class="total-income">
|
<span style="color:white">1322元</span>
|
</div>
|
</el-col>
|
</el-row>
|
</div>
|
<div class="charge-use-bottom">
|
<span style="color:#9A9D9F">数据截止至2020-01-08 00:00</span>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
export default {
|
data () {
|
return {
|
streetlightIdList: [],
|
deviceNum: 0
|
}
|
},
|
computed: {
|
streetlightList () {
|
return this.$store.state.home.homeStreetlightList
|
}
|
},
|
watch: {
|
streetlightList (curVal, oldVal) {
|
var streetlightList = curVal
|
let _this = this
|
streetlightList.forEach(function (item, index) {
|
_this.streetlightIdList.unshift(item.streetlightId)
|
})
|
this.getChargeInfo()
|
}
|
},
|
components: {},
|
activated () {},
|
|
methods: {
|
getChargeInfo () {
|
var list = this.streetlightIdList
|
this.$http({
|
url: this.$http.adornUrl('/pole/polec2charging/getAllChargeInfo'),
|
method: 'post',
|
data: this.$http.adornData({
|
streetlightIdList: list
|
})
|
}).then(({ data }) => {
|
this.deviceNum = data.list.length
|
})
|
}
|
}
|
}
|
</script>
|
<style>
|
.charge-use-title {
|
height: 30px;
|
width: 100%;
|
background-image: url(~@/assets/img/content_charts_title.png);
|
background-size: 100% 30px;
|
}
|
.charge-use-body {
|
height: 150px;
|
width: 100%;
|
background-image: url(~@/assets/img/content_charts_body.png);
|
background-size: 100% 120px;
|
}
|
.charge-use-bottom {
|
text-align: center;
|
height: 30px;
|
width: 100%;
|
background-image: url(~@/assets/img/content_charts_bottom.png);
|
background-size: 100% 30px;
|
}
|
.use-energy {
|
background-image: url(~@/assets/img/home/percent/blue_percent_30.png);
|
background-size: 65px 65px;
|
/* margin-left: 15%; */
|
width: 65px;
|
height: 65px;
|
padding: 15px;
|
}
|
.charge-time {
|
background-image: url(~@/assets/img/home/percent/blue_percent_20.png);
|
background-size: 65px 65px;
|
/* margin-left: 15%; */
|
width: 65px;
|
height: 65px;
|
padding-left: 10px;
|
padding-top: 20px;
|
}
|
.total-money {
|
background-image: url(~@/assets/img/home/percent/red_percent_30.png);
|
background-size: 65px 65px;
|
/* margin-left: 15%; */
|
width: 65px;
|
height: 65px;
|
padding-left: 10px;
|
padding-top: 20px;
|
}
|
.total-income {
|
background-image: url(~@/assets/img/home/percent/blue_percent_10.png);
|
background-size: 65px 65px;
|
/* margin-left: 15%; */
|
width: 65px;
|
height: 65px;
|
padding-left: 10px;
|
padding-top: 20px;
|
}
|
</style>
|