diff --git a/projects/Infrastructure/Views/Shared/DisplayTemplates/Boolean.cshtml b/projects/Infrastructure/Views/Shared/DisplayTemplates/Boolean.cshtml new file mode 100644 index 00000000..2841fffc --- /dev/null +++ b/projects/Infrastructure/Views/Shared/DisplayTemplates/Boolean.cshtml @@ -0,0 +1 @@ +@Html.CheckBox("", new { disabled = "disabled", style = "width:20px;height:20px;margin:2px 0;" }) \ No newline at end of file diff --git a/projects/Infrastructure/Views/Shared/DisplayTemplates/Object.cshtml b/projects/Infrastructure/Views/Shared/DisplayTemplates/Object.cshtml index 71641966..97abbe80 100644 --- a/projects/Infrastructure/Views/Shared/DisplayTemplates/Object.cshtml +++ b/projects/Infrastructure/Views/Shared/DisplayTemplates/Object.cshtml @@ -15,14 +15,7 @@ @Html.Label(prop.PropertyName, prop.GetDisplayName() + ":", new { @class = "col-sm-2 col-form-label" })
- @if (prop.UnderlyingOrModelType == typeof(bool)) - { - @Html.CheckBox(prop.PropertyName, new { disabled = "disabled", style = "width:20px;height:20px;margin:2px 0;" }) - } - else - { - @Html.Display(prop.PropertyName, uihit) - } + @Html.Display(prop.PropertyName, uihit)
diff --git a/projects/IoT.Shared/Application/Models/EditNodeModel.cs b/projects/IoT.Shared/Application/Models/EditNodeModel.cs index ab47b835..618cc058 100644 --- a/projects/IoT.Shared/Application/Models/EditNodeModel.cs +++ b/projects/IoT.Shared/Application/Models/EditNodeModel.cs @@ -29,6 +29,7 @@ namespace IoT.Shared.Application.Models public string Image { get; set; } [Display(Name = "版本")] + [ReadOnly(true)] public string Version { get; set; } [Display(Name = "序号")] diff --git a/projects/IoT.Shared/Areas/IoTCenter/Controlls/IoTGatewayController.cs b/projects/IoT.Shared/Areas/IoTCenter/Controlls/IoTGatewayController.cs index b86057ca..5f34eab1 100644 --- a/projects/IoT.Shared/Areas/IoTCenter/Controlls/IoTGatewayController.cs +++ b/projects/IoT.Shared/Areas/IoTCenter/Controlls/IoTGatewayController.cs @@ -6,7 +6,6 @@ using IoT.Shared.Application.Domain.Entities; using IoT.Shared.Application.Models; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Linq; diff --git a/projects/IoTNode/db.sql b/projects/IoTNode/db.sql index c3301d39..b71b28f4 100644 --- a/projects/IoTNode/db.sql +++ b/projects/IoTNode/db.sql @@ -249,6 +249,8 @@ CREATE INDEX "IX_iot_RolePermission_PermissionId" ON "iot_RolePermission" ("Perm CREATE UNIQUE INDEX "IX_iot_RolePermission_RoleId_PermissionId" ON "iot_RolePermission" ("RoleId", "PermissionId"); +CREATE UNIQUE INDEX "IX_iot_Setting_Name" ON "iot_Setting" ("Name"); + CREATE UNIQUE INDEX "IX_iot_User_Email" ON "iot_User" ("Email"); CREATE UNIQUE INDEX "IX_iot_User_UserName" ON "iot_User" ("UserName");