Former-commit-id: 9c01add727141fee1f2b3a1663c05fd176ed0a46 Former-commit-id: 05e0421927918440eaa94f3762a889d4b4759f4d1.0
parent
d58b91f828
commit
9a56a32e33
@ -1,18 +1,22 @@
|
|||||||
using Infrastructure.Application;
|
using Infrastructure.Application;
|
||||||
using IoT.Shared.Application.Domain.Entities;
|
using IoT.Shared.Application.Domain.Entities;
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace IoT.Shared.Application.Models
|
namespace IoT.Shared.Application.Models
|
||||||
{
|
{
|
||||||
[Display(Name = "数据")]
|
[Display(Name = "数据")]
|
||||||
public class EditDataModel : EditModel
|
public class EditIoTDataModel : EditModel
|
||||||
{
|
{
|
||||||
|
[ReadOnlyForEdit]
|
||||||
|
[Display(Name = "产品")]
|
||||||
|
[SelectList]
|
||||||
|
public Guid? ProductId { get; set; }
|
||||||
|
|
||||||
[Display(Name = "网关")]
|
[Display(Name = "网关")]
|
||||||
[ReadOnlyForEdit]
|
[ReadOnlyForEdit]
|
||||||
[SelectList(nameof(DeviceId), "GetIoTDevice")]
|
[SelectList(nameof(DeviceId), "GetIoTDevice")]
|
||||||
public Guid? IoTGatewayId { get; set; }
|
public Guid? NodeId { get; set; }
|
||||||
|
|
||||||
[Display(Name = "设备")]
|
[Display(Name = "设备")]
|
||||||
[ReadOnlyForEdit]
|
[ReadOnlyForEdit]
|
@ -1,10 +0,0 @@
|
|||||||
<script>
|
|
||||||
$('#Query_NodeId').change(function () {
|
|
||||||
var id = $(this).find(':selected').val();
|
|
||||||
update('@Url.Action("GetIoTDevice", "Ajax",new { area=""})', id, "#Query_DeviceId");
|
|
||||||
});
|
|
||||||
$('#NodeId').change(function () {
|
|
||||||
var id = $(this).find(':selected').val();
|
|
||||||
update('@Url.Action("GetIoTDevice", "Ajax",new { area=""})', id, "#DeviceId");
|
|
||||||
});
|
|
||||||
</script>
|
|
@ -1,10 +0,0 @@
|
|||||||
<script>
|
|
||||||
$('#Query_ProductId').change(function () {
|
|
||||||
var id = $(this).find(':selected').val();
|
|
||||||
update('@Url.Action("GetIoTApi", "Ajax",new { area=""})', id, "#Query_ApiId");
|
|
||||||
});
|
|
||||||
$('#ProductId').change(function () {
|
|
||||||
var id = $(this).find(':selected').val();
|
|
||||||
update('@Url.Action("GetIoTApi", "Ajax",new { area=""})', id, "#ApiId");
|
|
||||||
});
|
|
||||||
</script>
|
|
@ -0,0 +1,25 @@
|
|||||||
|
using IoT.Shared.Application.Models;
|
||||||
|
using System;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace Platform.Application.Models.IoTCenter
|
||||||
|
{
|
||||||
|
[Display(Name = "数据")]
|
||||||
|
public class EditPlatformIoTDataModel : EditIoTDataModel
|
||||||
|
{
|
||||||
|
[Display(Name = "机构")]
|
||||||
|
[SelectList(nameof(BuildingId), "GetBuilding")]
|
||||||
|
[ReadOnlyForEdit]
|
||||||
|
public Guid? OrganId { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "建筑")]
|
||||||
|
[SelectList(nameof(NodeId), "GetIoTGateway")]
|
||||||
|
[ReadOnlyForEdit]
|
||||||
|
public Guid? BuildingId { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "分类")]
|
||||||
|
[ReadOnlyForEdit]
|
||||||
|
[SelectList(nameof(ProductId), "GetIoTProductByCategory")]
|
||||||
|
public Guid? CategoryId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue