<view class="header_title">
  <view class="">
    <van-row>
      <van-col span="3">
        <view class="header_img" bindtap="showPopup"><image src="/images/core.png"></image></view>
      </van-col>
      <van-col span="4">
        <view class="header_img" bindtap="goGCLB">
          <image src="/images/left.png"></image>
          <text class="header_fh">返回</text>
        </view>
      </van-col>
      <van-col span="10">
        <view class="header_name">设备管理</view>
      </van-col>
    </van-row>
  </view>
</view>

<!-- 左侧账号信息 -->
<van-popup show="{{ leftShow }}" position="left" custom-style="width: 70%;height:100%;background:#191d28" bind:close="onLeftClose" >
  <view class="left_max">
    <van-row class="demo clearfix">
      <van-col span="10">
        <view class="left_head"><image src="http://fileimg.makalu.cc/szgl/9015e824c5004e629049c4f72967cfdc.png"></image></view>
      </van-col>
      <van-col span="14">
        <view class="left_info">
          <view class="left_info_name">{{userName}}</view>
          <view class="left_info_name">{{loginName}}</view>
        </view>
      </van-col>
    </van-row>
    <!-- <view class="left_manage_min">
      <view class="left_manage" bindtap="TCDL">
        <view class="left_sign">
          退出登录
        </view>
      </view>
    </view> -->
  </view>
</van-popup>


<view class="max_content">
  <project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>

  <!-- <view class="video_add">
    <view class="video_address">
      <view class="video_address_min" bindtap="GOMAP">
        {{projectName}}
      </view>
    </view>
  </view> -->

 <view style="margin-top: 26rpx;">
  <van-row >
    <van-col span="12">
      <view class="device_types active">
        <text>机械设备</text>
      </view>
    </van-col>
    <van-col span="12">
      <view class="device_types" bindtap="gotzsb">
        <text>特种设备</text>
      </view>
    </van-col>
  </van-row>
 </view>

  <view class="echarts_max">
    <view class="echarts_min">
      <view class="eharts_title">状态统计</view> 
      <view class="status_statistics">
        {{machineCount}}台
      </view>
      <van-row>
        <van-col span="6">
          <view class="number_sets number_color_1">{{workingCount}}</view>
          <view class="name_sets number_color_1">运行</view>
        </van-col>
        <van-col span="6">
          <view class="number_sets number_color_2">{{idlingCount}}</view>
          <view class="name_sets number_color_2">怠速</view>
        </van-col>
        <van-col span="6">
          <view class="number_sets number_color_3">{{offCount}}</view>
          <view class="name_sets number_color_3">静止</view>
        </van-col>
        <van-col span="6">
          <view class="number_sets number_color_4">{{outWatchingCount}}</view>
          <view class="name_sets number_color_4">离线</view>
        </van-col>
      </van-row>
    </view> 
  </view>

  <view class="echarts_max">
    <view class="echarts_min">
      <view class="eharts_title">
        工时排名<text class="hj_float" bindtap="onclickType">{{type}} </text>
        <van-action-sheet show="{{ showType }}" actions="{{ actionsType }}" bind:close="onClose" bind:select="onSelectType" />
      </view> 
      <view class="machinery_list" wx:for="{{list}}" bindtap="skipMap" data-machinekey="{{item.machine_key}}" data-index="{{index}}" wx:key  wx:if="{{index<3}}">
        <van-row>
          <van-col span="5">
            <view class="machinery_img">
              <image src="{{item.head_img}}"></image>
            </view>
          </van-col>
          <van-col span="19">
            <view class="machinery_name">{{item.category}}</view>
            <view class="machinery_info">
              <view class="machinery_model">{{item.machine_model}}</view>
              <view class="ranking_middle_quantity">
                <view class="ranking_middle_img  {{item.battery_percent > 20 ? 'ranking_green' :'ranking_red' }}">
                  <view class="battery">
                    <view class="{{item.battery_percent > 20 ? 'green_battery' :'red_battery'}}" style="width:{{item.battery_percent}}+'%'">
                      <!-- 电池 -->
                    </view>
                  </view>
                </view>
                <view class="ranking_middle_quantity_proportion  {{item.battery_percent > 20 ? 'number_green' :'number_red' }}">  {{item.battery_percent}}%</view>
              </view>
              <view class="machinery_state {{item.class}}">
                <view>{{item.state}}</view>
              </view>
            </view>
          </van-col>
        </van-row>
        <van-row>
          <van-col  span="12">
            <view class="working_hours"> 
              今日工时：<text>{{item.workTime}}</text>
            </view>
          </van-col>
          <van-col  span="12">
            <view class="working_hours"> 
              当前油量：<text>{{item.volume}}/{{item.percentage}}%</text>
            </view>
          </van-col>
        </van-row>
        <view class="project_name"> 
          项目：<text>{{item.projectName}}</text>
        </view>
      </view> 
      <view class="personnel_orientation" bindtap="shipTotalMap">
        机械定位：<text>{{machineryTotalCount}}</text> >>
      </view>
    </view>
  </view>
</view>
<van-overlay show="{{show}}">
  <view class="gif">
    <image src="../../images/loding2.gif"></image>
    <view>数据加载中！请稍后...</view>
  </view>
</van-overlay>  

 <!-- 底部导航 -->
 <van-tabbar active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
  <van-tabbar-item bindtap="XMGK" >
    <image
      slot="icon"
      src="/images/footer_5.png"
      mode="aspectFit"
      style="width:40rpx; height: 40rpx;"
    />
    <image
      slot="icon-active"
      src="/images/foot_5.png"
      mode="aspectFit"
      style="width:40rpx; height: 40rpx;"
    />
    项目概况
  </van-tabbar-item>

  <van-tabbar-item>
    <image
      slot="icon"
      src="/images/footer_2.png"
      mode="aspectFit"
      style="width:40rpx; height: 40rpx;"
    />
    <image
      slot="icon-active"
      src="/images/foot_2.png"
      mode="aspectFit"
      style="width:40rpx; height: 40rpx;"
    />
    设备管理
    </van-tabbar-item>

  <van-tabbar-item bindtap="RYGL">
    <image
      slot="icon"
      src="/images/footer_3.png"
      mode="aspectFit"
      style="width:40rpx; height: 40rpx;"
    />
    <image
      slot="icon-active"
      src="/images/foot_3.png"
      mode="aspectFit"
      style="width:40rpx; height: 40rpx;"
    />
    人员管理
  </van-tabbar-item>

  <van-tabbar-item bindtap="XMSP">
    <image
      slot="icon"
      src="/images/footer_7.png"
      mode="aspectFit"
      style="width:40rpx; height: 40rpx;"
    />
    <image
      slot="icon-active"
      src="/images/foot_7.png"
      mode="aspectFit"
      style="width:40rpx; height: 40rpx;"
    />
    安全管理
  </van-tabbar-item>

  <van-tabbar-item bindtap="GDGN">
    <image
      slot="icon"
      src="/images/footer_1.png"
      mode="aspectFit"
      style="width:40rpx; height: 40rpx;"
    />
    <image
      slot="icon-active"
      src="/images/foot_1.png"
      mode="aspectFit"
      style="width:40rpx; height:40rpx;"
    />
    更多功能
  </van-tabbar-item>
</van-tabbar>
