|
@@ -5,14 +5,57 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import * as echarts from 'echarts';
|
|
|
+ import * as API_water from '@/apis/pagejs/water.js'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ formData:{
|
|
|
+ meterId:"",
|
|
|
+ queryStartDate:"",
|
|
|
+ queryEndDate:"",
|
|
|
+ timeNode:"",
|
|
|
+ },
|
|
|
+ info:{},
|
|
|
+ myChart:null,
|
|
|
|
|
|
}
|
|
|
},
|
|
|
- methods: {
|
|
|
+ onLoad(op) {
|
|
|
+ this.formData.meterId=op.meterId
|
|
|
+ this.formData.queryStartDate=op.queryStartDate
|
|
|
+ this.formData.queryEndDate=op.queryEndDate
|
|
|
+ this.formData.timeNode=op.timeNode
|
|
|
|
|
|
+ this.getInfo()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getBarChartsWater(){},
|
|
|
+ getInfo(){
|
|
|
+ uni.showLoading({
|
|
|
+ title: "加载中",
|
|
|
+ mask: true,
|
|
|
+ })
|
|
|
+
|
|
|
+ API_water.meterHourConsumptionDetails(this.formData).then((response) => {
|
|
|
+ uni.hideLoading();
|
|
|
+ this.info=response.data
|
|
|
+
|
|
|
+ if(this.myChart){
|
|
|
+ this.myChart.clear();
|
|
|
+ }
|
|
|
+
|
|
|
+ this.$nextTick(()=>{
|
|
|
+
|
|
|
+ this.getBarChartsWater()
|
|
|
+ })
|
|
|
+ }).catch(error => {
|
|
|
+ uni.showToast({
|
|
|
+ title: error,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|