MonitorViewModel.cs 2.51 KB
using HHECS.Infrastructure.CommonHelper;
using HHECS.Model.Entities;
using HHECS.Model.Enums;
using System.Collections.Generic;

namespace HHECS.Web.Models
{
    /// <summary>
    /// 设备监控视图模型
    /// </summary>
    public class MonitorViewModel
    {
        /// <summary>
        /// 设备信息
        /// </summary>
        public Equipment Equipment { get; set; }

        /// <summary>
        /// 错误消息列表
        /// </summary>
        public List<string> AlarmMsg { get; set; }

        /// <summary>
        /// 设备状态标识
        /// </summary>
        public int EquipmentStatus { get; set; }

        /// <summary>
        /// 设备状态名称
        /// </summary>
        public string EquipmentStatusName => EquipmentStatus < 0 ? "无状态信息" : EnumHelper.GetDescription<EquipmentStatusRecordStatus>(EquipmentStatus.ToString());

        /// <summary>
        /// 保养状态标识
        /// </summary>
        public EquipmentMaintainStatus MaintainStatus { get; set; }

        /// <summary>
        /// 保养状态名称
        /// </summary>
        public string MaintainStatusName => EnumHelper.GetDescription<EquipmentMaintainStatus>(MaintainStatus.GetIndexString());

        /// <summary>
        /// 运行总次数
        /// </summary>
        public int RunTotal { get; set; }

        /// <summary>
        /// 故障总次数
        /// </summary>
        public int ErrorTotal { get; set; }

        /// <summary>
        /// 空闲总次数
        /// </summary>
        public int FreeTotal { get; set; }

        /// <summary>
        /// 在线状态
        /// </summary>
        public bool Online { get; set; }

        /// <summary>
        /// 温度
        /// </summary>
        public double WalkTemperature { get; set; }

        /// <summary>
        /// 震动
        /// </summary>
        public double WalkVibrationVelocity { get; set; }

        /// <summary>
        /// 温度
        /// </summary>
        public double LiftTemperature { get; set; }

        /// <summary>
        /// 震动
        /// </summary>
        public double LiftVibrationVelocity { get; set; }


        /// <summary>
        /// 运行电流
        /// </summary>
        public string runCurrent { get; set; }


        /// <summary>
        /// 升降电流
        /// </summary>
        public string liftCurrent { get; set; }

        /// <summary>
        /// 配置参数
        /// </summary>
        public List<DictDetail> ConfigPars { get; set; }
        
    }
}