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

<view class=" bg-white padding-5" >     

<view  class="bg-white" >
   <view class="cubarN bg-white " >

  <view class="cubarN bg-white flex-9" data-id ="{{index}}" bindtap="HideOrOpen" style="background:white;">
    <view class="flex-9" style="font-weight: bold;" >房号：{{RoomNumber}}</view>      
    <view class="flex-sub text-{{devNode.Status==true? 'green':'red'}}"  >{{    devNode.Status==true? "在线":"离线"}}</view>
  </view>
   </view>

<view class="cubarN bg-white" >    <!-- wx:if="{{devlist[index].show==0}}"> -->
  
  <view class="flex-xis" >MAC:{{devNode.MAC}}</view>      
  <!-- <view class="flex-xis setborder line-grey text-cut" style="height: 50rpx;width: 520rpx; font-size:22rpx; line-height: 50rpx"></view>      -->
    <view class="flex-twice" style="font-size: 26rpx;">主机:{{devNode.Model}}</view>
    <view class="flex-twice" style="font-size: 22rpx;">配置版本:{{devNode.ConfigVersion}}  </view>           
  </view>
  <view class="cubarN bg-white solid-bottom  "> <!-- wx:if="{{devlist[index].show==0}}"> -->    
    <view class="flex-eight" style="font-size: 22rpx;" >固件版本:{{devNode.Version}}</view>
  </view>

</view>
</view> 

<view class="flex solids line-grey"  style=" height:62% ;width:100%;">


<view class="flex-eight" style="height: 100%;margin: 3rpx 5rpx; " >  
  <view  class="flex-xis  setborder line-grey text-cut" style="height: 45%;font-size: 22rpx; line-height: 50rpx;min-width: 0;margin: 3rpx 0rpx; "> 
    {{Gfilename}}         
    </view> 
  <view class="flex-xis setborder line-grey text-cut" style="height: 45%;font-size: 22rpx; line-height: 50rpx;min-width: 0;margin: 3rpx 0rpx;">          
      {{Pfilename}}
    </view> 
</view> 

<view class="flex-twice" style="height: 100%;margin: 3rpx 5rpx;" >        
    <button class=" "style="  margin: 3rpx 0rpx;  font-size: 22rpx;height:45%;" data-id="1" bind:tap="UpgradeTheEquipment" disabled="{{Completed}}">固件升级</button> 
  <button class=""style=" margin: 3rpx 0rpx;   font-size: 22rpx;height: 45%;" data-id="2" bind:tap="UpgradeTheEquipment" disabled="{{Completed}}">配置升级</button> 
</view> 

</view>

<view wx:if="{{Completed}}" class=" flex align-center " style="height: 70rpx;background: aquamarine;" > 
  <view class="flex-eight" >正在升级房号：{{CurrentUpgradeDev}}:{{CurrentUpgradeDevStart}}</view> 
  <view class="flex-sub">
    <text bind:tap="closeUpgradeProgress" class="setborder padding-xs text-red " style="cursor: pointer;">关闭</text>
  </view>
</view>

<scroll-view scroll-x class="bg-white nav text-center text-bold text-xl ">
  <view class="flex text-center"> 
    <view class="cu-item {{1==TabCur?'text-blue cur':''}}"   bindtap="tabSelect" data-id="{{1}}">
     主机控制
  </view>
  <view class="cu-item {{2==TabCur?'text-blue cur':''}}" bindtap="tabSelect" data-id="{{2}}">
     控制日志
    </view>
  </view>

</scroll-view>

