Former-commit-id: 83734de59e34fc93ca97ebcdd7b8335259ecb304
TangShanKaiPing
wanggang 6 years ago
parent 8416e15862
commit 2fb1172e32

@ -509,7 +509,7 @@ namespace IoTNode.DeviceServices.Onvif
if (!string.IsNullOrEmpty(ptzAddress))
{
var deviceUrl = camera.GetDataValue("DeviceUrl");
RequestXml(ptzAddress, MessageTemplate.StopAction, String.Format(MessageTemplate.StopMessage, camera.GetDataValue("Token"), true, true), camera.UserName, camera.Password, GetOnoce(deviceUrl));
RequestXml(ptzAddress, MessageTemplate.StopAction, String.Format(MessageTemplate.StopMessage, camera.GetDataValue("ProfileToken"), true, true), camera.UserName, camera.Password, GetOnoce(deviceUrl));
}
}
}
@ -523,7 +523,7 @@ namespace IoTNode.DeviceServices.Onvif
if (!string.IsNullOrEmpty(ptzAddress))
{
var deviceUrl = camera.GetDataValue("DeviceUrl");
RequestXml(ptzAddress, MessageTemplate.ContinuousMoveAction, String.Format(MessageTemplate.ContinuousMoveMessage, camera.GetDataValue("Token"), zx, px, py), camera.UserName, camera.Password, GetOnoce(deviceUrl));
RequestXml(ptzAddress, MessageTemplate.ContinuousMoveAction, String.Format(MessageTemplate.ContinuousMoveMessage, camera.GetDataValue("ProfileToken"), zx, px, py), camera.UserName, camera.Password, GetOnoce(deviceUrl));
}
}
}

