<cu-custom bgColor="bg-gradual-blue"  
 isBack="true"> 
  <block bindtap="back" slot="backText" >返回</block> 
  <view slot="content">({{HotelName}})_{{RoomNumber}}</view> 
</cu-custom> 
<view class="flex solid-bottom  justify-between ">
  <view class=" padding-xs margin-sm radius">  
  <text class="text-black">异常数量：</text>
  <text class="text-red">1</text>
  <text class="text-black">/{{deviceList.length}}</text>

  </view>
      <view class="bg-grey padding-xs margin-sm radius" hover-class="navigator-hover" bindtap="checkWardRoundRecords" >查看查房记录</view>
      <view class="bg-grey padding-xs margin-sm radius"  hover-class="navigator-hover">上传查房状态</view>
    </view>

    <!-- 设备状态表格 -->

  <view class="th">
    <text class="th-item">设备名称</text>
    <text class="th-item">状态</text>  
    <text class="th-item">设备检测</text>
  </view>
<scroll-view scroll-y  scroll-into-view="{{toView}}" id="myScroll"  style="height:{{scrollHeight}}rpx;">
  <view class="device-table">
  <block wx:for="{{deviceList}}" wx:key="id">
    <view class="tr">
      <!-- 名称 -->
      <text class="th-item {{item.equipmentstatus==='hideModal_1'? 'bg-green':item.equipmentstatus==='hideModal_0'? 'bg-red':'textbcolor'}} ">{{item.name}}</text>

      <!-- 状态 -->
      <view class="td status">
        <text class="status-text {{item.status==='在线'||item.status==='显示'?'on':'off'}}">
          {{item.status}}
        </text>
      </view>

      <!-- 按钮 -->
      <view class="td btn-group">
        <button class="btn green" data-id="{{item.id}}" data-st="正常" data-target="DialogModal1" bindtap="showModal">设备检测</button>       
      </view>
      
    </view>

  </block>
  
</view>
</scroll-view>
<view class="cu-modal {{modalName=='DialogModal1'?'show':''}}">
  <view class="cu-dialog">
    <view class="cu-bar bg-white justify-end">
      <view class="content">{{deviceList[deviceListindex].name}}</view>
     
    </view>
    <view >
    <view class=" text-left" > 检测流程：</view>
    <textarea auto-height maxlength="-1" class="solids " disabled="true" confirm-type="return" style="width: 95%;font-size: 32rpx;text-align: left;white-space: pre-wrap; word-break: break-all; line-height: 1.5;" value=" {{deviceList[deviceListindex].note}}"/>
    
    </view>
    <view class="cu-bar bg-white justify-end">
      <view class="action">
        <button class="cu-btn bg-gray  text-xl text-blue" data-id="hideModal_1" bindtap="DialogModal2">修改检测流程</button>
        <button class="cu-btn bg-red  text-xl text-black margin-left" data-id="hideModal_0" bindtap="DialogModal1">异常</button>
        <button class="cu-btn bg-green text-xl text-black margin-left" data-id="hideModal_1" bindtap="DialogModal1">正常</button>

      </view>
    </view>


<view wx:if="{{deviceList[deviceListindex].isnote === 1 }}" >
    <view class=" text-left" > 检测流程：</view>
  
    <textarea auto-height maxlength="-1"   class="solids " focus="true"  bindinput="inputSearchForHotels"	confirm-type="return" style="width: 100%;font-size: 32rpx;text-align: left;white-space: pre-wrap; word-break: break-all; line-height: 1.5;" value=" {{deviceList[deviceListindex].note}}"/>
    <view class="cu-bar bg-white justify-end">
      <view class="action">       
        <button class="cu-btn bg-red  text-xl text-black margin-left" data-id="cancel" bindtap="saveTheText">取消</button>
        <button class="cu-btn bg-green text-xl text-black margin-left" data-id="ok" bindtap="saveTheText">保存</button>
      </view>
    </view>
  </view>
    </view>
  </view>


