diff --git a/projects/Platform/Controllers/HomeController.cs b/projects/Platform/Controllers/HomeController.cs index 166e5f63..9a58726d 100644 --- a/projects/Platform/Controllers/HomeController.cs +++ b/projects/Platform/Controllers/HomeController.cs @@ -27,11 +27,19 @@ namespace Platform.Controllers this._statisticRepo = statisticRepo; } - [Authorize] public IActionResult Index() { return View(); } + public IActionResult Building() + { + return View(); + } + + public IActionResult Alarm() + { + return View(); + } public string Mac(string id) { diff --git a/projects/Platform/Views/Home/Building.cshtml b/projects/Platform/Views/Home/Building.cshtml index 567216c6..816505fd 100644 --- a/projects/Platform/Views/Home/Building.cshtml +++ b/projects/Platform/Views/Home/Building.cshtml @@ -1,237 +1,25 @@ -@model Platform.ViewModels.HomeModel -@{ +@{ HideBread = true; -} -
-
-
-
-
- 组织机构 -
-
-
-
    - @RenderOrgans(Model.Organs) -
-
-
-
-
-
-
-
-
- 当前: - @Model.Organ.GetDisplayName() - @if (Model.BuildingId.HasValue) - { - / @Model.Building.GetDisplayName() - } -
-
-
-
-
-
-
-
- 光照 -
-
-

最大值:@(Model.MaxLight.HasValue?$"{Model.MaxLight.Value} Lux":"无设备")

-

最小值:@(Model.MinLight.HasValue?$"{Model.MinLight.Value} Lux":"无设备")

-
-
-
-
-
-
- 温度 -
-
-

最大值:@(Model.MaxTemperatures.HasValue?$"{Model.MaxTemperatures.Value.ToString("f2")} ℃":"无设备")

-

最小值:@(Model.MinTemperaturest.HasValue?$"{Model.MinTemperaturest.Value.ToString("f2")} ℃":"无设备")

-
-
-
-
-
-
- 湿度 -
-
-

最大值:@(Model.MaxHumidity.HasValue?$"{Model.MaxHumidity.Value.ToString("f2")} RH%" :"无设备")

-

最小值:@(Model.MinHumidity.HasValue?$"{Model.MinHumidity.Value.ToString("f2")} RH%" :"无设备")

-
-
-
-
-
-
- 用电 -
-
-

开:@(Model.Open.HasValue?$"{Model.Open.Value}":"无设备")

-

关:@(Model.Close.HasValue?$"{Model.Close.Value}":"无设备")

-
-
-
-
-
- @if (Model.Scenes.Any()) - { -
-
建筑场景
-
-
- @foreach (var item in Model.Scenes) - { - - } -
-
-
- } - @if (Model.Buildings.Any()) - {
-
下级建筑
-
-
- @foreach (var item in Model.Buildings) - { -
-
-
- @item.Name - @*
-
-
*@ -
- @item.Name -
-
-
- } -
-
-
- } -
-
-
设备
-
- -
-
- @if (Model.Deviceses.Any()) - { -
-
- @foreach (var item in Model.Deviceses.OrderBy(o => o.IoTProductId)) - { - try - { - @await Html.PartialAsync($"/Views/Shared/Device/{item.Icon}.cshtml", item) - } - catch - { - @await Html.PartialAsync($"/Views/Shared/Device/default.cshtml", item) - } - } -
-
- @if (Model.PageCount() > 1) - { - + + @section scripts{ + + + + + + } -} - -@section scripts{ - - } \ No newline at end of file diff --git a/projects/Platform/Views/Home/Device.cshtml b/projects/Platform/Views/Home/Device.cshtml deleted file mode 100644 index e72e0b5d..00000000 --- a/projects/Platform/Views/Home/Device.cshtml +++ /dev/null @@ -1,169 +0,0 @@ -@section bread{ - -} -
- -
-@section styles{ - -} -@section scripts{ - - - - - - - -} \ No newline at end of file diff --git a/projects/Platform/Views/Home/Product.cshtml b/projects/Platform/Views/Home/Product.cshtml deleted file mode 100644 index 2fff1d94..00000000 --- a/projects/Platform/Views/Home/Product.cshtml +++ /dev/null @@ -1,162 +0,0 @@ -@{ - HideBread = true; -} -
- -@section scripts{ - - - - - - -} \ No newline at end of file diff --git a/projects/Platform/Views/Home/Test.cshtml b/projects/Platform/Views/Home/Test.cshtml deleted file mode 100644 index 976c573f..00000000 --- a/projects/Platform/Views/Home/Test.cshtml +++ /dev/null @@ -1,23 +0,0 @@ -@section scripts{ - -} \ No newline at end of file diff --git a/projects/Platform/Views/Shared/_Layout.cshtml b/projects/Platform/Views/Shared/_Layout.cshtml index 52b02ca8..52d2f4f9 100644 --- a/projects/Platform/Views/Shared/_Layout.cshtml +++ b/projects/Platform/Views/Shared/_Layout.cshtml @@ -159,8 +159,8 @@
- - + + diff --git a/projects/Platform/wwwroot/components/views/areas/default/data.vue b/projects/Platform/wwwroot/components/views/areas/default/data.vue index 071e65b5..964e6ea1 100644 --- a/projects/Platform/wwwroot/components/views/areas/default/data.vue +++ b/projects/Platform/wwwroot/components/views/areas/default/data.vue @@ -101,7 +101,6 @@ return moment(value).format('YYYY-MM-DD HH:mm:ss.SSS'); }, getValue(value) { - var output; if (this.model.query.enumValues) { return JSON.parse(this.model.query.enumValues)[value] || value; } diff --git a/projects/Platform/wwwroot/js/app.js b/projects/Platform/wwwroot/js/app.js index 31aeb42e..84580e26 100644 --- a/projects/Platform/wwwroot/js/app.js +++ b/projects/Platform/wwwroot/js/app.js @@ -139,7 +139,7 @@ function getIoTDataValue(device, name) { return null; }; Vue.prototype.getIoTDataValue = getIoTDataValue; - +Vue.prototype.moment = moment; function getIoTDataUnit(device, name) { var data = Enumerable.from(device.data).where(o => o.name === name).firstOrDefault(); if (data) {