@ -35,7 +35,8 @@ namespace IoTNode.Controllers
});
}
public ApiResponse Test([SwaggerParameter("设备编号")]string number,
[HttpGet, Route("/[controller]/[action]"), SwaggerOperation("")]
public ApiResponse Test([SwaggerParameter("设备编号")]string number,
[SwaggerParameter("串口")]string port,
[SwaggerParameter("波特率")]int baud,
[SwaggerParameter("数据位")]int dataBits,

@ -75,6 +75,11 @@ Vue.component('iot-curtain', function (resolve, reject) {
resolve(parseModel(response));
});
});
Vue.component('iot-switch', function (resolve, reject) {
axios.get("/pages/iot/device/switch.html").then(function (response) {
resolve(parseModel(response));
});
});
Vue.component('iot-switch3', function (resolve, reject) {
axios.get("/pages/iot/device/switch3.html").then(function (response) {
resolve(parseModel(response));

@ -13,6 +13,7 @@
<iot-smoke v-else-if="device.name==='烟雾报警器'" v-bind:device="device"></iot-smoke>
<iot-person v-else-if="device.name==='人体感应器'" v-bind:device="device"></iot-person>
<iot-curtain v-else-if="device.name==='窗帘电机'" v-bind:device="device"></iot-curtain>
<iot-switch v-else-if="device.name==='一路开关'" v-bind:device="device"></iot-switch>
<iot-switch3 v-else-if="device.name==='三路开关'" v-bind:device="device"></iot-switch3>
<iot-socket v-else-if="device.name==='智能插座'" v-bind:device="device"></iot-socket>
<iot-ir v-else-if="device.name==='红外转发器'" v-bind:device="device" v-bind:edit="true"></iot-ir>

@ -42,21 +42,21 @@
<tr>
<td></td>
<td></td>
<td><img v-on:click="execApi(device.number,'/Camera/Up')" src="/IoTCenter/images/up.png" /></td>
<td><img v-on:click="execApi(device.number,'/Onvif/Up')" src="/IoTCenter/images/up.png" /></td>
<td></td>
<td></td>
</tr>
<tr>
<td><img v-on:click="execApi(device.number,'/Camera/Zoomin')" src="/IoTCenter/images/zoomin.png" /></td>
<td><img v-on:click="execApi(device.number,'/Camera/Left')" src="/IoTCenter/images/left.png" /></td>
<td><img v-on:click="execApi(device.number,'/Camera/Stop')" src="/IoTCenter/images/stop.png" /></td>
<td><img v-on:click="execApi(device.number,'/Camera/Right')" src="/IoTCenter/images/right.png" /></td>
<td><img v-on:click="execApi(device.number,'/Camera/Zoomout')" src="/IoTCenter/images/zoomout.png" /></td>
<td><img v-on:click="execApi(device.number,'/Onvif/Zoomin')" src="/IoTCenter/images/zoomin.png" /></td>
<td><img v-on:click="execApi(device.number,'/Onvif/Left')" src="/IoTCenter/images/left.png" /></td>
<td><img v-on:click="execApi(device.number,'/Onvif/Stop')" src="/IoTCenter/images/stop.png" /></td>
<td><img v-on:click="execApi(device.number,'/Onvif/Right')" src="/IoTCenter/images/right.png" /></td>
<td><img v-on:click="execApi(device.number,'/Onvif/Zoomout')" src="/IoTCenter/images/zoomout.png" /></td>
</tr>
<tr>
<td></td>
<td></td>
<td><img v-on:click="execApi(device.number,'/Camera/Down')" src="/IoTCenter/images/down.png" /></td>
<td><img v-on:click="execApi(device.number,'/Onvif/Down')" src="/IoTCenter/images/down.png" /></td>
<td></td>
<td></td>
</tr>

@ -0,0 +1,27 @@
<template>
<div class="card" style="box-sizing:border-box;height:150px;margin:10px;">
<div class="card-header">
{{device.displayName}}
<span class="float-right text-success" v-if="device.isOnline"><i class="ion ion-ios-wifi"></i></span>
<span class="float-right text-danger" v-else><i class="ion ion-ios-wifi"></i></span>
</div>
<div class="card-body">
<div class="row" style="height:100%;width:300px;margin: 0 auto;">
<div class="col-4 align-self-center">
<img class="mh-100" src="/IoTCenter/images/switch1.png" style="width:48px;" />
</div>
<div class="col-8 align-self-center">
<div class="row" style="line-height:28px;">
<img style="height:32px;" v-if="getDeviceDataValue(device,'状态')=='开'" v-on:click="execApi(device.number,'/Switch/Off')" src="/IoTCenter/images/on.png" />
<img style="height:32px;" v-if="getDeviceDataValue(device,'状态')=='关'" v-on:click="execApi(device.number,'/Switch/On')" src="/IoTCenter/images/off.png" />
</div>
</div>
</div>
</div>
</div>
</template>
<script>
({
props: ['device']
});
</script>

@ -4,7 +4,7 @@
<i class="ion ion-ios-arrow-back"></i>
</router-link>
<h1 class="weui-header-title">{{node.name}}</h1>
</div>
</div>
<!--场景-->
<div class="row" v-if="scenes.length">
<div class="col col-md-12">
@ -35,9 +35,9 @@
<div v-for="device in getDevices('人体感应器')" class="col" style="min-width:320px;">
<iot-person v-bind:device="device"></iot-person>
</div>
<!--</div>
<div class="col col-md-12 my-2 px-3">用电</div>
<div class="row">-->
<!--</div>
<div class="col col-md-12 my-2 px-3">用电</div>
<div class="row">-->
<!--调色灯-->
<div v-for="device in getDevices('调色灯')" class="col" style="min-width:320px;">
<iot-color-light v-bind:device="device"></iot-color-light>
@ -46,6 +46,11 @@
<div v-for="device in getDevices('窗帘电机')" class="col" style="min-width:320px;">
<iot-curtain v-bind:device="device"></iot-curtain>
</div>
<!--一路开关-->
<div v-for="device in getDevices('一路开关')" class="col" style="min-width:320px;">
<iot-switch v-bind:device="device"></iot-switch>
</div>
<!--三路开关-->
<div v-for="device in getDevices('三路开关')" class="col" style="min-width:320px;">
<iot-switch3 v-bind:device="device"></iot-switch3>

@ -30,6 +30,10 @@ http {
proxy_pass http://localhost:8030/;
}
location ^~ /live/ {
proxy_pass http://localhost:8080/live/;
}
location ^~ /UserCenter/ {
proxy_pass http://localhost:8010/UserCenter/;
}

Loading…
Cancel
Save