<!-- echarts -->
<view class="container">
  <view class="navigation-container" style="{{'height: ' + navStatusBarHeight +'px'}}">
  <!--空白来占位状态栏-->
  <view style="{{'height: ' + statusBarHeight +'px'}}"></view>
  <!--自定义导航栏 -->
  <view class="navigation-bar" style="{{'height:' + navBarHeight +'px'}}">
    <picker bindchange="bindPickerChange" range="{{objectArray}}" range-key="stationName" value="{{stationindex}}">
    <view class="title_1" bindtap="rotateImage">{{stationName}}<image class="title_image" src="https://esos-iot.bjdexn.cn/wx_images/switch.png" mode="" animation="{{animationData}}"/></view>
    </picker>
  </view>
</view>
<view style="{{'height: ' + navStatusBarHeight +'px'}}"></view>
<view class="title_2">电站额定容量：{{ectricdata.electric}}kwh</view>

	<view class="canvasArea">
		<ec-canvas type="2d" id="dispace_charts" canvas-id="dispace_charts" ec="{{ ec_dispace_charts }}"></ec-canvas>
    <view class="data_box" style="background-image: url({{img_path}});background-size: 100% 100%; background-repeat: no-repeat;">
     <view class="titledata">
      <view>功率</view>
     </view>
      
     <view class="realtime1">
      <view class="realtime_left1">
        <view><text class="realtime_text">{{ectricdata.rate}}</text><text class="realtime_unit">kW</text></view>  
     <view class="realtime_title">当前功率</view>  
      </view>
      <view class="realtime_right1">
        <view><text class="realtime_text">{{ectricdata.fulld}}</text><text class="realtime_unit">h</text></view>  
     <view class="realtime_title">预计充满</view>  
      </view>
     </view>
    </view>
	</view>
  <view class="canvasArea1">
     <view class="realtime2">
      <view class="realtime_left2">
     <view class="realtime_title">昨日收益</view>  
        <view><text class="realtime_text">{{converter.formatAmount(ectricdata.totalProfit)}}</text><text class="realtime_unit">{{converter.formatAmounts(ectricdata.totalProfit)}}</text></view>  
      </view>
      <view class="realtime_right2">
     <view class="realtime_title">累计收益</view>  
        <view><text class="realtime_text">{{converter.formatAmount(ectricdata.yesterdayProfit)}}</text><text class="realtime_unit">{{converter.formatAmounts(ectricdata.yesterdayProfit)}}</text></view>  
      </view>
    </view>
	</view>
    <view class="equipment">
    <view>设备信息 <text class="equipmenttext"> (今日：{{currentDate}})</text></view>
    <view class="details">
    <!-- <t-icon name="chevron-right-s" size="24" color="#999999" data-name="chevron-right-s" bind:tap="ondetails"/> -->
    </view>

    </view>
    <view class="electric">
    <view class="electric1" bind:tap="onIconTap">
    <view class="electric_rong">
    <view class="electric_">电量</view>
    <t-icon name="chevron-right-s" size="48rpx" data-name="chevron-right-s"/>
    </view>
    <view class="pic_pic">
    <ec-canvas id="mychart_line" canvas-id="mychart_line" ec="{{ ec }}"></ec-canvas>
    
    </view>
    </view>
    <view class="electric2">
    <view class="electric21" bind:tap="onIconTap">
      <view class="electric_rong">
    <view class="electric4">充电时长</view>
    <t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"  />
    </view>
    <view>{{between.list[0].chargetime}} <text class="electric3">h</text></view>
    <view class="battery">当前已放电 {{between.list[0].dischargetime}}h</view>
    </view>
    <view class="electric22" bind:tap="onhealthy">
      <view class="electric_rong">
    <view class="electric4">设备监测</view>
    <t-icon name="chevron-right-s" size="20px" data-name="chevron-right-s"/>
    </view>
    <view class="tag_type2" wx:if="{{fitnessdata.alarmStatus==0}}">离线</view>
    <view class="tag_type1" wx:if="{{fitnessdata.alarmStatus==1}}">正常</view>
    <view class="tag_type3" wx:if="{{fitnessdata.alarmStatus==2}}">故障</view>
    <view class="battery">当前电池温度 {{fitnessdata.temperature}}℃</view>
    </view>
    </view>
    </view>
</view>
<wxs module="converter">
   var formatAmount = function(amount) {
    if (amount==undefined) {
        return '1000';
      }
      if (amount < 10000) {
        return amount.toFixed(2);
      } else {
        return (amount / 10000).toFixed(2);
      }
    }
    var formatAmounts = function(amount) {
    if (amount==undefined) {
        return '元';
      }
      if (amount < 10000) {
        return'元';
      } else {
        return'万元';
      }
    }
    module.exports = {
      formatAmount: formatAmount,
      formatAmounts: formatAmounts
    }
</wxs>
<!--  -->