zkx 2 年 前
コミット
eec9279afd
1 ファイル変更15 行追加20 行削除
  1. 15 20
      pagesFinance/statistics/index.vue

+ 15 - 20
pagesFinance/statistics/index.vue

@@ -165,7 +165,7 @@
 				<p style="text-align: center; margin-bottom: 5px;">{{startTime}}至{{endTime}} </p>
 					<u-collapse  :headStyle="{
 								color:'#101010',
-								 fontWeight: bold,
+								 fontWeight: 'bold',
 								 padding:'12px 0',
 								 borderBottom: '1px solid #ededed'
 								 
@@ -206,13 +206,13 @@
 							 		<view class="details-row details-row-1">
 							 			
 							 			
-							 			<view class="span1">快充枪平均用电量</view>
-							 			<view class="span2">{{(item.averageFast/10000).toFixed(3)}}度</view>
+							 			<view class="span1">快充枪天均电量</view>
+							 			<view class="span2">{{(item.eqFast/nowTime/10000).toFixed(3)}}度</view>
 							 		</view>
 							 		<view class="details-row">
 							 			
-							 			<view class="span1">慢充枪平均用电量</view>
-							 			<view class="span2">{{(item.averageSlow/10000).toFixed(3)}}度</view>
+							 			<view class="span1">慢充枪天均电量</view>
+							 			<view class="span2">{{(item.eqSlow/nowTime/10000).toFixed(3)}}度</view>
 							 		</view>
 							 	</view>
 							 
@@ -305,6 +305,7 @@
 	//require("@/apis/echarts-5-3.min.js")
 	//import * as echarts from "@/apis/echarts-5-3.min.js";
 	import {
+		daysDistance,
 		beforeTimeStamp,
 		currentTimeStamp,
 		parseUnixTime
@@ -320,7 +321,7 @@
 				selectdeviceNo: "",
 				popupShow2: false,
 				popupShow: false,
-
+				nowTime:0,
 				selectstationId2: "",
 				info: {},
 				title: "",
@@ -401,6 +402,9 @@
 
 		},
 		onReady() {
+			var date=new Date();
+			this.nowTime=7
+		
 			this.startTime = parseUnixTime(beforeTimeStamp(6), '{y}-{m}-{d}')
 			this.endTime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
 			this.startTime2 = parseUnixTime(beforeTimeStamp(6), '{y}-{m}-{d}')
@@ -426,6 +430,7 @@
 				})
 			},
 			resetBtn() {
+				this.nowTime=7
 				this.startTime = parseUnixTime(beforeTimeStamp(6), '{y}-{m}-{d}')
 				this.endTime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
 
@@ -509,20 +514,10 @@
 
 				API.homeFlowStatistics(this.form).then((res) => {
 					this.stationFlowList = res.data.stationFlowList;
-					
-					// for(var  i in this.stationFlowList ){
-					// 	var item=this.stationFlowList[i]
-					// 	item.open=
-						
-					// 	for (let j = 0; j < device.gunList.length; j++) {
-							
-					// 		this.openlist.push(false)	
-							
-							
-					// 	}
-						
-					// }
-
+					this.nowTime=daysDistance(this.startTime, this.endTime)+1;
+					
+					console.log(this.nowTime)
+					
 				}).catch(error => {
 					uni.showToast({