<cu-custom bgColor="bg-gradual-blue"  
 isBack="true"> 
  <block bindtap="back" slot="backText" >返回</block> 
  <view slot="content">{{Hotelinfo.HotelName}}({{Hotelinfo.Code}})</view> 
</cu-custom> 

<view class=" solids bg-white" style="height:70px ;width: 100%;font-weight: bold; ">
<view class="flex text-xl " style=" height:45% ;width: 100%;">  
<view class="flex solids "  wx:if="{{RoomIndex>=0}}"  style="height:100% ;width: 60%;">
<view class="text-black ">房间号:{{}}</view> 
</view>
<view class="solids "  wx:if="{{RoomIndex>=0}}"  style="height:100% ;width: 40%;">
  <text class="text-black">异常记录：</text>
  <!-- <text class="text-blue">{{onlineNumber}}/</text> -->
  <text class="text-black">{{HostsDataFilters.length}} </text>

</view>
</view>

<view class="cu-bar1 bg-white " style="height:50% ;width: 100%;" >
  <view class="solids"  style="width: 60%;">
    <input  class="solids cu-btn1" focus="true" bindinput="inputSearchForHotels"	confirm-type="search" style="width: 100%;" value="{{RoomNumber}}"/>
  </view>

 <view class="flex"style="width: 40%;">
   <button class="cu-btn1  line-green margin-left " style="width: 100%;	margin:5rpx;" bindtap="searchRoomLog">搜索</button> 
   <button class="cu-btn1  line-green margin-left " style="width: 100%;	margin:5rpx;" bindtap="RefreshTheRoom">刷新记录</button> 
 </view>
</view>
</view>

<!-- 时间筛选 - 已隐藏，默认选择全部 -->
<view class="bg-white " style="width: 100%;border-bottom: 1px solid #f0f0f0;" wx:if="{{false}}">
  <view class="flex padding-top-xs flex-wrap">
    <view class="text-df font-bold margin-right-sm">时间范围：</view>
    <view bindtap="seltime" data-val="4" class="padding-right-sm padding-left-sm {{seltime==4?'bg-green':''}} margin-right-xs text-df border-radius">全部</view>
    <view bindtap="seltime" data-val="1" class="padding-right-sm padding-left-sm {{seltime==1?'bg-green':''}} margin-right-xs text-df border-radius">今日</view>
    <view bindtap="seltime" data-val="2" class="padding-right-sm padding-left-sm {{seltime==2?'bg-green':''}} margin-right-xs text-df border-radius">本周</view>
    <view bindtap="seltime" data-val="3" class="padding-right-sm padding-left-sm {{seltime==3?'bg-green':''}} margin-right-xs text-df border-radius">本月</view>
    
  </view>
  <view class="flex">
  <view class="flex padding-top-xs padding-bottom-xs align-center flex-wrap" style="width: 80%;">
    <view class="margin-right-sm text-df">时间：</view>
    <picker mode="date" class="text-df padding-right-sm padding-left-sm border border-gray border-radius margin-right-sm" data-type="1" bindchange="bindTimeChange">
      <view class="picker text-green">
        {{starttime==""?"请选择":starttime}}
      </view>
    </picker>
    <view class=" text-df">至：</view>
    <picker start="{{starttime}}" mode="date" class="text-df padding-right-sm padding-left-sm border border-gray border-radius margin-right-sm" bindchange="bindTimeChange" data-type="2">
      <view class="picker text-green">
        {{endtime==""?"请选择":endtime}}
      </view>
    </picker>

    </view>
  <view  style="width: 20%;">
    <button class="cu-btn1 line-green border-radius" style="width: 150rpx;	margin:0;" bindtap="searchByTime">查询</button>
  </view>
</view>
</view>

<scroll-view id="myScroll" scroll-y scroll-into-view="{{toView}}"  style="height:{{scrollHeight}}rpx;" >
      
			<view class="margin-5" style=" border-bottom: 1px solid #f0f0f0;" wx:for="{{visitLogList}}" wx:key="index">
     
        <view class="Listindem ">
        <!-- 房间号与时间日期 -->
          <view class="flex"  style="width: 80%" bindtap="toggleFaultReason" data-id="{{item.Id}}">
        <view class=" text-black"style="width: 50%; ">
          <view style="height: 45%;width: 100%;">           
          <view >{{item.UpdateDate}}</view>
        </view>    
        <view class="flex" style="width: 100%;height: 55%;">
          <view>房号：</view>          
          <view >{{item.RoomNumber}}</view>
        </view>    
       
      <!-- 设备名称   -->
		</view>
          <view class="nav-nameTop" style="width: 50%;left: 30rpx;font-weight:bold; " >
        <view >{{item.DevName}}</view>    
		</view>
  
        </view>
        <view class="flex" style="width: 18%;">   
                 <button class="cu-btn1  line-green margin-left " style="width: 100%;	margin:5rpx;white-space: pre-line;" bindtap="confirmRepair" data-id="{{item.Id}}">确认维
修完成</button> 
        </view>
  
        </view>
        <!-- //故障原因： -->
        <view class="flex line-gray" style="background-color: var(--white)" wx:if="{{selectedId == item.Id}}">
        <view style="width: 20%;">故障原因：</view>
        <view style="color: red;width: 80%;">{{item.FaultDescription}}</view>
        </view>
       

			</view>
       
   
</scroll-view>
            