<!-- 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" value="{{index}}" range="{{objectArray}}" range-key="powerstationName">
    <view class="picker">
     {{objectArray[index].powerstationName}}

     <!-- chevron-down -->
     <t-icon class="chevron_down" name="chevron-down" size="40rpx" data-name="chevron-down"/>
    </view>
  </picker>
  </view>
</view>
<!---->
<view class="home"  style="{{index==0?'display: block':'display: none'}}">
<view style="{{'height: ' + navStatusBarHeight +'px'}}"></view>
<!-- <text class="equipmenttext">{{powerdata.day||'--'}}</text> -->
<view style="height: 10rpx;"></view>
<view class="data_box">
  <view class="titledata">
      <view>全部电站</view>
      <view class="choice">
        <!-- 补充 bindtap="handleUnitChange" -->
        <view class="choiceday {{currentUnit=='day'?'choicecolor':''}}" data-name="choiceday" bindtap="handleUnitChange">日</view>
    <view class="choicemoon {{currentUnit=='month'?'choicecolor':''}}" data-name="choicemoon" bindtap="handleUnitChange">月</view>
    <view class="choiceyear {{currentUnit=='year'?'choicecolor':''}}" data-name="choiceyear" bindtap="handleUnitChange">年</view>
      </view>
     </view>
  <view class="calendar_head">
  <!-- 上一个月按钮 -->
  <t-icon 
    class="chevron" 
    name="chevron-left-double" 
    size="40rpx" 
    data-action="prev-month"
    bindtap="handleDateNav"
    style="{{isUpperMin ? 'color: #ccc; pointer-events: none;' : ''}}"
  />
  
  <!-- 上一天按钮 -->
  <t-icon 
    class="chevron" 
    name="chevron-left" 
    size="40rpx" 
    data-action="prev-day"
    bindtap="handleDateNav"
    style="{{isMin ? 'color: #ccc; pointer-events: none;' : ''}}"
  />
  
  <view bind:tap="onCalendarClick">{{currentDate}}</view>
  
  <!-- 下一天按钮 -->
  <t-icon 
    class="chevron" 
    name="chevron-right" 
    size="40rpx" 
    data-action="next-day"
    bindtap="handleDateNav"
    style="{{isMax ? 'color: #ccc; pointer-events: none;' : ''}}"
  />
  
  <!-- 下一个月按钮 -->
  <t-icon 
    class="chevron" 
    name="chevron-right-double" 
    size="40rpx" 
    data-action="next-month"
    bindtap="handleDateNav"
    style="{{isUpperMax ? 'color: #ccc; pointer-events: none;' : ''}}"
  />
