<view class="header_title">
  <view class="">
    <van-row>
      <van-col span="4">
        <view class="header_img" bindtap="goRYGL">
          <image src="/images/left.png"></image>
          <text class="header_fh">返回</text>
        </view>
      </van-col>
    </van-row>
  </view>
</view>

<view> 
  <map class="map" 
  id="map" scale="16" 
  latitude="{{latitude}}" longitude="{{longitude}}"  
  markers="{{markers}}" 
  style="width: 100%; height: {{height}}px;"  
  bindmarkertap="getListByMachineKey" 
  bindcallouttap="controltap" 
  subkey="A2GBZ-AGALG-MP2QK-IJGFW-MRU36-4SF4O"
  bindtap="checkMap"></map> 
</view>

<view class="map_address">
  <view class="map_add">
    {{projectName}}
  </view>
</view>


<view class="map_left" style="bottom:{{ bottom }}">
  <view class="map_left_img">
    <image src="/images/i_location.png"  bindtap="personalLocation"></image>
  </view> 
  <view class="map_left_img">
    <image src="/images/i_mechanics.png" bindtap="machineLocation"></image>
  </view>     
</view>
<view class="map_right" style="bottom:{{ bottom }}">
  <view class="map_right_img">
    <view class="map_right_zi" bindtap="upward">
      <image src="/images/img_11.png"></image>
      刷新
    </view> 
  </view> 
  <view class="map_right_img">
   <view class="map_right_zi"  is-link bindtap="showPopup" >
    <image src="/images/img_12.png"></image>
      列表
    </view> 
  </view>     
</view>

<van-transition name="fade-up"  show="{{ showUp }}">
  <view class="sliding_up"  wx:for="{{list}}">
    <view class="sliding_up_btn"> 
      <view bindtap="downward">
        <image src="/images/sliding_up.png"></image>
      </view>
    </view>
    <view class="sliding_up_content">
      <view class="sliding_up_top">

        <view class="sliding_up_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>

      <view class="sliding_up_middle"> 
        <van-row>
          <van-col span="2">
            <view class="sliding_up_middle_left" bindtap="changeLeftData">
              <image src="/images/middle_left.png"></image>
            </view>
          </van-col>
          <van-col span="4">
            <view class="sliding_up_middle_head">
              <image src="{{item.head_img}}"></image>
            </view>
          </van-col>
          <van-col span="16">
            <view class="sliding_up_middle_center">
              <view class="ranking_middle_name"> 
                {{item.category}} 
              </view>
              <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="ranking_middle_company">
                项目：<text>{{item.projectName}}</text>
              </view>
            </view>
          </van-col>
          <van-col span="2">
            <view class="sliding_up_middle_right" bindtap="changeRightData">
              <image src="/images/middl_right.png"></image>
            </view>
          </van-col>
        </van-row>
      </view>
      <view class="sliding_up_bottom">
        <view class="chart_max">
          <van-tabs animated bind:click="cutTimeLeven" data-machineKey="{{item.machine_key}}">
            <van-tab title="最近一周日运转时长(s)" >
              <view class="chart_min">
                <ec-canvas ec="{{ ec_1 }}" id="mychart-one"></ec-canvas>
              </view>
            </van-tab>
            <van-tab title="最近一周油耗统计(L)">
              <view class="chart_min">
                <ec-canvas ec="{{ ec_2 }}" id="mychart-two"></ec-canvas>
              </view>
            </van-tab>
          </van-tabs>

        </view>
      </view>
    </view>
  </view>
</van-transition>


<van-popup show="{{ showPopup }}" round position="bottom" custom-style="height: 930rpx"  bind:close="onClose">
  <view class="lits_content">
    <view class="hj_float_title">
      <van-dropdown-menu>
        <van-dropdown-item value="{{ value1 }}" options="{{ option1 }}" bind:change="optionChange"/>
      </van-dropdown-menu>
    </view> 
    <view class="ranking_max">
      <view class="machinery_list  {{currentId == item.machine_key ?'active':' '}}" wx:for="{{lists}}"  bindtap="selectList" data-index="{{index}}" data-machinekey="{{item.machine_key}}">
        <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_s">
                <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_s"> 
              今日工时：<text>{{item.workTime}}</text>
            </view>
          </van-col>
          <van-col  span="12">
            <view class="working_hours_s"> 
              当前油量：<text>{{item.volume}}/{{item.percentage}}</text>
            </view>
          </van-col>
        </van-row>
        <view class="project_name"> 
          项目：<text>{{item.projectName}}</text>
        </view>
      </view> 
    </view>
  </view>
</van-popup>
<van-overlay show="{{show}}">
  <view class="gif">
    <image src="../../images/loding2.gif"></image>
    <view>数据加载中！请稍后...</view>
  </view>
</van-overlay>  







