You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
5.6 KiB

1 year ago
  1. <!--pages/bindLock/bindLock.wxml-->
  2. <view class="btnnormal" wx:if="{{selectindex==1 || selectindex==4}}">
  3. <van-button type="primary" size="large" class="btn" color="#02BFFF" bindtap="scanning">扫一扫</van-button>
  4. <van-field
  5. value="{{ deviceNum }}"
  6. label="锁号"
  7. border="{{true}}"
  8. placeholder="请输入锁号" clearable="{{true}}" bind:change="onChange1" title-width="2em" center="{{true}}"
  9. use-button-slot>
  10. <van-button slot="button" size="small" type="primary" bindtap="linkBule">
  11. 蓝牙连接
  12. </van-button>
  13. </van-field>
  14. </view>
  15. <view class="btnnormal" wx:if="{{selectindex==2 || selectindex==3}}">
  16. <van-button type="primary" size="large" class="btn" color="#02BFFF" bindtap="scanning">扫一扫</van-button>
  17. <van-field
  18. value="{{ deviceNum }}"
  19. label="锁号"
  20. border="{{true}}"
  21. placeholder="请输入锁号" bind:change="onChange1" clearable="{{true}}" title-width="2em" center="{{true}}"
  22. use-button-slot>
  23. <van-button slot="button" size="small" type="primary" bindtap="linkBule">
  24. 蓝牙连接
  25. </van-button>
  26. </van-field>
  27. <van-cell title="已选房源" icon="location-o" value="{{selectRoomName}}" />
  28. <van-radio-group value="{{ radio }}" bind:change="onChange2" custom-class="radiselect" direction="horizontal" class="radio1">
  29. <van-radio name="1">aep</van-radio>
  30. <van-radio name="0">直连</van-radio>
  31. </van-radio-group>
  32. <!-- <view wx:for="alldevice" wx:key="index">
  33. {{item}}
  34. </view> -->
  35. </view>
  36. <van-popup
  37. show="{{ show }}"
  38. position="left"
  39. custom-style="width: 100%;"
  40. bind:close="onClose"
  41. >
  42. <view class="height-percentage-100 popUp">
  43. <view class=" d-flex popUpSearchBg">
  44. <view class="d-inline-block width-percentage-25 pa-2 box-sizing-border">
  45. <van-icon name="arrow-left" bindtap="onClose" /> <view class="jt d-inline-block " bindtap="bindroom">{{selectRoomName}} </view> <view class="d-inline-block font-size-12" bindtap="bindroom">▼</view>
  46. </view>
  47. <van-search
  48. value="{{ searchValue }}"
  49. placeholder="请输入搜索关键词" background="#02BFFF" shape="round" bind:change="onChangeSearch"
  50. use-action-slot class="d-inline-block width-percentage-75"
  51. >
  52. <view slot="action" bind:tap="onClick" class="color-fff">搜索</view>
  53. </van-search>
  54. </view>
  55. <scroll-view scroll-y="{{true}}" bindscrolltolower="bottomingOut" class="scroll-height-100vh">
  56. <view class="search-margin">
  57. <view class="roomlist">
  58. <view class="cu-item mb-4" bindtap="godetail" data-item="{{item}}" wx:for="{{list}}" wx:for-index="{{index}}" wx:for-item="item">
  59. <view class="d-flex justify-content-between pa-2 b-line align-center">
  60. <view class="d-flex align-center w-100 position-relative">
  61. <view class="iconfont icon-fangjianliebiao text-orange d-line {{item.deviceNum?'':'colorRed'}}"></view>
  62. <view class="d-line ml-1 font-size-16 w-80 text-ellipsis">{{item.path}}</view>
  63. <view class="position-absolute confselect"><van-button round type="info" size="mini" data-select="{{item}}" catchtap="selectRoomId" disabled="{{item.deviceNum?true:false}}">确认选择</van-button></view>
  64. </view>
  65. </view>
  66. <view class="content pa-2 d-flex justify-content-between">
  67. <view class="font-size-14 text-bold w-50 text-ellipsis">设备号:{{item.deviceNum?item.deviceNum:'无'}}</view>
  68. <view class="font-size-14 text-bold w-50 text-ellipsis">电量:<text class="{{item.battery<20?'color-red':item.battery<80?'color-orange':item.battery>80?'color-green':''}}">{{item.battery?item.battery:'无'}}</text></view>
  69. <view class="font-size-14 text-bold w-50 text-ellipsis">信号:<text class="{{item.rssi<15?'color-red':item.rssi<20?'color-orange':item.rssi>20?'color-green':''}}">{{item.rssi?item.rssi:'无'}}</text></view>
  70. <view class="font-size-14 colorhui w-50 text-ellipsis">联网:<text class="{{item.isOnline==0?'color-red':item.isOnline==1?'color-green':item.isOnline==2?'color-orange':''}}">{{item.isOnline===0?'离线':item.isOnline==1?'在线':item.isOnline==2?'异常':'无'}}</text></view>
  71. <!-- <view class="font-size-14 colorhui w-50 text-ellipsis" wx:if="item.count">入住人数:{{item.count}}</view> -->
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. </scroll-view>
  77. </view>
  78. </van-popup>
  79. <view class="devicelist" wx:if="{{selectindex == 4}}">
  80. <van-button custom-class="titleText" type="primary" size="normal" class="btn" color="#02BFFF" bindtap="searchDevicesMethods">搜索设备</van-button>
  81. <van-cell title="{{item.name}}" value="{{item.roomName}} 点击连接" data-select="{{item.name}}" bindtap="ConnectTo" is-link wx:for="{{deviceList}}" wx:key="indexone" wx:for-index="{{index}}" wx:for-item="item" />
  82. </view>
  83. <view class="devicelist" wx:else>
  84. <van-button custom-class="titleText" type="primary" size="normal" class="btn" color="#02BFFF" bindtap="searchDevicesMethods">搜索设备</van-button>
  85. <van-button size="normal" type="primary" bindtap="selectRoom">
  86. 选择房间
  87. </van-button>
  88. <van-cell title="{{item.name}}" value="{{item.roomName}} 点击连接" data-select="{{item}}" bindtap="searchBlueButton" is-link wx:for="{{deviceList}}" wx:key="indexone" wx:for-index="{{index}}" wx:for-item="item" />
  89. </view>
  90. <van-popup show="{{ showSelect }}" bind:close="onClose1" position="bottom" custom-style="height: 60%">
  91. <tree
  92. dataTree="{{dataList}}"
  93. selectKey="{{selectKey}}"
  94. bind:select="handleSelect"
  95. isSelectLastNode="true"
  96. isOpenAll="{{false}}"
  97. ></tree>
  98. </van-popup>