<scroll-view scroll-y  scroll-into-view="{{toView}}" id="myScroll"  style="height:{{scrollHeight}}rpx; " >

  <view wx:if="{{TabCur===1}}" style="height:95%" class="bg-white"  >        
     
     
     <view  class="bg-white ">
       <!-- <view style="text-align: left;font-weight: bold">播放测试:</view> -->
            <!-- <view style="text-align: left;font-weight: bold">播放测试:</view> -->
       <view class="Ncu-bar bg-white flex">         
         <button    bindtap="GetshowinfoClick"  class="cu-btn round1 ulg margin-5" style="font-weight: bold;">播放欢迎词</button> 
       <!-- <view style="text-align: left;font-weight: bold" class=" margin-xs radius ">音量:</view> -->
       <slider style="width:50%;" min="30" max="100" step="1" value="{{VolumeLevel}}" bindchange="changeVolumeLevel" ></slider>
       <view>{{VolumeLevel}}</view>
     
    
     </view>
     <view class="ControlLine"></view>
     </view>


     <view  class="bg-white " wx:for="{{roomtypeInfoNodeinfo}}"  wx:for-item="row" wx:for-index="rowIndex">
     
      
       <view class=" bg-white  "  wx:if="{{row[0]===1}}" >
       <!-- <view style="text-align: left;font-weight: bold">设置设备开关状态:</view> -->
        <view class="Ncu-bar bg-white flex-sub" wx:for="{{row[1].length/4 }}" wx:for-index="colIndex" >
       <view class="Ncu-bar bg-white" wx:if="{{colIndex*4<row[1].length}}">          
         <button id="1" class="cu-btn round1 margin-3 vlg"  data-value="1" data-index="{{row[1][colIndex*4][0]}}"  bindtap="SetDeviceSwitchStatus"  wx:if="{{colIndex*4<row[1].length}}" style="background-color: {{row[1][colIndex*4][2][0][2]===0 ? '#E6E6E6 ':'#39b54a'}};" >{{row[1][colIndex*4][1] }}</button>
         <button id="1"  class="cu-btn round1 margin-3 vlg"  data-value="1" data-index="{{row[1][colIndex*4+1][0]}}" bindtap="SetDeviceSwitchStatus"  wx:if="{{colIndex*4+1<row[1].length}}" style="background-color: {{row[1][colIndex*4+1][2][0][2]===0 ? '#E6E6E6':'#39b54a'}};">{{row[1][colIndex*4+1][1] }}</button>
         <button id="1"  class="cu-btn round1 margin-3 vlg"  data-value="1" data-index="{{row[1][colIndex*4+2][0]}}" bindtap="SetDeviceSwitchStatus"  wx:if="{{colIndex*4+2<row[1].length}}" style="background-color: {{row[1][colIndex*4+2][2][0][2]===0 ? '#E6E6E6':'#39b54a'}};">{{row[1][colIndex*4+2][1] }}</button>
         <button id="1"  class="cu-btn round1 margin-3 vlg"  data-value="1" data-index="{{row[1][colIndex*4+3][0]}}" bindtap="SetDeviceSwitchStatus"  wx:if="{{colIndex*4+3<row[1].length}}" style="background-color: {{row[1][colIndex*4+3][2][0][2]===0 ? '#E6E6E6':'#39b54a'}};">{{row[1][colIndex*4+3][1] }}</button>
         <!-- <button class="cu-btn round margin-3 nlg" data-index="{{row[1][colIndex*5+4][0]}}" bindtap="SetDeviceSwitchStatus"  wx:if="{{colIndex*4+4<row[1].length}}">{{row[1][colIndex*4+4][1] }}</button> -->
         <!-- <button class="cu-btn round margin-3 nlg" data-index="{{row[1][colIndex*6+5][0]}}" bindtap="SetDeviceSwitchStatus"  wx:if="{{colIndex*6+5<row[1].length}}">{{row[1][colIndex*6+5][1] }}</button> -->
       </view>            
        </view>
        <view class="ControlLine"></view>
       </view>     
       
       <view class="bg-white" wx:if="{{row[0]===23}}">
         <!-- <view style="text-align: left;font-weight: bold">设置调光亮度:</view> -->
         <view class="bg-white" wx:for="{{row[1].length}}" wx:for-index="DimIndex" >               
       <view class="Ncu-bar bg-white">
         <view class="flex-twice">{{row[1][DimIndex][1]}}</view>
           <slider id="23"  data-index="{{row[1][DimIndex][0]}}" class="flex-eight" min="10" max="90" step="1" value="{{row[1][DimIndex][2][0][2]}}" bindchange="SetDeviceSwitchStatusslider" ></slider>
         <view class="flex-sub">{{row[1][DimIndex][2][0][2]}}</view>
       </view>   
       </view>   
       <view class="ControlLine"></view>
       </view>
       <view class="bg-white" wx:if="{{row[0]===52}}">
         <!-- <view style="text-align: left;font-weight: bold">色温控制:</view> -->
         <view class="Ncu-bar bg-white"> 
         <view   class="action margin-0 flex-twice text-green " >开关</view> 
         <view class="action margin-0 flex-xis text-green solid-left"  >色温</view> 
         <view class="action margin-0 flex-xis text-green solid-left" >亮度</view> 
       </view> 
         <view class=" bg-white" wx:for="{{row[1].length}}" wx:for-index="coloIndex" > 
           <view class="Ncu-bar bg-white"> 
         <view class=" flex-twice margin-3 " >
           <button id="52"  data-type="1" data-value="1" data-index="{{row[1][coloIndex][0]}}"   class="cu-btn round1 Elg" bindtap="SetDeviceSwitchStatus"   style="background-color: {{row[1][coloIndex][2][0][2]===0 ? '#E6E6E6 ':'#39b54a'}};" >{{row[1][coloIndex][1]}}</button> 
         </view> 
         <view class=" flex-xis Ncubar1 solid-left "  >

           <button id="52"  data-type="2" data-value="20" data-index="{{row[1][coloIndex][0]}}"  class="margin-3 cu-btn round1 EElg" bindtap="SetDeviceSwitchStatus"   style="background-color: {{row[1][coloIndex][2][1][2]===20 ? '#39b54a':'#E6E6E6 '}};">20</button>
           <button id="52"  data-type="2" data-value="50" data-index="{{row[1][coloIndex][0]}}"  class="margin-3 cu-btn round1 EElg" bindtap="SetDeviceSwitchStatus"   style="background-color: {{row[1][coloIndex][2][1][2]===50 ? '#39b54a':'#E6E6E6 '}};">50</button>
           <button id="52"  data-type="2" data-value="80" data-index="{{row[1][coloIndex][0]}}"  class="margin-3 cu-btn round1 EElg" bindtap="SetDeviceSwitchStatus"   style="background-color: {{row[1][coloIndex][2][1][2]===80 ? '#39b54a':'#E6E6E6 '}};">80</button>
          
         </view> 
         <view class="ControlLine_h"></view>
         <view class=" flex-xis Ncubar1 "  >
           <button id="52"  data-type="3" data-value="20" data-index="{{row[1][coloIndex][0]}}"  class="margin-3 cu-btn round1 EElg" bindtap="SetDeviceSwitchStatus"   style="background-color: {{row[1][coloIndex][2][2][2]===20 ? '#39b54a':'#E6E6E6 '}};">20</button>
           <button id="52"  data-type="3" data-value="50" data-index="{{row[1][coloIndex][0]}}"  class="margin-3 cu-btn round1 EElg" bindtap="SetDeviceSwitchStatus"   style="background-color: {{row[1][coloIndex][2][2][2]===50 ? '#39b54a':'#E6E6E6 '}};">50</button>
           <button id="52"  data-type="3" data-value="80" data-index="{{row[1][coloIndex][0]}}"  class="margin-3 cu-btn round1 EElg" bindtap="SetDeviceSwitchStatus"   style="background-color: {{row[1][coloIndex][2][2][2]===80 ? '#39b54a':'#E6E6E6 '}};">80</button>
         </view> 
       </view> 


           <!-- <view class="Ncubar1 bg-white" style="text-align: left;">
             <view class="flex-twice">
               <view style="text-align: left;font-weight: bold">{{row[1][coloIndex][1]}}:</view> 
             </view>
             <view class="flex-8">
               <switch class="Green" data-index="{{item}}"     bindchange="Loopswitch"></switch> 
             </view>                           
           </view> -->

         
         <!-- <view class="Ncu-bar bg-white flex-eight">                
         <button class="cu-btn round vlg">亮度20</button>
         <button class="cu-btn round vlg">亮度80</button>
         <button class="cu-btn round vlg">色温20</button>
         <button class="cu-btn round vlg">色温80</button>
         </view> -->
       
       </view>
       <view class="ControlLine"></view>
     </view>
       <view  class="bg-white" wx:if="{{row[0]===5}}">
         <!-- <view style="text-align: left;font-weight: bold">设置设备开停关状态:</view> -->
         <view class="bg-white" wx:for="{{row[1].length}}" wx:for-index="coloIndex">
         <view class="Ncu-bar bg-white">
         
         <view class="flex-treble" style="font-weight: bold">{{row[1][coloIndex][1]}}</view>
           <view class="Ncubar1 bg-white flex-eight">
      

             <button id="5" data-value="1" class="margin-3 cu-btn round1 clg" style="background-color:{{row[1][coloIndex][2][0][2]===1 ? '#39b54a':'#E6E6E6'}};" data-index="{{row[1][coloIndex][0]}}" bindtap="SetDeviceSwitchStatus" >开</button>
             <button id="5" data-value="2" class="margin-3 cu-btn round1 clg" style="background-color:{{row[1][coloIndex][2][0][2]===2 ? '#39b54a':'#E6E6E6'}};" data-index="{{row[1][coloIndex][0]}}" bindtap="SetDeviceSwitchStatus" >关</button>
             <button id="5" data-value="6" class="margin-3 cu-btn round1 clg" style="background-color:{{row[1][coloIndex][2][0][2]===6 ? '#39b54a':'#E6E6E6'}};" data-index="{{row[1][coloIndex][0]}}" bindtap="SetDeviceSwitchStatus">停</button>
           </view>
         </view>
           
         <view class="ControlLine"></view>
         </view>
         <view class="ControlLine"></view>
       </view>
       <view class="bg-white" wx:if="{{row[0]===7}}">
         <!-- <view style="text-align: left;font-weight: bold">设置温控设备状态:</view> -->
         <view class=" bg-white" wx:for="{{row[1].length}}" wx:for-index="coloIndex">
         
           <view class="Ncu-bar bg-white"> 
             <view class=" flex-twice margin-xs " >               
               <!-- <button class="cu-btn round1 Elg">{{row[1][coloIndex][1]}}</button>  -->
               <button id="7"  data-type="1" data-value="1" data-index="{{row[1][coloIndex][0]}}"   class="cu-btn round1 Elg" bindtap="SetDeviceSwitchStatus"   style="background-color: {{row[1][coloIndex][2][0][2]===0 ? '#E6E6E6 ':'#39b54a'}};" >{{row[1][coloIndex][1]}}</button> 
             </view>
             <view class=" flex-8 Ncubar1 solid-left "  >
               <button id="7"  data-type="2" data-value="1" data-index="{{row[1][coloIndex][0]}}"   class=" cu-btn round1 clg margin-3" bindtap="SetDeviceSwitchStatus"   style="background-color: {{row[1][coloIndex][2][1][2]===4 ? '#E6E6E6 ':row[1][coloIndex][2][1][2]===3 ? '#1cbbb4':row[1][coloIndex][2][1][2]===2 ? '#e54d42':'#0081ff'}};" >{{row[1][coloIndex][2][1][2]===4 ? '自动':row[1][coloIndex][2][1][2]===3 ? '送风':row[1][coloIndex][2][1][2]===2 ? '制热':'制冷'}}</button> 
               <button id="7"  data-type="3" data-value="1" data-index="{{row[1][coloIndex][0]}}"   class=" cu-btn round1 clg margin-3" bindtap="SetDeviceSwitchStatus"  >{{row[1][coloIndex][2][2][2]===4 ? '自动':row[1][coloIndex][2][2][2]===3 ? '高风速':row[1][coloIndex][2][2][2]===2 ? '中风速':'低风速'}}</button> 
               <button id="7"  data-type="4" data-value="1" data-index="{{row[1][coloIndex][0]}}" bindtap="SetDeviceSwitchStatus" class="  cu-btn round1 vvlg margin-3">-</button>
               <text class=" textvlg">{{row[1][coloIndex][2][3][2]}}</text>
               <button id="7"  data-type="5" data-value="1" data-index="{{row[1][coloIndex][0]}}" bindtap="SetDeviceSwitchStatus" class="  cu-btn round1 vvlg margin-3">+</button>                   
             </view>
            
           </view>
           <!-- <view class="Ncubar1 bg-white" style="text-align: left;">
             <view class="flex-twice">
               <view style="text-align: left;font-weight: bold">{{row[1][coloIndex][1]}}:</view> 
             </view>
             <view class="flex-8">
               <switch class="Green" data-index="{{item}}"     bindchange="Loopswitch"></switch> 
             </view>                           
           </view>
         
         <view class=" bg-white flex-eight">  
           <view class="Ncu-bar bg-white flex-eight">
          
             <button class="  cu-btn round1 vlg margin-3">制冷</button>
             <button class="  cu-btn round1 vlg margin-3">制热</button>  
             <button class="  cu-btn round1 vlg margin-3">20度</button>
             <button class=" cu-btn round1 vlg margin-3">30度</button>    
           </view>
           <view class="Ncu-bar bg-white flex-eight">                 
         <button class="cu-btn round1 vlg margin-3">风速高</button>
         <button class="cu-btn round1 vlg margin-3">风速中</button>
         <button class="cu-btn round1 vlg margin-3">风速低</button>
         <button class="cu-btn round1 vlg margin-3">自动</button>
       </view>
       </view> -->
       <view class="ControlLine"></view>
     </view>
     <view class="ControlLine"></view>
   </view>

     </view> 


 </view>

<view wx:else>

</view>
</scroll-view>