</view>

  <view bind:tap="onInformation">
    <view wx:if="{{currentUnit=='day'}}">
    <view class="realtime1">
      <view class="realtime_left11">
        <view class="realtime_title">日电量</view>  
        <view><text class="realtime_text">{{powerdata.dailydischarge||'--'}}</text><text class="realtime_unit">万kWh</text></view> 
      </view>
      <view class="realtime_right2">
     <view class="realtime_title">设备</view>  
     <view><text class="realtime_text">{{powerdata.fan||'--'}}</text><text class="realtime_unit"></text></view>  
      </view>
      
     </view>
     <view class="realtime1">
      <view class="realtime_left11">
     <view class="realtime_title">日限电</view>  
        <view><text class="realtime_text">{{powerdata.dailypowerlimit||'--'}}</text><text class="realtime_unit">万kWh</text></view>  
      </view>
      <view class="realtime_right2">
     <view class="realtime_title">日限电率</view>  
        <view><text class="realtime_text">{{powerdata.dailypowerrestrictionrate||'--'}}</text><text class="realtime_unit">%</text></view> 
      </view>
     </view>
     <view class="realtime1">
      <view class="realtime_left11">
     <view class="realtime_title">日损失</view>  
        <view><text class="realtime_text">{{powerdata.dayfaultlosselectricity||'--'}}</text><text class="realtime_unit">万kWh</text></view>  
      </view>
      <view class="realtime_right2">
     <view class="realtime_title">日损失率</view>  
        <view><text class="realtime_text">{{powerdata.dayfaultlossrate||'--'}}</text><text class="realtime_unit">%</text></view> 
      </view>
     </view>
    </view>
    <view wx:if="{{currentUnit=='month'}}">
    <view class="realtime1">
      <view class="realtime_left11">
     <view class="realtime_title">月电量</view>  
        <view><text class="realtime_text">{{powerdata.monthlydischarge||'--'}}</text><text class="realtime_unit">万kWh</text></view>  
      </view>
      <view class="realtime_right2">
     <view class="realtime_title">月完成率</view>  
        <view><text class="realtime_text">{{powerdata.monthlydischargerate||'--'}}</text><text class="realtime_unit">%</text></view> 
      </view>
      
     </view>
     <view class="realtime1">
      <view class="realtime_left11">
     <view class="realtime_title">月限电</view>  
        <view><text class="realtime_text">{{powerdata.monthlypowerlimit||'--'}}</text><text class="realtime_unit">万kWh</text></view>  
      </view>
      <view class="realtime_right2">
     <view class="realtime_title">月限电率</view>  
        <view><text class="realtime_text">{{powerdata.monthlypowerrestrictionrate||'--'}}</text><text class="realtime_unit">%</text></view> 
      </view>
     </view>
     <view class="realtime1">
      <view class="realtime_left11">
     <view class="realtime_title">月损失</view>  
        <view><text class="realtime_text">{{powerdata.monthlycumulativepowerloss||'--'}}</text><text class="realtime_unit">万kWh</text></view>  
      </view>
      <view class="realtime_right2">
     <view class="realtime_title">月损失率</view>  
        <view><text class="realtime_text">{{powerdata.monthlycumulativelossrate||'--'}}</text><text class="realtime_unit">%</text></view> 
      </view>
     </view>
    
    </view>
    <view wx:if="{{currentUnit=='year'}}">
    <view class="realtime1">
      <view class="realtime_left1">
      
     <view class="realtime_title">年累计上网电量</view>  
      </view>
      <view class="realtime_right1">
        <view><text class="realtime_text">{{powerdata.annualcumulativedischarge||'--'}}</text><text class="realtime_unit">万kWh</text></view> 
      </view>
      
     </view>
   
    </view>
   
    </view>
  </view>

  <view class="data_box" style="background-image: url(https://esos-iot.com/wx_images/bj.png);background-size: 100% 100%; background-repeat: no-repeat;margin-top: 30rpx;" bind:tap="onInformation">
  <view class="titledata">
      <view>{{activeBardata.powerstationName}}</view>
      <view>容量 {{activeBardata.gridconnectedcapacity||'--'}}MW</view>
    
     </view>

    
  <view wx:if="{{currentUnit=='day'}}">
    <view class="realtime1">
      <view class="realtime_left11">
     <view class="realtime_title">日电量</view>  
     <view><text class="realtime_text">{{activeBardata.dailydischarge||'--'}}</text><text class="realtime_unit">万kWh</text></view> 
       
      </view>
      <view class="realtime_right2">
     <view class="realtime_title" wx:if="{{activeBardata.powerstationType==1}}">风机</view> 
     <view class="realtime_title" wx:if="{{activeBardata.powerstationType==2}}">矩阵</view> 
     <view><text class="realtime_text">{{activeBardata.fan||'--'}}</text><text class="realtime_unit" wx:if="{{activeBardata.powerstationType==1}}">台</text><text class="realtime_unit" wx:if="{{activeBardata.powerstationType==2}}">组</text></view>  
    
      </view>
      
     </view>
     <view class="realtime1">
      <view class="realtime_left11">
     <view class="realtime_title">日限电</view>  
        <view><text class="realtime_text">{{activeBardata.dailypowerlimit||'--'}}</text><text class="realtime_unit">万kWh</text></view>  
      </view>
      <view class="realtime_right2">
     <view class="realtime_title">日限电率</view>  
        <view><text class="realtime_text">{{activeBardata.dailypowerrestrictionrate||'--'}}</text><text class="realtime_unit">%</text></view> 
      </view>
     </view>
     <view class="realtime1">
      <view class="realtime_left11">
     <view class="realtime_title">日损失</view>  
        <view><text class="realtime_text">{{activeBardata.dayfaultlosselectricity||'--'}}</text><text class="realtime_unit">万kWh</text></view>  
      </view>
      <view class="realtime_right2">
     <view class="realtime_title">日损失率</view>  
        <view><text class="realtime_text">{{activeBardata.dayfaultlossrate||'--'}}</text><text class="realtime_unit">%</text></view> 
      </view>
     </view>
    </view>
    <view wx:if="{{currentUnit=='month'}}">
    <view class="realtime1">
      <view class="realtime_left11">
     <view class="realtime_title">月电量</view>  
        <view><text class="realtime_text">{{activeBardata.monthlydischarge||'--'}}</text><text class="realtime_unit">万kWh</text></view>  
      </view>
      <view class="realtime_right2">
     <view class="realtime_title">月完成率</view>  
        <view><text class="realtime_text">{{activeBardata.monthlydischargerate||'--'}}</text><text class="realtime_unit">%</text></view> 
      </view>
      
     </view>
     <view class="realtime1">
      <view class="realtime_left11">
     <view class="realtime_title">月限电</view>  
        <view><text class="realtime_text">{{activeBardata.monthlypowerlimit||'--'}}</text><text class="realtime_unit">万kWh</text></view>  
      </view>
      <view class="realtime_right2">
     <view class="realtime_title">月限电率</view>  
        <view><text class="realtime_text">{{activeBardata.monthlypowerrestrictionrate||'--'}}</text><text class="realtime_unit">%</text></view> 
      </view>
     </view>
     <view class="realtime1">
      <view class="realtime_left11">
     <view class="realtime_title">月损失</view>  
        <view><text class="realtime_text">{{activeBardata.monthlycumulativepowerloss||'--'}}</text><text class="realtime_unit">万kWh</text></view>  
      </view>
      <view class="realtime_right2">
     <view class="realtime_title">月损失率</view>  
        <view><text class="realtime_text">{{activeBardata.monthlycumulativelossrate||'--'}}</text><text class="realtime_unit">%</text></view> 
      </view>
     </view>
    
    </view>
    <view wx:if="{{currentUnit=='year'}}">
    <view class="realtime1">
      <view class="realtime_left1">
      
     <view class="realtime_title">年累计上网电量</view>  
      </view>
      <view class="realtime_right1">
        <view><text class="realtime_text">{{activeBardata.annualcumulativedischarge||'--'}}</text><text class="realtime_unit">万kWh</text></view> 
      </view>
      
     </view>
   
    </view>
   
  </view>
  
  <view class="eccanvas">
    <view class="choicess_box">
    <view class="choicess">
      <view wx:for="{{powerdata.sysPowerstationdatalist}}" wx:key="index" class="choicedays {{activeBarIndex==index?'choicecolor':''}}" data-index="{{index}}" bindtap="bindchart" style="border-right:{{index==powerdata.sysPowerstationdatalist.length-1?'':1}}rpx solid  #cccccc;">{{item.powerstationName}}</view>
    </view>
     
      </view>
      <view class="available" wx:if="{{powerdata.sysPowerstationdatalist==null}}">
