Former-commit-id: b8acc1b3b42f2fa202654c7df9a089f79b10226e
Former-commit-id: 62e3d5893bf8438a5108578d815d77cfd5efbc50
1.0
wanggang 5 years ago
parent 6a42c223b3
commit fc07612a5b

@ -2,9 +2,6 @@ using Infrastructure.Domain;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text.Encodings.Web;
using System.Text.Json;
using System.Text.Unicode;
namespace Application.Domain.Entities
{
@ -23,7 +20,7 @@ namespace Application.Domain.Entities
[Display(Name = "名称")]
public string Name { get; set; }
[Display(Name = "数据")]
[Display(Name = "数据类")]
public IoTDataType DataType { get; set; }
[Display(Name = "数值类型")]

@ -1,9 +1,9 @@
using Infrastructure.Application;
using Application.Domain.Entities;
using Infrastructure.Application;
using IoT.Shared.Areas.IoTCenter.Controlls;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace IoT.Shared.Application.Models
{
@ -38,11 +38,14 @@ namespace IoT.Shared.Application.Models
[Required(ErrorMessage = nameof(RequiredAttribute))]
public string Name { get; set; }
[Display(Name = "数据类型")]
[SelectList]
[Display(Name = "数据分类")]
[ReadOnlyForEdit]
[Required(ErrorMessage = nameof(RequiredAttribute))]
public IoTDataType? DataType { get; set; }
[SelectList]
[Display(Name = "数值类型")]
[ReadOnlyForEdit]
[Required(ErrorMessage = nameof(RequiredAttribute))]
@ -54,7 +57,6 @@ namespace IoT.Shared.Application.Models
[Description("描述枚举、对象和数组的类型定义")]
public string ValueSchema { get; set; }
[Display(Name = "单位")]
[ReadOnlyForEdit]
public string Unit { get; set; }
@ -63,6 +65,7 @@ namespace IoT.Shared.Application.Models
[ReadOnlyForEdit]
public string Description { get; set; }
[SkipSearch]
[Display(Name = "时间戳")]
[ReadOnlyForEdit]
[Required(ErrorMessage = nameof(RequiredAttribute))]

@ -66,6 +66,7 @@ namespace IoT.Shared.Areas.IoTCenter.Controlls
.WhereIf(!string.IsNullOrEmpty(model.Query.Name), o => o.Name.Contains(model.Query.Name))
.WhereIf(!string.IsNullOrEmpty(model.Query.Key), o => o.Key.Contains(model.Query.Key))
.WhereIf(!string.IsNullOrEmpty(model.Query.Value), o => o.Value.Contains(model.Query.Value))
.WhereIf(model.Query.DataType.HasValue, o => o.DataType == model.Query.DataType.Value)
.WhereIf(model.Query.ValueType.HasValue, o => o.ValueType == model.Query.ValueType.Value)
.WhereIf(!string.IsNullOrEmpty(model.Query.Unit), o => o.Unit.Contains(model.Query.Unit))
.WhereIf(!string.IsNullOrEmpty(model.Query.Description), o => o.Description.Contains(model.Query.Description))

Loading…
Cancel
Save