123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- <!--pages/loop/loop.wxml-->
- <view class="switch-1">
- <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>
- <view class="Dropdown">
- <picker range="{{groupName}}" value="{{groupIndex}}" bindchange="changegroup">
- <view class="group">
- {{groupName[groupIndex]}}
- </view>
- </picker>
- <picker range="{{deviceName}}" value="{{deviceIndex}}" bindchange="changedevice">
- <view class="device">
- {{deviceName[deviceIndex]}}
- </view>
- </picker>
- </view>
- <text class="Onlinestatus" style="background-color: white;color: red;">{{status}}</text>
- </view>
- <view class="loop">
- <text>回路:</text>
- <picker bindchange="bindPickerChange3" value="{{indexes}}" range="{{crr}}">
- <view class="loop-picker">
- {{crr[indexes]}}
- </view>
- </picker>
- </view>
- <!-- 旧设备 -->
- <view class="subject" wx:if="{{play == 0 ? true : false}}">
- <!-- 时控一 -->
- <view class="Time-control">
- <text style="left: 5%;top: 8%;">时</text>
- <text style="left: 5%;top: 32%;">控</text>
- <text style="left: 5%;top: 57%;">一</text>
- <text style="left: 15%;top: 8%;">开</text>
- <text style="left: 15%;top: 57%;">关</text>
- <switch style="top: 8%;zoom: {{zoom}};" bindchange="Controltime1" checked="{{state[0]}}"></switch>
- <switch style="top: 55%;zoom: {{zoom}};" bindchange="Controltime2" checked="{{state[1]}}"></switch>
- <picker mode="{{type1}}" value="{{time[0]}}" start="00:00" end="23:59" bindchange="bindTimeChange1">
- <view class="Timecontrol-picker-1" style="top: 8%;width: 18%;background-color: {{timecontrolcolor1}};color: {{fontcolor1}};">{{time[0]}}</view>
- </picker>
- <button class="Timecontrol-button-2" style="top: 8%;background-color: {{timecontrolcolor1}};color: {{fontcolor1}};"bindtap="change1">{{fixed1}}</button>
- <picker mode="{{type2}}" value="{{time[1]}}" start="00:00" end="23:59" bindchange="bindTimeChange2">
- <view class="Timecontrol-picker-1" style="top: 56%;width:18%;background-color: {{timecontrolcolor2}};color: {{fontcolor2}};"> {{time[1]}}</view>
- </picker>
- <button class="Timecontrol-button-2" style="top:56%;background-color: {{timecontrolcolor2}};color: {{fontcolor2}};"bindtap="change2">{{fixed2}}</button>
- </view>
- <!-- 时控二 -->
- <view class="Time-control" style="margin-top:0.4%">
- <text style="left: 5%;top: 8%;">时</text>
- <text style="left: 5%;top: 32%;">控</text>
- <text style="left: 5%;top: 57%;">二</text>
- <text style="left: 15%;top: 8%;">开</text>
- <text style="left: 15%;top: 57%;">关</text>
- <switch style="top: 8%;zoom: {{zoom}};" bindchange="Controltime3" checked="{{state1[0]}}"></switch>
- <switch style="top: 55%;zoom: {{zoom}};" bindchange="Controltime4" checked="{{state1[1]}}"></switch>
- <picker mode="{{type3}}" value="{{time[2]}}" start="00:00" end="23:59" bindchange="bindTimeChange3">
- <view class="Timecontrol-picker-1" style="top: 8%;width:18%;background-color: {{timecontrolcolor3}};color: {{fontcolor3}};font-size: {{sizes}}px;"> {{time[2]}}</view>
- </picker>
- <button class="Timecontrol-button-2" style="top: 8%;background-color: {{timecontrolcolor3}};color: {{fontcolor3}};"bindtap="change3">{{fixed3}}</button>
- <picker mode="{{type4}}" value="{{time[3]}}" start="00:00" end="23:59" bindchange="bindTimeChange4">
- <view class="Timecontrol-picker-1" style="top: 56%;width: 18%; background-color: {{timecontrolcolor4}};color: {{fontcolor4}};"> {{time[3]}}</view>
- </picker>
- <button class="Timecontrol-button-2" style="top: 56%;background-color: {{timecontrolcolor4}};color: {{fontcolor4}};"bindtap="change4">{{fixed4}}</button>
- </view>
- <!-- 日期调控 -->
- <view class="Date-Setting" style="margin-top:0.5%">
- <text style="left: 5%;top: 8%;">星</text>
- <text style="left: 5%;top: 50%;">期</text>
- <text style="left: 20%;top: 8%;">日</text>
- <text style="left: 32%;top: 8%;">一</text>
- <text style="left: 44%;top: 8%;">二</text>
- <text style="left: 56%;top: 8%;">三</text>
- <text style="left: 68%;top: 8%;">四</text>
- <text style="left: 80%;top: 8%;">五</text>
- <text style="left: 92%;top: 8%;">六</text>
- <image src="{{address[0]}}" bindtap="setbuty0" style="left: 19%;"></image>
- <image src="{{address[1]}}" bindtap="setbuty1" style="left: 31%;"></image>
- <image src="{{address[2]}}" bindtap="setbuty2" style="left: 43%;"></image>
- <image src="{{address[3]}}" bindtap="setbuty3" style="left: 55%;"></image>
- <image src="{{address[4]}}" bindtap="setbuty4" style="left: 67%;"></image>
- <image src="{{address[5]}}" bindtap="setbuty5" style="left: 79%;"></image>
- <image src="{{address[6]}}" bindtap="setbuty6" style="left: 91%;"></image>
- </view>
- <!-- 光控 -->
- <view class="Light-control" style="margin-top: 0.5%;">
- <text style="left: 5%;top: 20%;">光</text>
- <text style="left: 5%;top: 50%;">控</text>
- <text style="left: 15%;top: 8%;">开</text>
- <text style="left: 15%;top: 58%;">关</text>
- <switch style="top: 8%;zoom: {{zoom}};" bindchange="Controllight1" checked="{{state[2]}}"></switch>
- <switch style="top: 55%;zoom: {{zoom}};" bindchange="Controllight2" checked="{{state[3]}}"></switch>
- <text style="right: 35%;top: 9%;">小于</text>
- <text style="right: 35%;top: 55%;">大于</text>
- <picker bindchange="bindPickerChange1" value="{{index}}" range="{{arr}}" mode="{{select1}}">
- <view class="Light-control-picker" style="width: 28px;top: 9%;background-color: {{Lightcontrolcolor1}};color: {{fontcolor5}};">
- {{arr[index]}}
- </view>
- </picker>
- <picker bindchange="bindPickerChange2" value="{{indexs}}" range="{{brr}}" mode="{{select2}}">
- <view class="Light-control-picker" style="width: 28px;top: 55%;background-color: {{Lightcontrolcolor2}};color: {{fontcolor6}};">
- {{brr[indexs]}}
- </view>
- </picker>
- <text style="right: 5%;top: 9%;">开</text>
- <text style="right: 5%;top: 55%;">关</text>
- </view>
- <!-- 报警 -->
- <view class="warning" style="margin-top: 0.6%;">
- <text>报警</text>
- <view class="warning-control">
- <radio-group>
- <radio name="edu" checked="{{radio1}}" bindtap="Changestate1"/>强关
- <radio name="edu" checked="{{radio2}}" bindtap="Changestate2"/>强开
- <radio name="edu" checked="{{radio3}}" bindtap="Changestate3"/>无关联
- </radio-group>
- </view>
- </view>
- </view>
- <!-- 旧设备刷新存储数据 -->
- <view class="Refresh" wx:if="{{play == 0 ? true : false}}">
- <button class="Refresh-1" style="width: 28%" bindtap="RefreshPage">刷新页面</button>
- <button class="Refresh-2" style="width: 28%" bindtap="Storedata">存储数据</button>
- </view>
- <!-- 新设备 -->
- <view class="subject" wx:if="{{play == 1 ? true : false}}">
- <!-- 时控1 -->
- <view class="newtime1">
- <text style="left: 2%;top: 8%;">时</text>
- <text style="left: 2%;top: 32%;">控</text>
- <text style="left: 2%;top: 57%;">一</text>
- <text style="left: 15%; top: 15%;">开启时间</text>
- <text style="left: 15%;top:60%">关闭时间</text>
- <picker start="00:00" end="23:59" value="{{timeValue[0]}}" bindchange="bindTimeChange5"
- mode="time">
- <view class="startTime" style="background-color: blue;color:white;top:10%;left: 45%;">
- {{timeValue[0]}}</view>
- </picker>
- <picker start="00:00" end="23:59" value="{{timeValue[1]}}" bindchange="bindTimeChange6"
- mode="time">
- <view class="endTime" style="background-color: blue;color: white;top:55%;left: 45%;">
- {{timeValue[1]}}</view>
- </picker>
- <button class="control_model" style="top: 10%;" bindtap="openModal">{{openModal}}</button>
- <button class="control_model" style="top: 55%;" bindtap="shutModal">{{shutModal}}</button>
- </view>
- <!-- 时控2 -->
- <view class="newtime2">
- <text style="left: 2%;top: 8%;">时</text>
- <text style="left: 2%;top: 32%;">控</text>
- <text style="left: 2%;top: 57%;">二</text>
- <switch bindchange="Controltime6" checked="{{newSwitch[1]}}"></switch>
- <text style="left: 40%;">开启时间</text>
- <text style="left: 75%;">关闭时间</text>
- <picker start="00:00" end="23:59" value="{{timeValue[2]}}" bindchange="bindTimeChange7" mode="{{newSwitchstate[1]}}">
- <view class="startTime" style="background-color: {{newcolor[1]}};color:{{newfont[1]}}">
- {{timeValue[2]}}</view>
- </picker>
- <picker start="00:00" end="23:59" value="{{timeValue[3]}}" bindchange="bindTimeChange8" mode="{{newSwitchstate[1]}}">
- <view class="endTime" style="background-color: {{newcolor[1]}};color:{{newfont[1]}}">
- {{timeValue[3]}}</view>
- </picker>
- </view>
- <!-- 光控 -->
- <view class="newlight">
- <text style="left: 2%;top: 30%;">光</text>
- <text style="left: 2%;bottom: 30%;">控</text>
- <switch bindchange="Controltime7" checked="{{newSwitch[2]}}"></switch>
- <picker start="00:00" end="23:59" value="{{timeValue[4]}}" bindchange="bindTimeChange9" mode="{{newSwitchstate[2]}}">
- <view class="lightstartTime" style="background-color: {{newcolor[2]}};color:{{newfont[2]}}">
- {{timeValue[4]}}</view>
- </picker>
- <text style="left: 67%;top: 28%;">至</text>
- <picker start="00:00" end="23:59" value="{{timeValue[5]}}" bindchange="bindTimeChange10" mode="{{newSwitchstate[2]}}">
- <view class="lightendTime" style="background-color: {{newcolor[2]}};color:{{newfont[2]}}">
- {{timeValue[5]}}</view>
- </picker>
- <text style="top:5%;letter-spacing:10px">(生效时间)</text>
- <view class="conditions">
- <l-button shape="circle" size="medium" bindtap="Opening" disabled="{{disabled}}">选择开启条件</l-button>
- </view>
- </view>
- <l-dialog show="{{popup}}" title="开启条件" bind:linconfirm = "complete">
- <view class="check" wx:for="{{lightlist}}" wx:key="id">
- <checkbox checked="{{choice[index]}}" bindtap="{{'point' + (index + 1)}}">{{lightlist[index].name}}</checkbox>
- </view>
- </l-dialog>
- </view>
- <!-- 新设备刷新存储数据 -->
- <view class="Refresh" wx:if="{{play == 1 ? true : false}}">
- <button class="Refresh-1" style="width: 28%" bindtap="RefreshPage">刷新页面</button>
- <button class="Refresh-2" style="width: 28%" bindtap="Storedata">存储数据</button>
- </view>
|