loop.wxml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <!--pages/loop/loop.wxml-->
  2. <view class="switch-1">
  3. <image src="https://cloud.long-chi.com/resource/miniprogram-lightcontrol/image/network.png" style="position: absolute; left:5%;top:14%;width:8%;height:70%;"></image>
  4. <view class="Dropdown">
  5. <picker range="{{groupName}}" value="{{groupIndex}}" bindchange="changegroup">
  6. <view class="group">
  7. {{groupName[groupIndex]}}
  8. </view>
  9. </picker>
  10. <picker range="{{deviceName}}" value="{{deviceIndex}}" bindchange="changedevice">
  11. <view class="device">
  12. {{deviceName[deviceIndex]}}
  13. </view>
  14. </picker>
  15. </view>
  16. <text class="Onlinestatus" style="background-color: white;color: red;">{{status}}</text>
  17. </view>
  18. <view class="loop">
  19. <text>回路:</text>
  20. <picker bindchange="bindPickerChange3" value="{{indexes}}" range="{{crr}}">
  21. <view class="loop-picker">
  22. {{crr[indexes]}}
  23. </view>
  24. </picker>
  25. </view>
  26. <!-- 旧设备 -->
  27. <view class="subject" wx:if="{{play == 0 ? true : false}}">
  28. <!-- 时控一 -->
  29. <view class="Time-control">
  30. <text style="left: 5%;top: 8%;">时</text>
  31. <text style="left: 5%;top: 32%;">控</text>
  32. <text style="left: 5%;top: 57%;">一</text>
  33. <text style="left: 15%;top: 8%;">开</text>
  34. <text style="left: 15%;top: 57%;">关</text>
  35. <switch style="top: 8%;zoom: {{zoom}};" bindchange="Controltime1" checked="{{state[0]}}"></switch>
  36. <switch style="top: 55%;zoom: {{zoom}};" bindchange="Controltime2" checked="{{state[1]}}"></switch>
  37. <picker mode="{{type1}}" value="{{time[0]}}" start="00:00" end="23:59" bindchange="bindTimeChange1">
  38. <view class="Timecontrol-picker-1" style="top: 8%;width: 18%;background-color: {{timecontrolcolor1}};color: {{fontcolor1}};">{{time[0]}}</view>
  39. </picker>
  40. <button class="Timecontrol-button-2" style="top: 8%;background-color: {{timecontrolcolor1}};color: {{fontcolor1}};"bindtap="change1">{{fixed1}}</button>
  41. <picker mode="{{type2}}" value="{{time[1]}}" start="00:00" end="23:59" bindchange="bindTimeChange2">
  42. <view class="Timecontrol-picker-1" style="top: 56%;width:18%;background-color: {{timecontrolcolor2}};color: {{fontcolor2}};"> {{time[1]}}</view>
  43. </picker>
  44. <button class="Timecontrol-button-2" style="top:56%;background-color: {{timecontrolcolor2}};color: {{fontcolor2}};"bindtap="change2">{{fixed2}}</button>
  45. </view>
  46. <!-- 时控二 -->
  47. <view class="Time-control" style="margin-top:0.4%">
  48. <text style="left: 5%;top: 8%;">时</text>
  49. <text style="left: 5%;top: 32%;">控</text>
  50. <text style="left: 5%;top: 57%;">二</text>
  51. <text style="left: 15%;top: 8%;">开</text>
  52. <text style="left: 15%;top: 57%;">关</text>
  53. <switch style="top: 8%;zoom: {{zoom}};" bindchange="Controltime3" checked="{{state1[0]}}"></switch>
  54. <switch style="top: 55%;zoom: {{zoom}};" bindchange="Controltime4" checked="{{state1[1]}}"></switch>
  55. <picker mode="{{type3}}" value="{{time[2]}}" start="00:00" end="23:59" bindchange="bindTimeChange3">
  56. <view class="Timecontrol-picker-1" style="top: 8%;width:18%;background-color: {{timecontrolcolor3}};color: {{fontcolor3}};font-size: {{sizes}}px;"> {{time[2]}}</view>
  57. </picker>
  58. <button class="Timecontrol-button-2" style="top: 8%;background-color: {{timecontrolcolor3}};color: {{fontcolor3}};"bindtap="change3">{{fixed3}}</button>
  59. <picker mode="{{type4}}" value="{{time[3]}}" start="00:00" end="23:59" bindchange="bindTimeChange4">
  60. <view class="Timecontrol-picker-1" style="top: 56%;width: 18%; background-color: {{timecontrolcolor4}};color: {{fontcolor4}};"> {{time[3]}}</view>
  61. </picker>
  62. <button class="Timecontrol-button-2" style="top: 56%;background-color: {{timecontrolcolor4}};color: {{fontcolor4}};"bindtap="change4">{{fixed4}}</button>
  63. </view>
  64. <!-- 日期调控 -->
  65. <view class="Date-Setting" style="margin-top:0.5%">
  66. <text style="left: 5%;top: 8%;">星</text>
  67. <text style="left: 5%;top: 50%;">期</text>
  68. <text style="left: 20%;top: 8%;">日</text>
  69. <text style="left: 32%;top: 8%;">一</text>
  70. <text style="left: 44%;top: 8%;">二</text>
  71. <text style="left: 56%;top: 8%;">三</text>
  72. <text style="left: 68%;top: 8%;">四</text>
  73. <text style="left: 80%;top: 8%;">五</text>
  74. <text style="left: 92%;top: 8%;">六</text>
  75. <image src="{{address[0]}}" bindtap="setbuty0" style="left: 19%;"></image>
  76. <image src="{{address[1]}}" bindtap="setbuty1" style="left: 31%;"></image>
  77. <image src="{{address[2]}}" bindtap="setbuty2" style="left: 43%;"></image>
  78. <image src="{{address[3]}}" bindtap="setbuty3" style="left: 55%;"></image>
  79. <image src="{{address[4]}}" bindtap="setbuty4" style="left: 67%;"></image>
  80. <image src="{{address[5]}}" bindtap="setbuty5" style="left: 79%;"></image>
  81. <image src="{{address[6]}}" bindtap="setbuty6" style="left: 91%;"></image>
  82. </view>
  83. <!-- 光控 -->
  84. <view class="Light-control" style="margin-top: 0.5%;">
  85. <text style="left: 5%;top: 20%;">光</text>
  86. <text style="left: 5%;top: 50%;">控</text>
  87. <text style="left: 15%;top: 8%;">开</text>
  88. <text style="left: 15%;top: 58%;">关</text>
  89. <switch style="top: 8%;zoom: {{zoom}};" bindchange="Controllight1" checked="{{state[2]}}"></switch>
  90. <switch style="top: 55%;zoom: {{zoom}};" bindchange="Controllight2" checked="{{state[3]}}"></switch>
  91. <text style="right: 35%;top: 9%;">小于</text>
  92. <text style="right: 35%;top: 55%;">大于</text>
  93. <picker bindchange="bindPickerChange1" value="{{index}}" range="{{arr}}" mode="{{select1}}">
  94. <view class="Light-control-picker" style="width: 28px;top: 9%;background-color: {{Lightcontrolcolor1}};color: {{fontcolor5}};">
  95. {{arr[index]}}
  96. </view>
  97. </picker>
  98. <picker bindchange="bindPickerChange2" value="{{indexs}}" range="{{brr}}" mode="{{select2}}">
  99. <view class="Light-control-picker" style="width: 28px;top: 55%;background-color: {{Lightcontrolcolor2}};color: {{fontcolor6}};">
  100. {{brr[indexs]}}
  101. </view>
  102. </picker>
  103. <text style="right: 5%;top: 9%;">开</text>
  104. <text style="right: 5%;top: 55%;">关</text>
  105. </view>
  106. <!-- 报警 -->
  107. <view class="warning" style="margin-top: 0.6%;">
  108. <text>报警</text>
  109. <view class="warning-control">
  110. <radio-group>
  111. <radio name="edu" checked="{{radio1}}" bindtap="Changestate1"/>强关
  112. <radio name="edu" checked="{{radio2}}" bindtap="Changestate2"/>强开
  113. <radio name="edu" checked="{{radio3}}" bindtap="Changestate3"/>无关联
  114. </radio-group>
  115. </view>
  116. </view>
  117. </view>
  118. <!-- 旧设备刷新存储数据 -->
  119. <view class="Refresh" wx:if="{{play == 0 ? true : false}}">
  120. <button class="Refresh-1" style="width: 28%" bindtap="RefreshPage">刷新页面</button>
  121. <button class="Refresh-2" style="width: 28%" bindtap="Storedata">存储数据</button>
  122. </view>
  123. <!-- 新设备 -->
  124. <view class="subject" wx:if="{{play == 1 ? true : false}}">
  125. <!-- 时控1 -->
  126. <view class="newtime1">
  127. <text style="left: 2%;top: 8%;">时</text>
  128. <text style="left: 2%;top: 32%;">控</text>
  129. <text style="left: 2%;top: 57%;">一</text>
  130. <text style="left: 15%; top: 15%;">开启时间</text>
  131. <text style="left: 15%;top:60%">关闭时间</text>
  132. <picker start="00:00" end="23:59" value="{{timeValue[0]}}" bindchange="bindTimeChange5"
  133. mode="time">
  134. <view class="startTime" style="background-color: blue;color:white;top:10%;left: 45%;">
  135. {{timeValue[0]}}</view>
  136. </picker>
  137. <picker start="00:00" end="23:59" value="{{timeValue[1]}}" bindchange="bindTimeChange6"
  138. mode="time">
  139. <view class="endTime" style="background-color: blue;color: white;top:55%;left: 45%;">
  140. {{timeValue[1]}}</view>
  141. </picker>
  142. <button class="control_model" style="top: 10%;" bindtap="openModal">{{openModal}}</button>
  143. <button class="control_model" style="top: 55%;" bindtap="shutModal">{{shutModal}}</button>
  144. </view>
  145. <!-- 时控2 -->
  146. <view class="newtime2">
  147. <text style="left: 2%;top: 8%;">时</text>
  148. <text style="left: 2%;top: 32%;">控</text>
  149. <text style="left: 2%;top: 57%;">二</text>
  150. <switch bindchange="Controltime6" checked="{{newSwitch[1]}}"></switch>
  151. <text style="left: 40%;">开启时间</text>
  152. <text style="left: 75%;">关闭时间</text>
  153. <picker start="00:00" end="23:59" value="{{timeValue[2]}}" bindchange="bindTimeChange7" mode="{{newSwitchstate[1]}}">
  154. <view class="startTime" style="background-color: {{newcolor[1]}};color:{{newfont[1]}}">
  155. {{timeValue[2]}}</view>
  156. </picker>
  157. <picker start="00:00" end="23:59" value="{{timeValue[3]}}" bindchange="bindTimeChange8" mode="{{newSwitchstate[1]}}">
  158. <view class="endTime" style="background-color: {{newcolor[1]}};color:{{newfont[1]}}">
  159. {{timeValue[3]}}</view>
  160. </picker>
  161. </view>
  162. <!-- 光控 -->
  163. <view class="newlight">
  164. <text style="left: 2%;top: 30%;">光</text>
  165. <text style="left: 2%;bottom: 30%;">控</text>
  166. <switch bindchange="Controltime7" checked="{{newSwitch[2]}}"></switch>
  167. <picker start="00:00" end="23:59" value="{{timeValue[4]}}" bindchange="bindTimeChange9" mode="{{newSwitchstate[2]}}">
  168. <view class="lightstartTime" style="background-color: {{newcolor[2]}};color:{{newfont[2]}}">
  169. {{timeValue[4]}}</view>
  170. </picker>
  171. <text style="left: 67%;top: 28%;">至</text>
  172. <picker start="00:00" end="23:59" value="{{timeValue[5]}}" bindchange="bindTimeChange10" mode="{{newSwitchstate[2]}}">
  173. <view class="lightendTime" style="background-color: {{newcolor[2]}};color:{{newfont[2]}}">
  174. {{timeValue[5]}}</view>
  175. </picker>
  176. <text style="top:5%;letter-spacing:10px">(生效时间)</text>
  177. <view class="conditions">
  178. <l-button shape="circle" size="medium" bindtap="Opening" disabled="{{disabled}}">选择开启条件</l-button>
  179. </view>
  180. </view>
  181. <l-dialog show="{{popup}}" title="开启条件" bind:linconfirm = "complete">
  182. <view class="check" wx:for="{{lightlist}}" wx:key="id">
  183. <checkbox checked="{{choice[index]}}" bindtap="{{'point' + (index + 1)}}">{{lightlist[index].name}}</checkbox>
  184. </view>
  185. </l-dialog>
  186. </view>
  187. <!-- 新设备刷新存储数据 -->
  188. <view class="Refresh" wx:if="{{play == 1 ? true : false}}">
  189. <button class="Refresh-1" style="width: 28%" bindtap="RefreshPage">刷新页面</button>
  190. <button class="Refresh-2" style="width: 28%" bindtap="Storedata">存储数据</button>
  191. </view>