From 525abe200a71b6b941831162028153ce67497575 Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Sun, 21 Jul 2019 09:37:34 +0800 Subject: [PATCH] update Former-commit-id: 72c2d3348a786e675363c0475126aea9e9937c24 --- .../Infrastructure/ClientService.cs | 4 ++- .../Infrastructure/DeviceService.cs | 4 +-- .../Controllers/CameraController.cs | 6 ++-- .../Infrastructure/DeviceService.cs | 2 +- .../StreamingAssets/wwwroot/css/app.css | 4 +++ .../Assets/StreamingAssets/wwwroot/index.html | 26 +++++++++++++++++- .../Assets/StreamingAssets/wwwroot/js/app.js | Bin 55744 -> 57294 bytes 7 files changed, 38 insertions(+), 8 deletions(-) diff --git a/projects/IoT/IoT.Shared/Infrastructure/ClientService.cs b/projects/IoT/IoT.Shared/Infrastructure/ClientService.cs index 02abe588..c6154666 100644 --- a/projects/IoT/IoT.Shared/Infrastructure/ClientService.cs +++ b/projects/IoT/IoT.Shared/Infrastructure/ClientService.cs @@ -76,7 +76,9 @@ namespace IoT.Shared.Infrastructure try { Console.WriteLine("send device to server"); - this.ClientToServer("UpdateDevice", device.ToJson()); + var device2 = device.ToJson().FromJson(); + device2.Data.RemoveAll(o => o.Hidden); + this.ClientToServer("UpdateDevice", device2.ToJson()); } catch (Exception ex) { diff --git a/projects/IoT/IoTServices/FBeeService/Infrastructure/DeviceService.cs b/projects/IoT/IoTServices/FBeeService/Infrastructure/DeviceService.cs index cca0d2c0..0bbe32cf 100644 --- a/projects/IoT/IoTServices/FBeeService/Infrastructure/DeviceService.cs +++ b/projects/IoT/IoTServices/FBeeService/Infrastructure/DeviceService.cs @@ -549,9 +549,9 @@ namespace FBeeService device.AddorUpdateData(Keys.State, switchState == 0 ? "关" : (switchState == 1 ? "关" : "停"), DeviceDataType.String, "状态"); } var battery = ms.ReadByte(); - device.AddorUpdateData(Keys.Battery, battery, DeviceDataType.Int, Keys.Battery); + device.AddorUpdateData(Keys.Battery, battery, DeviceDataType.Int, Keys.Battery, hidden: true); var epCount = ms.ReadByte(); - device.AddorUpdateData(Keys.EndPointCount, battery, DeviceDataType.Int, Keys.EndPointCount); + device.AddorUpdateData(Keys.EndPointCount, battery, DeviceDataType.Int, Keys.EndPointCount, hidden: true); var historyData = ms.ReadHexString(4); device.AddorUpdateData(Keys.Data, historyData, DeviceDataType.String, Keys.Data, hidden: true); device.AddorUpdateData(Keys.ZoneType, zoneType, DeviceDataType.String, Keys.ZoneType, hidden: true); diff --git a/projects/IoT/IoTServices/ONVIFService/Controllers/CameraController.cs b/projects/IoT/IoTServices/ONVIFService/Controllers/CameraController.cs index 8e304006..ea5b923b 100644 --- a/projects/IoT/IoTServices/ONVIFService/Controllers/CameraController.cs +++ b/projects/IoT/IoTServices/ONVIFService/Controllers/CameraController.cs @@ -6,12 +6,12 @@ using System; namespace ONVIFService.Controllers { - [SwaggerTag("网关")] - public class GatewayController : BaseDeviceController + [SwaggerTag("摄像头")] + public class CameraController : BaseDeviceController { private readonly DeviceService _deviceService; - public GatewayController(IServiceProvider applicationServices, DeviceService deviceService) : base(applicationServices) + public CameraController(IServiceProvider applicationServices, DeviceService deviceService) : base(applicationServices) { this._deviceService = deviceService; } diff --git a/projects/IoT/IoTServices/ONVIFService/Infrastructure/DeviceService.cs b/projects/IoT/IoTServices/ONVIFService/Infrastructure/DeviceService.cs index 30d30852..9ac83c9b 100644 --- a/projects/IoT/IoTServices/ONVIFService/Infrastructure/DeviceService.cs +++ b/projects/IoT/IoTServices/ONVIFService/Infrastructure/DeviceService.cs @@ -181,7 +181,7 @@ namespace ONVIFService device.AddorUpdateData("HasAuth", hasAuth ? "是" : "否", DeviceDataType.String, "已认证"); device.AddorUpdateData("DeviceUrl", ipCamera.DeviceUrl, DeviceDataType.String, "设备地址"); device.AddorUpdateData("PtzAddress", ipCamera.PTZAddress, DeviceDataType.String, "云台地址"); - device.AddorUpdateData("Ptz3DZoomSupport", ipCamera.Ptz3DZoomSupport, DeviceDataType.String, "缩放支持"); + device.AddorUpdateData("Ptz3DZoomSupport", ipCamera.Ptz3DZoomSupport ? "是" : "否", DeviceDataType.String, "缩放支持"); device.AddorUpdateData("MainToken", ipCamera.Profiles.First().Token, DeviceDataType.String, "主码流Token"); device.AddorUpdateData("SubToken", ipCamera.Profiles.Last().Token, DeviceDataType.String, "子码流Token"); device.AddorUpdateData("MainStreamUri", ipCamera.MainStreamUri, DeviceDataType.String, "主码流地址"); diff --git a/projects/IoTClient/Assets/StreamingAssets/wwwroot/css/app.css b/projects/IoTClient/Assets/StreamingAssets/wwwroot/css/app.css index c1152a16..908d555f 100644 --- a/projects/IoTClient/Assets/StreamingAssets/wwwroot/css/app.css +++ b/projects/IoTClient/Assets/StreamingAssets/wwwroot/css/app.css @@ -83,6 +83,10 @@ form.device label{ line-height:34px; vertical-align:middle; } +video.video{ + width:100%; + height:100%; +} /*html5 input rang style*/ input[type=range] { -webkit-appearance: none; diff --git a/projects/IoTClient/Assets/StreamingAssets/wwwroot/index.html b/projects/IoTClient/Assets/StreamingAssets/wwwroot/index.html index b71a2cda..683f8d29 100644 --- a/projects/IoTClient/Assets/StreamingAssets/wwwroot/index.html +++ b/projects/IoTClient/Assets/StreamingAssets/wwwroot/index.html @@ -2,7 +2,7 @@ - + @@ -634,6 +634,30 @@ + +