Browse Source

增加充电站详情显示soc以及修复刷新按钮事件

jiuling 2 months ago
parent
commit
fddcb9cffa
3 changed files with 18 additions and 10 deletions
  1. 8 2
      pages/charginfo/charginfo.js
  2. 8 6
      pages/charginfo/charginfo.wxml
  3. 2 2
      pages/ucenter/index/index.wxml

+ 8 - 2
pages/charginfo/charginfo.js

@@ -393,9 +393,15 @@ Page({
     })
     })
     let that = this;
     let that = this;
     that.setData({
     that.setData({
-      pagenum:1
+      pagenum:1,
     });
     });
-    this.getPage()
+  // 清空数据 重新进行刷新
+    this.data.ele_chargList = []
+    this.data.ele_total = -1
+    this.data.chargList=[]
+    this.data.total = -1
+    this.ori_getPage();
+    this.ele_getPage();
     that.fastAndSlow()
     that.fastAndSlow()
     that.setData({
     that.setData({
       scrollTop: 0
       scrollTop: 0

+ 8 - 6
pages/charginfo/charginfo.wxml

@@ -114,7 +114,8 @@
       <view class="chargInfo_v_name">{{item.chargPileName}}</view>
       <view class="chargInfo_v_name">{{item.chargPileName}}</view>
       <view class="chargInfo_v_id"><text style="width:300rpx">{{item.chargPileId}}</text><text wx:if="{{!item.openStatus}}" decode="{{true}}" space="nbsp">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</text><text wx:if="{{!userInfo.flag && item.openStatus}}" class="seeReservation" bindtap="seeReservation" bindtap="seeReservation"  data-idx="{{item}}">查看预约</text><text class="startpower" wx:if="{{!userInfo.flag && item.chargstatusname=='已插枪'}}"  data-keywords="{{item}}"  bindtap="{{(!userInfo.flag && item.chargstatusname=='已插枪')?'goScanResult':''}}">启动充电 ></text></view>
       <view class="chargInfo_v_id"><text style="width:300rpx">{{item.chargPileId}}</text><text wx:if="{{!item.openStatus}}" decode="{{true}}" space="nbsp">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</text><text wx:if="{{!userInfo.flag && item.openStatus}}" class="seeReservation" bindtap="seeReservation" bindtap="seeReservation"  data-idx="{{item}}">查看预约</text><text class="startpower" wx:if="{{!userInfo.flag && item.chargstatusname=='已插枪'}}"  data-keywords="{{item}}"  bindtap="{{(!userInfo.flag && item.chargstatusname=='已插枪')?'goScanResult':''}}">启动充电 ></text></view>
       </view>
       </view>
-      <view class="iconCard" >
+      <view class="iconCard" wx:if="{{item.hasBattery == 2}}" >
+      <text style="color: #35b2ab; font-size: small;">{{item.currentSoc != null? '电量:'+ item.currentSoc+'%' : ''}}</text>
         <view class="icon {{item.pileType=='慢充'?'slowBar':'fastBar'}}">{{item.pileType=='慢充'?'慢':'快'}}</view>
         <view class="icon {{item.pileType=='慢充'?'slowBar':'fastBar'}}">{{item.pileType=='慢充'?'慢':'快'}}</view>
       </view>
       </view>
     </view>
     </view>
@@ -124,8 +125,8 @@
     <!--
     <!--
     <view wx:if="{{activeTab=='1'}}" class="charg"  hover-class='active' wx:key='{{key}}' wx:for="{{ele_chargList}}" data-idx="{{item}}" bindtap="{{userInfo.flag ?'chargingLog':''}}">
     <view wx:if="{{activeTab=='1'}}" class="charg"  hover-class='active' wx:key='{{key}}' wx:for="{{ele_chargList}}" data-idx="{{item}}" bindtap="{{userInfo.flag ?'chargingLog':''}}">
     -->
     -->
-    <!-- <view wx:if="{{activeTab=='1'}}" class="charg"  hover-class='active' wx:key='{{key}}' wx:for="{{ele_chargList}}" data-idx="{{item}}" bindtap="goEleCarMap"> 取消机器人详情点击事件 -->
-      <view wx:if="{{activeTab=='1'}}" class="charg"  hover-class='active' wx:key='{{key}}' wx:for="{{ele_chargList}}" data-idx="{{item}}">
+    <view wx:if="{{activeTab=='1'}}" class="charg"  hover-class='active' wx:key='{{key}}' wx:for="{{ele_chargList}}" data-idx="{{item}}" bindtap="goEleCarMap"> 
+    <!-- <view wx:if="{{activeTab=='1'}}" class="charg"  hover-class='active' wx:key='{{key}}' wx:for="{{ele_chargList}}" data-idx="{{item}}"> 取消机器人详情点击事件 -->
       <view class="runstatus {{item.chargstatusclass}}">
       <view class="runstatus {{item.chargstatusclass}}">
       <view class="runstatus_inner ">{{item.chargstatusname}}</view>
       <view class="runstatus_inner ">{{item.chargstatusname}}</view>
       </view>
       </view>
@@ -133,9 +134,10 @@
       <view class="chargInfo_v_name">{{item.chargPileName}}</view>
       <view class="chargInfo_v_name">{{item.chargPileName}}</view>
       <view class="chargInfo_v_id"><text style="width:300rpx">{{item.chargPileId}}</text><text wx:if="{{!item.openStatus}}" decode="{{true}}" space="nbsp">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</text><text class="startpower" wx:if="{{!userInfo.flag && item.chargstatusname=='已插枪'}}"  data-keywords="{{item}}"  bindtap="{{(!userInfo.flag && item.chargstatusname=='已插枪')?'goEleCarMap':''}}">呼叫充电车 ></text></view>
       <view class="chargInfo_v_id"><text style="width:300rpx">{{item.chargPileId}}</text><text wx:if="{{!item.openStatus}}" decode="{{true}}" space="nbsp">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</text><text class="startpower" wx:if="{{!userInfo.flag && item.chargstatusname=='已插枪'}}"  data-keywords="{{item}}"  bindtap="{{(!userInfo.flag && item.chargstatusname=='已插枪')?'goEleCarMap':''}}">呼叫充电车 ></text></view>
       </view>
       </view>
-      <!-- <view class="iconCard" >
-        <view class="icon {{item.pileType=='慢充'?'slowBar':'fastBar'}}">{{item.pileType=='慢充'?'慢':'快'}}</view>
-      </view> -->
+      <view class="iconCard" >
+        <text style="color: #35b2ab; font-size: small;">{{item.currentSoc != null? '电量:'+ item.currentSoc+'%' : ''}}</text>
+        <!-- <view class="icon {{item.pileType=='慢充'?'slowBar':'fastBar'}}">{{item.pileType=='慢充'?'慢':'快'}}</view> -->
+      </view>
     </view>
     </view>
     <!-- 机器人充电车 end  -->
     <!-- 机器人充电车 end  -->
 
 

+ 2 - 2
pages/ucenter/index/index.wxml

@@ -169,7 +169,7 @@
         </view>
         </view>
       </view>
       </view>
 
 
-      <!-- <view class="zan-cell"  wx:if='{{userInfo.flag==null?1:!userInfo.flag}}' hover-class="active" bindtap="goBatteryControl">
+      <view class="zan-cell"  wx:if='{{userInfo.flag==null?1:!userInfo.flag}}' hover-class="active" bindtap="goBatteryControl">
         <view class="zan-icon">
         <view class="zan-icon">
           <image src='/images/column.png'></image>
           <image src='/images/column.png'></image>
         </view>
         </view>
@@ -190,7 +190,7 @@
         <view class="zan-ft">
         <view class="zan-ft">
           <image src='/images/enter.png'></image>
           <image src='/images/enter.png'></image>
         </view>
         </view>
-      </view> -->
+      </view>
 
 
 
 
       <view class="zan-cell" hover-class="active" bindtap="goAgreement">
       <view class="zan-cell" hover-class="active" bindtap="goAgreement">