diff --git a/docs/研发/思维导图/多种设备支持.xmind b/docs/研发/思维导图/多种设备支持.xmind new file mode 100644 index 00000000..7539a5ea Binary files /dev/null and b/docs/研发/思维导图/多种设备支持.xmind differ diff --git a/docs/研发/思维导图/物联网管控平台.xmind b/docs/研发/思维导图/物联网管控平台.xmind new file mode 100644 index 00000000..c5a2cbad Binary files /dev/null and b/docs/研发/思维导图/物联网管控平台.xmind differ diff --git a/projects/Infrastructure/Areas/Admin/Controllers/ConfigurationController.cs b/projects/Infrastructure/Areas/Admin/Controllers/ConfigurationController.cs index 667ab124..69a6bb7b 100644 --- a/projects/Infrastructure/Areas/Admin/Controllers/ConfigurationController.cs +++ b/projects/Infrastructure/Areas/Admin/Controllers/ConfigurationController.cs @@ -1,5 +1,6 @@ using System; using System.Linq; +using Infrastructure.Application; using Infrastructure.Configuration; using Infrastructure.Extensions; using Microsoft.AspNetCore.Authorization; @@ -97,6 +98,11 @@ namespace Infrastructure.Web.Mvc return View(model); } + public IActionResult Ajax(InputType type) + { + return PartialView("_Ajax", new EditEFConfigurationValueModel { Type = type }); + } + private static EFConfigurationContext GetContext() { var builder = new DbContextOptionsBuilder().UseSqlite("Data Source = configuration.db"); diff --git a/projects/Infrastructure/Areas/Admin/Views/Configuration/_Ajax.cshtml b/projects/Infrastructure/Areas/Admin/Views/Configuration/_Ajax.cshtml new file mode 100644 index 00000000..3f2b2621 --- /dev/null +++ b/projects/Infrastructure/Areas/Admin/Views/Configuration/_Ajax.cshtml @@ -0,0 +1,13 @@ +@model Infrastructure.Configuration.EditEFConfigurationValueModel +@{ + var template = Model.Type.HasValue ? Model.Type.ToString() : "Text"; +} +
+ +
+ @Html.EditorFor(o => o.Value, template) + @Html.ValidationMessageFor(o => o.Value) +
+
+
+
\ No newline at end of file diff --git a/projects/Infrastructure/Areas/Admin/Views/Configuration/_Form.cshtml b/projects/Infrastructure/Areas/Admin/Views/Configuration/_Form.cshtml index f59edc70..d7bf2ed8 100644 --- a/projects/Infrastructure/Areas/Admin/Views/Configuration/_Form.cshtml +++ b/projects/Infrastructure/Areas/Admin/Views/Configuration/_Form.cshtml @@ -6,54 +6,27 @@
@Html.AntiForgeryToken()
- @if (Model.Type.HasValue) - { -
- -
-
- @Html.HiddenFor(o => o.Type) - @Html.DisplayFor(o => o.Type) - @Html.ValidationMessageFor(o => o.Type) -
-
-
-
+
+ +
+ @Html.EditorFor(o => o.Type) + @Html.ValidationMessageFor(o => o.Type)
- } - else - { -
- -
- @Html.EditorFor(o => o.Type) - @Html.ValidationMessageFor(o => o.Type) -
-
-
+
- } - @if (Model.Type.HasValue) - { -
- -
- @Html.TextBoxFor(o => o.Id, new { @class = "form-control" }) - @Html.ValidationMessageFor(o => o.Id) -
-
-
+
+
+ +
+ @Html.EditorFor(o => o.Id, "Text") + @Html.ValidationMessageFor(o => o.Id)
-
- -
- @Html.EditorFor(o => o.Value, Model.Type.ToString()) - @Html.ValidationMessageFor(o => o.Value) -
-
-
+
- } +
+
+ @(await Html.PartialAsync("_Ajax", Model)) +
diff --git a/projects/Infrastructure/Areas/Admin/Views/Configuration/_Script.cshtml b/projects/Infrastructure/Areas/Admin/Views/Configuration/_Script.cshtml index 182a9f6d..c25ff8d3 100644 --- a/projects/Infrastructure/Areas/Admin/Views/Configuration/_Script.cshtml +++ b/projects/Infrastructure/Areas/Admin/Views/Configuration/_Script.cshtml @@ -1,7 +1,14 @@ \ No newline at end of file diff --git a/projects/IoTCenter/Views/Home/Index.cshtml b/projects/IoTCenter/Views/Home/Index.cshtml index 26ba48ca..0e9375e0 100644 --- a/projects/IoTCenter/Views/Home/Index.cshtml +++ b/projects/IoTCenter/Views/Home/Index.cshtml @@ -1,6 +1,9 @@ @{ HideBread = true; } +
+ +

diff --git a/projects/IoTCenter/iotcenter.db b/projects/IoTCenter/iotcenter.db index 04f99daa..e8bf0683 100644 Binary files a/projects/IoTCenter/iotcenter.db and b/projects/IoTCenter/iotcenter.db differ diff --git a/projects/IoTCenter/wwwroot/images/home.png b/projects/IoTCenter/wwwroot/images/home.png new file mode 100644 index 00000000..fbb57b92 Binary files /dev/null and b/projects/IoTCenter/wwwroot/images/home.png differ diff --git a/projects/IoTNode/iotnode.db b/projects/IoTNode/iotnode.db index fc91705c..1bca4e68 100644 Binary files a/projects/IoTNode/iotnode.db and b/projects/IoTNode/iotnode.db differ