|
|
|
@ -114,6 +114,10 @@
|
|
|
|
|
|
|
|
|
|
.card-header img {
|
|
|
|
|
height: 24px;
|
|
|
|
|
vertical-align:middle;
|
|
|
|
|
}
|
|
|
|
|
.card-content img{
|
|
|
|
|
width:32px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<template v-if="model">
|
|
|
|
@ -259,21 +263,21 @@
|
|
|
|
|
<tr>
|
|
|
|
|
<td></td>
|
|
|
|
|
<td></td>
|
|
|
|
|
<td><img class="ajax camera" data-cmd="Up" :src="server+'/IoTCenter/images/up.png'" /></td>
|
|
|
|
|
<td><img class="ajax camera" data-cmd="Up" :src="iotCenter+'/images/up.png'" /></td>
|
|
|
|
|
<td></td>
|
|
|
|
|
<td></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><img class="ajax camera" data-cmd="Zoomin" :src="server+'/IoTCenter/images/zoomin.png'" /></td>
|
|
|
|
|
<td><img class="ajax camera" data-cmd="Left" :src="server+'/IoTCenter/images/left.png'" /></td>
|
|
|
|
|
<td><img class="ajax camera" data-cmd="Stop" :src="server+'/IoTCenter/images/stop.png'" /></td>
|
|
|
|
|
<td><img class="ajax camera" data-cmd="Right" :src="server+'/IoTCenter/images/right.png'" /></td>
|
|
|
|
|
<td><img class="ajax camera" data-cmd="Zoomout" :src="server+'/IoTCenter/images/zoomout.png'" /></td>
|
|
|
|
|
<td><img class="ajax camera" data-cmd="Zoomin" :src="iotCenter+'/images/zoomin.png'" /></td>
|
|
|
|
|
<td><img class="ajax camera" data-cmd="Left" :src="iotCenter+'/images/left.png'" /></td>
|
|
|
|
|
<td><img class="ajax camera" data-cmd="Stop" :src="iotCenter+'/images/stop.png'" /></td>
|
|
|
|
|
<td><img class="ajax camera" data-cmd="Right" :src="iotCenter+'/images/right.png'" /></td>
|
|
|
|
|
<td><img class="ajax camera" data-cmd="Zoomout" :src="iotCenter+'/images/zoomout.png'" /></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td></td>
|
|
|
|
|
<td></td>
|
|
|
|
|
<td><img class="ajax camera" data-cmd="Down" :src="server+'/IoTCenter/images/down.png'" /></td>
|
|
|
|
|
<td><img class="ajax camera" data-cmd="Down" :src="iotCenter+'/images/down.png'" /></td>
|
|
|
|
|
<td></td>
|
|
|
|
|
<td></td>
|
|
|
|
|
</tr>
|
|
|
|
@ -480,6 +484,103 @@
|
|
|
|
|
</f7-tabs>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!--电器-->
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-50" v-for="device in GetDevices('一路开关')" :data-device-number="device.Number">
|
|
|
|
|
<div class="card">
|
|
|
|
|
<div>
|
|
|
|
|
<img :src="iotCenter+'/images/switch.png'" />
|
|
|
|
|
<label>{{device.DisplayName||device.Name}}</label>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-content card-content-padding">
|
|
|
|
|
<img v-if="GetDataValue(device.Number,'L1状态')=='开'" v-on:click="CallApi(device.Number,'/Switch/L1Off')" :src="iotCenter+'/images/on.png'" />
|
|
|
|
|
<img v-if="GetDataValue(device.Number,'L1状态')=='关'" v-on:click="CallApi(device.Number,'/Switch/L1On')" :src="iotCenter+'/images/off.png'" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-50" v-for="device in GetDevices('二路开关')" :data-device-number="device.Number">
|
|
|
|
|
<div class="card">
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
<div>
|
|
|
|
|
<img :src="iotCenter+'/images/switch2.png'" />
|
|
|
|
|
<label>{{device.DisplayName||device.Name}}</label>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<button class="button button-raised" v-on:click="CallApi(device.Number,'/Switch2/On')" :data-node-number="model.Number">一键开</button>
|
|
|
|
|
<button class="button button-raised" v-on:click="CallApi(device.Number,'/Switch2/Off')" :data-node-number="model.Number">一键关</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-content card-content-padding text-align-center">
|
|
|
|
|
<img v-if="GetDataValue(device.Number,'L1状态')=='开'" v-on:click="CallApi(device.Number,'/Switch2/L1Off')" :src="iotCenter+'/images/on.png'" />
|
|
|
|
|
<img v-if="GetDataValue(device.Number,'L1状态')=='关'" v-on:click="CallApi(device.Number,'/Switch2/L1On')" :src="iotCenter+'/images/off.png'" />
|
|
|
|
|
<img v-if="GetDataValue(device.Number,'L2状态')=='开'" v-on:click="CallApi(device.Number,'/Switch2/L2Off')" :src="iotCenter+'/images/on.png'" />
|
|
|
|
|
<img v-if="GetDataValue(device.Number,'L2状态')=='关'" v-on:click="CallApi(device.Number,'/Switch2/L2On')" :src="iotCenter+'/images/off.png'" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-50" v-for="device in GetDevices('三路开关')" :data-device-number="device.Number">
|
|
|
|
|
<div class="card">
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
<div>
|
|
|
|
|
<img :src="iotCenter+'/images/switch3.png'" />
|
|
|
|
|
<label>{{device.DisplayName||device.Name}}</label>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<label class="button button-raised" v-on:click="CallApi(device.Number,'/Switch3/On')" :data-node-number="model.Number">一键开</label>
|
|
|
|
|
<label class="button button-raised" v-on:click="CallApi(device.Number,'/Switch3/Off')" :data-node-number="model.Number">一键关</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-content card-content-padding text-align-center">
|
|
|
|
|
<img v-if="GetDataValue(device.Number,'L1状态')=='开'" v-on:click="CallApi(device.Number,'/Switch3/L1Off')" :src="iotCenter+'/images/on.png'" />
|
|
|
|
|
<img v-if="GetDataValue(device.Number,'L1状态')=='关'" v-on:click="CallApi(device.Number,'/Switch3/L1On')" :src="iotCenter+'/images/off.png'" />
|
|
|
|
|
<img v-if="GetDataValue(device.Number,'L2状态')=='开'" v-on:click="CallApi(device.Number,'/Switch3/L2Off')" :src="iotCenter+'/images/on.png'" />
|
|
|
|
|
<img v-if="GetDataValue(device.Number,'L2状态')=='关'" v-on:click="CallApi(device.Number,'/Switch3/L2On')" :src="iotCenter+'/images/off.png'" />
|
|
|
|
|
<img v-if="GetDataValue(device.Number,'L3状态')=='开'" v-on:click="CallApi(device.Number,'/Switch3/L3Off')" :src="iotCenter+'/images/on.png'" />
|
|
|
|
|
<img v-if="GetDataValue(device.Number,'L3状态')=='关'" v-on:click="CallApi(device.Number,'/Switch3/L3On')" :src="iotCenter+'/images/off.png'" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-50" v-for="device in GetDevices('插座')" :data-device-number="device.Number">
|
|
|
|
|
<div class="card">
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
<div><img :src="iotCenter+'/images/socket.png'" /><label>{{device.DisplayName||device.Name}}</label></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-content card-content-padding text-align-center">
|
|
|
|
|
<img v-if="GetDataValue(device.Number,'状态')==='开'" v-on:click="CallApi(device.Number,'/Socket/Off')" :src="iotCenter+'/images/on.png'" :data-status="GetDataValue(device.Number,'状态')" />
|
|
|
|
|
<img v-if="GetDataValue(device.Number,'状态')==='关'" v-on:click="CallApi(device.Number,'/Socket/On')" :src="iotCenter+'/images/off.png'" :data-status="GetDataValue(device.Number,'状态')" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-50" v-for="device in GetDevices('智能插座')" :data-device-number="device.Number">
|
|
|
|
|
<div class="card">
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
<div><img :src="iotCenter+'/images/socket.png'" /><label>{{device.DisplayName||device.Name}}</label></div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
{{parseFloat(GetDataValue(device.Number,'电量')).toFixed(2)}} kWh
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-content card-content-padding text-align-center">
|
|
|
|
|
<img v-if="GetDataValue(device.Number,'状态')==='开'" v-on:click="CallApi(device.Number,'/Socket/Off')" :src="iotCenter+'/images/on.png'" :data-status="GetDataValue(device.Number,'状态')" />
|
|
|
|
|
<img v-if="GetDataValue(device.Number,'状态')==='关'" v-on:click="CallApi(device.Number,'/Socket/On')" :src="iotCenter+'/images/off.png'" :data-status="GetDataValue(device.Number,'状态')" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-50" v-for="device in GetDevices('窗帘')" :data-device-number="device.Number">
|
|
|
|
|
<div class="card">
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
<div><img :src="iotCenter+'/images/curtain.png'" /><label>{{device.DisplayName||device.Name}}</label></div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
{{GetDataValue(device.Number,'状态')}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-content card-content-padding text-align-center">
|
|
|
|
|
<img v-on:click="CallApi(device.Number,'/Curtain/On')" :src="iotCenter+'/images/left.png'" />
|
|
|
|
|
<img v-on:click="CallApi(device.Number,'/Curtain/Stop')" :src="iotCenter+'/images/stop.png'" />
|
|
|
|
|
<img v-on:click="CallApi(device.Number,'/Curtain/Off')" :src="iotCenter+'/images/right.png'" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</div>
|
|
|
|
|
</f7-page>
|
|
|
|
|