<!--pages/allotDoctor/allotDoctor.wxml-->
<nav navName="智能分配"></nav>
<view class="page">
  <view class="info" wx:if="{{isAllot==1}}">
    <image src="{{img_host+'/fenpei.gif'}}" class="dongtu"></image>
   <view class="tips">正在为您智能分配医生中～</view>
  </view>
  <view class="info" wx:elif="{{isAllot==2}}">
    <image src="{{img_host+'/waitSuccess.png'}}" class="dongtu"></image>
   <view class="tips">已为您成功分配医生</view>
  </view>
  <view class="info" wx:elif="{{isAllot==3}}">
    <image src="{{img_host+'/waitNone.png'}}" class="dongtu"></image>
   <view class="tips">很抱歉，因当前服务排队人较多，暂无空闲医生，请您见谅。</view>
  </view>
  <view class="counttime" wx:if="{{isAllot==1}}">
    <van-count-down time="{{allotCountDown}}" use-slot bind:finish="finishedAllot" format="mm ss" bind:change="onChangeCountDown" >
      <text class="item">{{ timeData.minutes}}分</text>
      <text class="item">{{ timeData.seconds }}秒</text>
  </van-count-down>
  </view>
  <view class="counttime" wx:if="{{isAllot==2}}"><van-count-down class="control-count-down" time="{{countDown }}" format=" ss 秒" bind:finish="finished" /></view>
  <view class="orderDetail" wx:if="{{isAllot==3}}" bindtap="goDetail">订单详情</view>
  <view class="infobox" hidden="{{!(isAllot==2)}}" bindtap="handleGochat">
      <view class="namebox">
        <image src="{{doctor.avatar}}" class="head" wx:if="{{doctor.avatar}}" mode="aspectFill"></image>
        <image src="{{img_host+'/doctor_avatar.png'}}" class="head" wx:else></image>
        <view class="namewraper">
          <view class="row">
            <view class="name">{{doctor.user_name}}</view>
            <view class="type" wx:if="{{doctor.hospital.hospital_level_name != '未知' && doctor.hospital.hospital_level_name}}">{{doctor.hospital.hospital_level_name}}</view>
            <view class="type" wx:if="{{doctor.multi_point_status==1 && doctor.multi_point_enable==1}}">可处方</view>
          </view>
          <view class="hospital"><text class="doctor_title"  wx:if="{{doctor.doctor_title_name}}">{{doctor.doctor_title_name}}</text><text>{{doctor.department_custom_name}}</text></view>
          <view class="hospital">{{doctor.hospital.hospital_name}}</view>
        </view>
        <view class="guanzhu" wx:if="{{!doctor.follow}}" catchtap="toggleFllow">
          <image src="{{img_host+'/star.png'}}"></image>
          <text decode="true">&nbsp;&nbsp;关注</text>
        </view>
        <view class="guanzhu" wx:else catchtap="toggleFllow">
          <image src="{{img_host+'/star_on.png'}}"></image>
          <text decode="true">&nbsp;&nbsp;关注</text>
        </view>
      </view>
    </view>
</view>
<dialog bind:confirm="confirm" bind:cancel="close"  canceltext="取消问诊" showDialog="{{showDialog}}" message="当前服务排队人较多，暂无空闲医生进行接诊，是否继续等待" confirmtext="继续等待"></dialog>