<image src="https://esos-iot.com/myminio/project/9efa1691f71a48b6ae20648c0a2dae56.png" mode="aspectFit"/>
</view>
     
    <ec-canvas style="{{!visible?'display: block':'display: none'}}" id="mychart_line2" canvas-id="mychart_line2" ec="{{ ech }}"></ec-canvas>
   
 </view>
  
   
</view>


<view style="height: 20rpx;"> </view>
<view class="home" style="{{index!=0?'display: block':'display: none'}}">
<view style="{{'height: ' + navStatusBarHeight +'px'}}"></view>
<!-- <text class="equipmenttext">{{powerdata.day||'--'}}</text> -->
<!-- <text class="equipmenttext" wx:if="{{powerdata.dailydischarge>1}}">昨日数据</text> -->
<!-- <text class="equipmenttext" wx:else>昨日数据 - 暂未获取</text> -->
  <!-- <view bind:tap="onCalendarClick">{{currentDate}}</view> -->
<view style="height: 20rpx;"></view>

<view class="statistics" data-index="2" bind:tap="rolelocate">
  <view class="statistics_top">
<view class="statistics_1">
<view class="statistics_digit">{{workorder.allcount||0}}</view>
<view class="statistics_title">全部工单</view>
</view>
<view class="statistics_1">
<view class="statistics_digit">{{workorder.incompletecount||0}}</view>
<view class="statistics_title">全部待办</view>
</view>
<view class="statistics_1">
  <view class="statistics_digit">{{workorder.completecount||0}}</view>
<view class="statistics_title">全部办结</view>
</view>
</view>
 
