<view class="container">
  <!-- 地图组件 wx:if="{{workorderdata.length<1}}" -->
  <map 
    id="map"
    class="map"
    longitude="{{longitude}}"
    latitude="{{latitude}}"
    scale="{{scale}}"
    markers="{{markers}}"
    polyline="{{polyline}}"
    show-location
  ></map>
   <!-- 附近车辆--数量提示 -->
   <view class="cars-nearby" wx:if="{{carsNearby > 0}}">
  <view style="display: flex;align-items: center;">
    <!-- <view class="cars-icon">
      <text class="iconfont icon-car"></text>
    </view> -->
      <image class="nearby_icon" src="https://esos-iot.com/myminio/project/e9c0fba9b61448e59458054d335b162b.png" mode="heightFix"/>
    <view class="cars-count"> 车辆{{carsNearby}} </view>
  </view>
 
  <view style="display: flex;align-items: center;margin-left: 20rpx;" wx:if="{{userdata.operationRole==5}}">
  
    <image class="nearby_icon" src="https://esos-iot.com/myminio/project/62a7a9c509f948558436bc56ee9bfe2e.png" mode="heightFix"/>
    <view class="cars-count">电站 {{stationsNearby}} </view>
  </view>
  <view style="display: flex;align-items: center;margin-left: 20rpx;" wx:if="{{userdata.operationRole==6}}">
    <image class="nearby_icon" src="https://esos-iot.com/myminio/project/42dd004817dd4f268d97dcd1145ca113.png" mode="heightFix"/>
    <view class="cars-count">用电 {{powerUseNearby}} </view>
  </view>
  </view>
  <view class="positioning" bind:tap="positioning">
  <t-icon name="focus" size="40rpx" data-name="focus" bind:tap="onIconTap" />

</view>
   <!-- <view class="carousel">
    <swiper indicator-dots="{{indicatorDots}}"
        autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" circular="{{true}}">
        <block wx:for="{{background}}" wx:key="*this">
          <swiper-item>
            <image class="swiper_img" src="{{item}}" mode="widthFix"/>
          </swiper-item>
        </block>
      </swiper>
   </view> -->
   <!-- 底部面板 -->
  <view class="bottom-panel">
  <!--  -->
  <!-- 客户信息--(叫车后显示) -->
    <view  wx:if="{{userdata.operationRole==5||userdata.operationRole==6}}">
    <view class="driver-info" wx:for="{{workorderdata}}" wx:key="index" data-id="{{item.workorderId}}" bindtap="details">
      <image src="{{driverAvatar}}" class="driver-avatar"></image>
   <view style="width: 100%;">
      <view style="width: 100%;display: flex;justify-content: space-between;">
      <view class="driver-details">
        <!-- <view class="driver-name"><text style="color: #222;">司机：</text>  {{item.driverName||'匹配中'}}</view> -->
        <view class="driver-name">车牌号：{{item.carName||'匹配中'}}</view>
        <view class="driver-car1" wx:if="{{item.chargedischargeType==1}}">工单类型：充电</view>
        <view class="driver-car2" wx:if="{{item.chargedischargeType==2}}">工单类型：放电</view>
        <view class="driver-car">目的地：{{item.poiName}}</view>
      </view>
      <view class="cancel-btn">
        <view wx:if="{{item.workorderType==0}}">待处理</view>
<view wx:if="{{item.workorderType==1}}">待出发</view>
<view wx:if="{{item.workorderType==2}}">行驶中</view>
<view wx:if="{{item.workorderType==3}}">到达地点</view>
<view wx:if="{{item.workorderType==4}}">工作中</view>
<!-- <view wx:if="{{item.workorderType==5}}">完成工作</view> -->
<view wx:if="{{item.workorderType==5&&item.workorderExaminetye==0}}">待审核</view>
<view wx:if="{{item.workorderType==5&&item.workorderExaminetye==1}}">审核成功</view>
<view wx:if="{{item.workorderType==5&&item.workorderExaminetye==2}}">审核失败</view>
      </view>
      </view>
      <view class="driver-arrive1">预约时间：{{item.workorderStarttime}}</view>
    </view>
    </view>
    <view class="available" wx:if="{{workorderdata.length<1}}">
<image src="https://esos-iot.com/myminio/project/9efa1691f71a48b6ae20648c0a2dae56.png" mode="aspectFit"/>
</view> 
    </view>
    <!-- 司机信息--(叫车后显示) --> 
    <view  wx:if="{{userdata.operationRole==4}}">
    <view class="driver-info" wx:for="{{workorderdata}}" wx:key="index" data-id="{{item.workorderId}}" bind:tap="details">
      <image src="{{driverAvatar}}" class="driver-avatar" mode="widthFix"></image>
   <view style="width: 100%;">
      <view style="width: 100%;display: flex;justify-content: space-between;">
      <view class="driver-details">
        <view class="driver-name">{{item.poiName}}</view>
        <view class="driver-car">客户: {{item.receiver}}</view>
        <view class="driver-car1" wx:if="{{item.chargedischargeType==1}}">工单类型：充电</view>
        <view class="driver-car2" wx:if="{{item.chargedischargeType==2}}">工单类型：放电</view>
      </view>
      <!-- <button class="cancel-btn" data-id="{{item.workorderId}}" bind:tap="details">去查看</button> -->
      <view class="cancel-btn">
<view wx:if="{{item.workorderType==0}}">待处理</view>
<view wx:if="{{item.workorderType==1}}">待出发</view>
<view wx:if="{{item.workorderType==2}}">行驶中</view>
<view wx:if="{{item.workorderType==3}}">到达地点</view>
<view wx:if="{{item.workorderType==4}}">工作中</view>
<view wx:if="{{item.workorderType==6}}">取消工单</view>
<view wx:if="{{item.workorderType==5&&item.settlementType==0}}">待结算</view>
<view wx:if="{{item.workorderType==5&&item.settlementType==1}}">结算成功</view>
<view wx:if="{{item.workorderType==5&&item.settlementType==2}}">结算失败</view>
      </view>
      </view>
      <view class="driver-arrive1">约定到达时间：{{item.workorderCreatetime}}</view>
    </view>
    </view>
    <view class="available" wx:if="{{workorderdata.length<1}}">
<image src="https://esos-iot.com/myminio/project/9efa1691f71a48b6ae20648c0a2dae56.png" mode="aspectFit"/>
</view> 
    </view>
    <view style="height: 140rpx;" wx:if="{{userdata.operationRole==5||userdata.operationRole==6}}"></view>
     <!-- <button class="call-btn" bindtap="onelectricity">
      <text class="call-btn_left_electricity">预约</text>
    </button> -->
  </view>
</view>

<button class="call-btn" bindtap="onelectricity" wx:if="{{userdata.operationRole==5||userdata.operationRole==6}}">
      <text class="call-btn_left_electricity">预约</text>
      
    </button>
<!-- 
  https://esos-iot.com:9443/syscar/selectoperationcar
Request Method: POST
 -->