diff --git a/projects/IoT.Shared/Application/Models/DataKeys.cs b/projects/IoT.Shared/Application/Models/DataKeys.cs index 8663a992..555c8832 100644 --- a/projects/IoT.Shared/Application/Models/DataKeys.cs +++ b/projects/IoT.Shared/Application/Models/DataKeys.cs @@ -8,7 +8,7 @@ namespace IoT.Shared.Application.Models [IoTDataConfig( IoTDataType.Info,IoTValueType.Int,hide:true)] [Display(Name = "设备分类")] DeviceId, - [IoTDataConfig(valueType: IoTValueType.Array)] + [IoTDataConfig(IoTDataType.Info,valueType: IoTValueType.Array)] [Display(Name = "指令")] Buttons, [IoTDataConfig(IoTDataType.Info)] @@ -149,10 +149,10 @@ namespace IoT.Shared.Application.Models [IoTDataConfig(valueType: IoTValueType.Int, unit: "μg/m³")] [Display(Name = "PM1.0")] PM10, - [IoTDataConfig(valueType: IoTValueType.Double)] + [IoTDataConfig(IoTDataType.Info,IoTValueType.Double)] [Display(Name = "电量")] Battery, - [IoTDataConfig(valueType: IoTValueType.Int, enumValues: "正常,欠压")] + [IoTDataConfig(IoTDataType.Info,valueType: IoTValueType.Int, enumValues: "正常,欠压")] [Display(Name = "电压低")] LowVoltage, [Display(Name = "状态")] diff --git a/projects/Platform/Api/DeviceController.cs b/projects/Platform/Api/DeviceController.cs index 4d8c8baa..2a02f85c 100644 --- a/projects/Platform/Api/DeviceController.cs +++ b/projects/Platform/Api/DeviceController.cs @@ -46,6 +46,7 @@ namespace Platform.Api.Api .WhereIf(model.BuildingId.HasValue, o => o.IoTGateway.BuildingId == model.BuildingId.Value) .WhereIf(model.CategoryId.HasValue, o => o.IoTProduct.IoTProductCategoryId == model.CategoryId.Value) .WhereIf(!string.IsNullOrWhiteSpace(model.Name), o => o.Name.Contains(model.Name) || o.DisplayName.Contains(model.Name)) + .Include(o=>o.Data) .Include(o => o.IoTProduct.IoTProductCategory) .Include(o => o.IoTGateway.Building); model.TotalCount = query.Count(); diff --git a/projects/Platform/Views/Shared/_Layout.cshtml b/projects/Platform/Views/Shared/_Layout.cshtml index 433de9a1..c6e3e358 100644 --- a/projects/Platform/Views/Shared/_Layout.cshtml +++ b/projects/Platform/Views/Shared/_Layout.cshtml @@ -164,7 +164,6 @@ - diff --git a/projects/Platform/libman.json b/projects/Platform/libman.json index 792a2801..fd64c090 100644 --- a/projects/Platform/libman.json +++ b/projects/Platform/libman.json @@ -51,11 +51,6 @@ "destination": "wwwroot/lib/axios/", "files": [ "axios.min.js" ] }, - { - "library": "qs@6.9.4", - "destination": "wwwroot/lib/qs", - "files": [ "qs.min.js" ] - }, { "library": "lodash.js@4.17.15", "destination": "wwwroot/lib/lodash/", diff --git a/projects/Platform/wwwroot/components/views/areas/default/device.vue b/projects/Platform/wwwroot/components/views/areas/default/device.vue index ebae60ea..41cd70b0 100644 --- a/projects/Platform/wwwroot/components/views/areas/default/device.vue +++ b/projects/Platform/wwwroot/components/views/areas/default/device.vue @@ -1,13 +1,32 @@ \ No newline at end of file diff --git a/projects/Platform/wwwroot/components/views/areas/default/devices.vue b/projects/Platform/wwwroot/components/views/areas/default/devices.vue index a5e8b364..c8aa9755 100644 --- a/projects/Platform/wwwroot/components/views/areas/default/devices.vue +++ b/projects/Platform/wwwroot/components/views/areas/default/devices.vue @@ -124,9 +124,6 @@ } return ''; } - }, - beforeDestroy: function () { - unsubscribe(); } } \ No newline at end of file diff --git a/projects/Platform/wwwroot/components/views/shared/layout.vue b/projects/Platform/wwwroot/components/views/shared/layout.vue index 4e35e019..089b1d9a 100644 --- a/projects/Platform/wwwroot/components/views/shared/layout.vue +++ b/projects/Platform/wwwroot/components/views/shared/layout.vue @@ -112,8 +112,6 @@ } }, mounted: function () { - console.log(this.$store.state.version); - var vm = this; axios.post(this.url).then(function (response) { store.set('layout', response.data); }).catch(function (error) { diff --git a/projects/Platform/wwwroot/index.html b/projects/Platform/wwwroot/index.html index ae64b0f9..b9dccc04 100644 --- a/projects/Platform/wwwroot/index.html +++ b/projects/Platform/wwwroot/index.html @@ -49,9 +49,8 @@ - - + diff --git a/projects/Platform/wwwroot/lib/qs/qs.min.js b/projects/Platform/wwwroot/lib/qs/qs.min.js deleted file mode 100644 index f08e6914..00000000 --- a/projects/Platform/wwwroot/lib/qs/qs.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Qs=e()}(function(){return function i(a,l,c){function s(t,e){if(!l[t]){if(!a[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(f)return f(t,!0);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}var n=l[t]={exports:{}};a[t][0].call(n.exports,function(e){return s(a[t][1][e]||e)},n,n.exports,i,a,l,c)}return l[t].exports}for(var f="function"==typeof require&&require,e=0;e>6]+s[128|63&a]:a<55296||57344<=a?n+=s[224|a>>12]+s[128|a>>6&63]+s[128|63&a]:(i+=1,a=65536+((1023&a)<<10|1023&o.charCodeAt(i)),n+=s[240|a>>18]+s[128|a>>12&63]+s[128|a>>6&63]+s[128|63&a])}return n},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(f(e)){for(var r=[],o=0;o