</view>
<view class="data_box" style="margin-top: 40rpx;" style="background-image: url(https://esos-iot.com/wx_images/bj.png);background-size: 100% 100%; background-repeat: no-repeat;margin-top: 100rpx;">
  <view class="titledata">
    <view>容量 {{powerdata.gridconnectedcapacity||'--'}}MW</view>
      <view class="choice">
        <!-- 补充 bindtap="handleUnitChange" -->
        <view class="choiceday {{currentUnit=='day'?'choicecolor':''}}" data-name="choiceday" bindtap="handleUnitChange">日</view>
    <view class="choicemoon {{currentUnit=='month'?'choicecolor':''}}" data-name="choicemoon" bindtap="handleUnitChange">月</view>
    <view class="choiceyear {{currentUnit=='year'?'choicecolor':''}}" data-name="choiceyear" bindtap="handleUnitChange">年</view>
      </view>
     </view>
  <view class="calendar_head">
  <!-- 上一个月按钮 -->
  <t-icon 
    class="chevron" 
    name="chevron-left-double" 
    size="40rpx" 
    data-action="prev-month"
    bindtap="handleDateNav"
    style="{{isUpperMin ? 'color: #ccc; pointer-events: none;' : ''}}"
  />
  
  <!-- 上一天按钮 -->
  <t-icon 
    class="chevron" 
    name="chevron-left" 
    size="40rpx" 
    data-action="prev-day"
    bindtap="handleDateNav"
    style="{{isMin ? 'color: #ccc; pointer-events: none;' : ''}}"
  />
  
  <view bind:tap="onCalendarClick">{{currentDate}}</view>
  
  <!-- 下一天按钮 -->
  <t-icon 
    class="chevron" 
    name="chevron-right" 
    size="40rpx" 
    data-action="next-day"
    bindtap="handleDateNav"
    style="{{isMax ? 'color: #ccc; pointer-events: none;' : ''}}"
  />
  
  <!-- 下一个月按钮 -->
  <t-icon 
    class="chevron" 
    name="chevron-right-double" 
    size="40rpx" 
    data-action="next-month"
    bindtap="handleDateNav"
    style="{{isUpperMax ? 'color: #ccc; pointer-events: none;' : ''}}"
  />
</view>

  <view bind:tap="onInformation">
    <view wx:if="{{currentUnit=='day'}}">
    <view class="realtime1">
      <view class="realtime_left11">
        <view class="realtime_title">日电量</view>  
        <view><text class="realtime_text">{{powerdata.dailydischarge||'--'}}</text><text class="realtime_unit">万kWh</text></view> 
      </view>
      <view class="realtime_right2">
     <view class="realtime_title" wx:if="{{powerdata.powerstationType==1}}">风机</view> 
     <view class="realtime_title" wx:if="{{powerdata.powerstationType==2}}">矩阵</view> 
     <view><text class="realtime_text">{{powerdata.fan||'--'}}</text><text class="realtime_unit" wx:if="{{powerdata.powerstationType==1}}">台</text><text class="realtime_unit" wx:if="{{powerdata.powerstationType==2}}">组</text></view>  
    
      </view>
      
     </view>
   
     <view class="realtime1">
      <view class="realtime_left11">
     <view class="realtime_title">日限电</view>  
        <view><text class="realtime_text">{{powerdata.dailypowerlimit||'--'}}</text><text class="realtime_unit">万kWh</text></view>  
      </view>
      <view class="realtime_right2">
     <view class="realtime_title">日限电率</view>  
        <view><text class="realtime_text">{{powerdata.dailypowerrestrictionrate||'--'}}</text><text class="realtime_unit">%</text></view> 
      </view>
     </view>
     <view class="realtime1">
      <view class="realtime_left11">
     <view class="realtime_title">日损失</view>  
        <view><text class="realtime_text">{{powerdata.dayfaultlosselectricity||'--'}}</text><text class="realtime_unit">万kWh</text></view>  
      </view>
      <view class="realtime_right2">
     <view class="realtime_title">日损失率</view>  
        <view><text class="realtime_text">{{powerdata.dayfaultlossrate||'--'}}</text><text class="realtime_unit">%</text></view> 
      </view>
     </view>
    </view>
    <view wx:if="{{currentUnit=='month'}}">
    <view class="realtime1">
      <view class="realtime_left11">
     <view class="realtime_title">月电量</view>  
        <view><text class="realtime_text">{{powerdata.monthlydischarge||'--'}}</text><text class="realtime_unit">万kWh</text></view>  
      </view>
      <view class="realtime_right2">
     <view class="realtime_title">月完成率</view>  
        <view><text class="realtime_text">{{powerdata.monthlydischargerate||'--'}}</text><text class="realtime_unit">%</text></view> 
      </view>
      
     </view>
     <view class="realtime1">
      <view class="realtime_left11">
     <view class="realtime_title">月限电</view>  
        <view><text class="realtime_text">{{powerdata.monthlypowerlimit||'--'}}</text><text class="realtime_unit">万kWh</text></view>  
      </view>
      <view class="realtime_right2">
     <view class="realtime_title">月限电率</view>  
        <view><text class="realtime_text">{{powerdata.monthlypowerrestrictionrate||'--'}}</text><text class="realtime_unit">%</text></view> 
      </view>
     </view>
     <view class="realtime1">
      <view class="realtime_left11">
     <view class="realtime_title">月损失</view>  
        <view><text class="realtime_text">{{powerdata.monthlycumulativepowerloss||'--'}}</text><text class="realtime_unit">万kWh</text></view>  
      </view>
      <view class="realtime_right2">
     <view class="realtime_title">月损失率</view>  
        <view><text class="realtime_text">{{powerdata.monthlycumulativelossrate||'--'}}</text><text class="realtime_unit">%</text></view> 
      </view>
     </view>
    
    </view>
    <view wx:if="{{currentUnit=='year'}}">
    <view class="realtime1">
      <view class="realtime_left1">
      
     <view class="realtime_title">年累计上网电量</view>  
      </view>
      <view class="realtime_right1">
        <view><text class="realtime_text">{{powerdata.annualcumulativedischarge||'--'}}</text><text class="realtime_unit">万kWh</text></view> 
      </view>
      
     </view>
   
    </view>
   
    </view>
  </view>

  
    <view class="equipment">
    <view>电站预览 </view>
    <view class="details">
    </view>

    </view>
    <view class="electric">
    <view class="electric1" bind:tap="onIconTap">
    <view class="electric_rong" bind:tap="onInformation">
    <view class="electric4">故障</view>
    <t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
    </view>
    <view class="pic_pic">
    <ec-canvas style="{{!visible?'display: block':'display: none'}}" 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" bind:tap="onInformation">
    <view class="electric4">天气</view>
    </view>
 
    <view class="tag_type2" wx:if="{{powerdata.weather=='空'}}"><image class="weather" src="https://esos-iot.com/myminio/project/9c36caccf05f4cf88c255ec0a1135978.png" mode=""/>晴</view>
    <view class="tag_type2" wx:if="{{powerdata.weather==''}}"><image class="weather" src="https://esos-iot.com/myminio/project/9c36caccf05f4cf88c255ec0a1135978.png" mode=""/>晴</view>
    <view class="tag_type2" wx:if="{{powerdata.weather=='晴'}}"><image class="weather" src="https://esos-iot.com/myminio/project/9c36caccf05f4cf88c255ec0a1135978.png" mode=""/>晴</view>
    <view class="tag_type2"  wx:if="{{powerdata.weather=='雨'}}"><image class="weather" src="https://esos-iot.com/myminio/project/9d35f013f1a346a49172f36f6b3e700a.png" mode=""/>雨</view>
    <view class="tag_type2"  wx:if="{{powerdata.weather=='小雨'}}"><image class="weather" src="https://esos-iot.com/myminio/project/9d35f013f1a346a49172f36f6b3e700a.png" mode=""/>雨</view>
    <view class="tag_type2" wx:if="{{powerdata.weather=='多云'}}"><image class="weather" src="https://esos-iot.com/myminio/project/b31be7495af1448c95907f9cfb98c56a.png" mode=""/>多云</view>
    <view class="tag_type2" wx:if="{{powerdata.weather=='阴'}}"><image class="weather" src="https://esos-iot.com/myminio/project/de9cd3114c3240298c93c0396771a905.png" mode=""/>阴</view>
    <view class="tag_type2" wx:if="{{powerdata.weather=='雪'}}"><image class="weather" src="https://esos-iot.com/myminio/project/19c96f2e6ade4e26a90fde1cf4e32f1e.png" mode=""/>雪</view>
    <view class="tag_type2" wx:if="{{powerdata.weather=='小雪'}}"><image class="weather" src="https://esos-iot.com/myminio/project/19c96f2e6ade4e26a90fde1cf4e32f1e.png" mode=""/>雪</view>

    <!-- <view class="batteryccc">平均风速 {{powerdata.averagespeed||'--'}} m/s</view> -->
    </view>
    <view class="electric22">

 <view ></view>
 <view class="realtime_title">平均风速</view>  
 <view><text class="realtime_text">{{powerdata.averagespeed||'--'}}</text><text class="realtime_unit">m/s</text></view> 

    </view>
    </view>
    </view>
<view style="height: 20rpx;"> </view>
</view>

</view> 
<!-- 日历选择器 -->
<t-calendar 
    visible="{{visible}}" 
    value="{{currentTime}}" 
    bind:confirm="handleConfirm" 
    bind:close="onClose" 
    minDate="{{mintimeDate}}" 
    maxDate="{{maxtimeDate}}" 
/>
