2024-10-31 00:29:52 +00:00
|
|
|
|
using InSituLaboratory.Entities;
|
|
|
|
|
|
using InSituLaboratory.IService;
|
|
|
|
|
|
using InSituLaboratory.Models;
|
|
|
|
|
|
using Prism.Commands;
|
|
|
|
|
|
using Prism.Regions;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
|
|
namespace InSituLaboratory.ViewModels.Pages
|
|
|
|
|
|
{
|
|
|
|
|
|
public class DashboardNewViewModel : ViewModelBase
|
|
|
|
|
|
{
|
|
|
|
|
|
public SysStatusModel SysStatusModel { get; set; } = new SysStatusModel();
|
|
|
|
|
|
|
|
|
|
|
|
public CurrentEquipmentModel CurrentWorkEquipment { get; set; } = new CurrentEquipmentModel();//当前工作设备
|
|
|
|
|
|
public CurrentEquipmentModel currentFaultyEquipment { get; set; } = new CurrentEquipmentModel();//当前故障设备
|
|
|
|
|
|
public DelegateCommand<object> ReadCommand { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
ISysStatusService _sysStatusService;
|
|
|
|
|
|
public DashboardNewViewModel(IRegionManager regionManager, ISysStatusService isysStatusService) : base(regionManager)
|
|
|
|
|
|
{
|
|
|
|
|
|
PageTitle = "数据中心";
|
|
|
|
|
|
IsCanClose = false;
|
|
|
|
|
|
_sysStatusService = isysStatusService;
|
|
|
|
|
|
|
|
|
|
|
|
ReadCommand = new DelegateCommand<object>(DoRead);
|
|
|
|
|
|
|
|
|
|
|
|
this.Refresh();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override void Refresh()
|
|
|
|
|
|
{
|
|
|
|
|
|
var sysStatuslist = _sysStatusService.GetSysStauts().ToList();
|
|
|
|
|
|
var CurrentWorklist = _sysStatusService.GetCurrentWorkEquipment().ToList();
|
|
|
|
|
|
var currentFaultylist = _sysStatusService.GetCurrentFaultyEquipment().ToList();
|
|
|
|
|
|
if (sysStatuslist.Count() != 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
var data = _sysStatusService.GetSysStauts().FirstOrDefault();
|
|
|
|
|
|
SysStatusModel.PackagingTime = data.PackagingTime;
|
|
|
|
|
|
SysStatusModel.SamplingTime = data.SamplingTime;
|
|
|
|
|
|
SysStatusModel.Voltage48 = data.Voltage48;
|
|
|
|
|
|
SysStatusModel.Current48 = data.Current48;
|
|
|
|
|
|
SysStatusModel.TimeSeriesGroupNumber = data.TimeSeriesGroupNumber;
|
|
|
|
|
|
SysStatusModel.GroupNumberStatus = data.GroupNumberStatus;
|
2024-11-05 00:46:15 +00:00
|
|
|
|
|
|
|
|
|
|
#region 主腔体状态
|
|
|
|
|
|
|
|
|
|
|
|
//基站48V漏电流状态
|
|
|
|
|
|
switch (data.BaseStation48VLeakageCS)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "正常":
|
|
|
|
|
|
SysStatusModel.BaseStation48VLeakageCS = "/InSituLaboratory.Assets;component/Images/aLarm/img_zhengchang1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "一级报警":
|
|
|
|
|
|
SysStatusModel.BaseStation48VLeakageCS = "/InSituLaboratory.Assets;component/Images/aLarm/img_yiji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "二级报警":
|
|
|
|
|
|
SysStatusModel.BaseStation48VLeakageCS = "/InSituLaboratory.Assets;component/Images/aLarm/img_erji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "故障":
|
|
|
|
|
|
SysStatusModel.BaseStation48VLeakageCS = "/InSituLaboratory.Assets;component/Images/aLarm/img_baojing1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//电池48V漏电流状态
|
|
|
|
|
|
switch (data.Batterz48VLeakageCS)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "正常":
|
|
|
|
|
|
SysStatusModel.Batterz48VLeakageCS = "/InSituLaboratory.Assets;component/Images/aLarm/img_zhengchang1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "一级报警":
|
|
|
|
|
|
SysStatusModel.Batterz48VLeakageCS = "/InSituLaboratory.Assets;component/Images/aLarm/img_yiji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "二级报警":
|
|
|
|
|
|
SysStatusModel.Batterz48VLeakageCS = "/InSituLaboratory.Assets;component/Images/aLarm/img_erji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "故障":
|
|
|
|
|
|
SysStatusModel.Batterz48VLeakageCS = "/InSituLaboratory.Assets;component/Images/aLarm/img_baojing1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//ICL漏电流状态
|
|
|
|
|
|
switch (data.ICLLeakageCS)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "正常":
|
|
|
|
|
|
SysStatusModel.ICLLeakageCS = "/InSituLaboratory.Assets;component/Images/aLarm/img_zhengchang1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "一级报警":
|
|
|
|
|
|
SysStatusModel.ICLLeakageCS = "/InSituLaboratory.Assets;component/Images/aLarm/img_yiji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "二级报警":
|
|
|
|
|
|
SysStatusModel.ICLLeakageCS = "/InSituLaboratory.Assets;component/Images/aLarm/img_erji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "故障":
|
|
|
|
|
|
SysStatusModel.ICLLeakageCS = "/InSituLaboratory.Assets;component/Images/aLarm/img_baojing1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//工控机漏电流状态
|
|
|
|
|
|
switch (data.IComputerLeakageCS)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "正常":
|
|
|
|
|
|
SysStatusModel.IComputerLeakageCS = "/InSituLaboratory.Assets;component/Images/aLarm/img_zhengchang1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "一级报警":
|
|
|
|
|
|
SysStatusModel.IComputerLeakageCS = "/InSituLaboratory.Assets;component/Images/aLarm/img_yiji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "二级报警":
|
|
|
|
|
|
SysStatusModel.IComputerLeakageCS = "/InSituLaboratory.Assets;component/Images/aLarm/img_erji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "故障":
|
|
|
|
|
|
SysStatusModel.IComputerLeakageCS = "/InSituLaboratory.Assets;component/Images/aLarm/img_baojing1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 温度1状态
|
|
|
|
|
|
switch (data.TemperatureStaus1)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "正常":
|
|
|
|
|
|
SysStatusModel.TemperatureStaus1 = "/InSituLaboratory.Assets;component/Images/aLarm/img_zhengchang1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "一级报警":
|
|
|
|
|
|
SysStatusModel.TemperatureStaus1 = "/InSituLaboratory.Assets;component/Images/aLarm/img_yiji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "二级报警":
|
|
|
|
|
|
SysStatusModel.TemperatureStaus1 = "/InSituLaboratory.Assets;component/Images/aLarm/img_erji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "故障":
|
|
|
|
|
|
SysStatusModel.TemperatureStaus1 = "/InSituLaboratory.Assets;component/Images/aLarm/img_baojing1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 温度2状态
|
|
|
|
|
|
switch (data.TemperatureStaus2)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "正常":
|
|
|
|
|
|
SysStatusModel.TemperatureStaus2 = "/InSituLaboratory.Assets;component/Images/aLarm/img_zhengchang1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "一级报警":
|
|
|
|
|
|
SysStatusModel.TemperatureStaus2 = "/InSituLaboratory.Assets;component/Images/aLarm/img_yiji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "二级报警":
|
|
|
|
|
|
SysStatusModel.TemperatureStaus2 = "/InSituLaboratory.Assets;component/Images/aLarm/img_erji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "故障":
|
|
|
|
|
|
SysStatusModel.TemperatureStaus2 = "/InSituLaboratory.Assets;component/Images/aLarm/img_baojing1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 湿度1状态
|
|
|
|
|
|
switch (data.HumidityStaus1)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "正常":
|
|
|
|
|
|
SysStatusModel.HumidityStaus1 = "/InSituLaboratory.Assets;component/Images/aLarm/img_zhengchang1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "一级报警":
|
|
|
|
|
|
SysStatusModel.HumidityStaus1 = "/InSituLaboratory.Assets;component/Images/aLarm/img_yiji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "二级报警":
|
|
|
|
|
|
SysStatusModel.HumidityStaus1 = "/InSituLaboratory.Assets;component/Images/aLarm/img_erji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "故障":
|
|
|
|
|
|
SysStatusModel.HumidityStaus1 = "/InSituLaboratory.Assets;component/Images/aLarm/img_baojing1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 湿度2状态
|
|
|
|
|
|
switch (data.HumidityStaus2)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "正常":
|
|
|
|
|
|
SysStatusModel.HumidityStaus2 = "/InSituLaboratory.Assets;component/Images/aLarm/img_zhengchang1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "一级报警":
|
|
|
|
|
|
SysStatusModel.HumidityStaus2 = "/InSituLaboratory.Assets;component/Images/aLarm/img_yiji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "二级报警":
|
|
|
|
|
|
SysStatusModel.HumidityStaus2 = "/InSituLaboratory.Assets;component/Images/aLarm/img_erji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "故障":
|
|
|
|
|
|
SysStatusModel.HumidityStaus2 = "/InSituLaboratory.Assets;component/Images/aLarm/img_baojing1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 漏水1状态
|
|
|
|
|
|
switch (data.LeakageStaus1)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "正常":
|
|
|
|
|
|
SysStatusModel.LeakageStaus1 = "/InSituLaboratory.Assets;component/Images/aLarm/img_zhengchang1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "一级报警":
|
|
|
|
|
|
SysStatusModel.LeakageStaus1 = "/InSituLaboratory.Assets;component/Images/aLarm/img_yiji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "二级报警":
|
|
|
|
|
|
SysStatusModel.LeakageStaus1 = "/InSituLaboratory.Assets;component/Images/aLarm/img_erji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "故障":
|
|
|
|
|
|
SysStatusModel.LeakageStaus1 = "/InSituLaboratory.Assets;component/Images/aLarm/img_baojing1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 漏水2状态
|
|
|
|
|
|
switch (data.LeakageStaus2)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "正常":
|
|
|
|
|
|
SysStatusModel.LeakageStaus2 = "/InSituLaboratory.Assets;component/Images/aLarm/img_zhengchang1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "一级报警":
|
|
|
|
|
|
SysStatusModel.LeakageStaus2 = "/InSituLaboratory.Assets;component/Images/aLarm/img_yiji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "二级报警":
|
|
|
|
|
|
SysStatusModel.LeakageStaus2 = "/InSituLaboratory.Assets;component/Images/aLarm/img_erji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "故障":
|
|
|
|
|
|
SysStatusModel.LeakageStaus2 = "/InSituLaboratory.Assets;component/Images/aLarm/img_baojing1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 内部压力1状态
|
|
|
|
|
|
switch (data.InternalPressure1)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "正常":
|
|
|
|
|
|
SysStatusModel.InternalPressure1 = "/InSituLaboratory.Assets;component/Images/aLarm/img_zhengchang1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "一级报警":
|
|
|
|
|
|
SysStatusModel.InternalPressure1 = "/InSituLaboratory.Assets;component/Images/aLarm/img_yiji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "二级报警":
|
|
|
|
|
|
SysStatusModel.InternalPressure1 = "/InSituLaboratory.Assets;component/Images/aLarm/img_erji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "故障":
|
|
|
|
|
|
SysStatusModel.InternalPressure1 = "/InSituLaboratory.Assets;component/Images/aLarm/img_baojing1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 内部压力2状态
|
|
|
|
|
|
switch (data.InternalPressure2)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "正常":
|
|
|
|
|
|
SysStatusModel.InternalPressure2 = "/InSituLaboratory.Assets;component/Images/aLarm/img_zhengchang1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "一级报警":
|
|
|
|
|
|
SysStatusModel.InternalPressure2 = "/InSituLaboratory.Assets;component/Images/aLarm/img_yiji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "二级报警":
|
|
|
|
|
|
SysStatusModel.InternalPressure2 = "/InSituLaboratory.Assets;component/Images/aLarm/img_erji1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "故障":
|
|
|
|
|
|
SysStatusModel.InternalPressure2 = "/InSituLaboratory.Assets;component/Images/aLarm/img_baojing1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
2024-10-31 00:29:52 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (CurrentWorklist.Count() != 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
var data = _sysStatusService.GetCurrentWorkEquipment().First();
|
2024-11-05 00:46:15 +00:00
|
|
|
|
|
|
|
|
|
|
#region 当前工作设备
|
|
|
|
|
|
|
|
|
|
|
|
// MEMS色谱仪
|
|
|
|
|
|
switch (data.Chromatograph_MEMS)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "待机":
|
|
|
|
|
|
CurrentWorkEquipment.Chromatograph_MEMS = "/InSituLaboratory.Assets;component/Images/aLarm/img_daiji.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "工作":
|
|
|
|
|
|
CurrentWorkEquipment.Chromatograph_MEMS = "/InSituLaboratory.Assets;component/Images/aLarm/img_gognzuo.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// MEMS质谱仪
|
|
|
|
|
|
switch (data.MassSpectrometer_MEMS)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "待机":
|
|
|
|
|
|
CurrentWorkEquipment.MassSpectrometer_MEMS = "/InSituLaboratory.Assets;component/Images/aLarm/img_daiji.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "工作":
|
|
|
|
|
|
CurrentWorkEquipment.MassSpectrometer_MEMS = "/InSituLaboratory.Assets;component/Images/aLarm/img_gognzuo.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 色质联用仪
|
|
|
|
|
|
switch (data.ColorMassSpectrometer)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "待机":
|
|
|
|
|
|
CurrentWorkEquipment.ColorMassSpectrometer = "/InSituLaboratory.Assets;component/Images/aLarm/img_daiji.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "工作":
|
|
|
|
|
|
CurrentWorkEquipment.ColorMassSpectrometer = "/InSituLaboratory.Assets;component/Images/aLarm/img_gognzuo.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 甲烷同位素分析仪
|
|
|
|
|
|
switch (data.CH4Analyzer)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "待机":
|
|
|
|
|
|
CurrentWorkEquipment.CH4Analyzer = "/InSituLaboratory.Assets;component/Images/aLarm/img_daiji.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "工作":
|
|
|
|
|
|
CurrentWorkEquipment.CH4Analyzer = "/InSituLaboratory.Assets;component/Images/aLarm/img_gognzuo.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 二氧化碳同位素分析仪
|
|
|
|
|
|
switch (data.CO2Analyzer)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "待机":
|
|
|
|
|
|
CurrentWorkEquipment.CO2Analyzer = "/InSituLaboratory.Assets;component/Images/aLarm/img_daiji.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "工作":
|
|
|
|
|
|
CurrentWorkEquipment.CO2Analyzer = "/InSituLaboratory.Assets;component/Images/aLarm/img_gognzuo.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 颗粒物分析仪
|
|
|
|
|
|
switch (data.ParticleAnalyzer)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "待机":
|
|
|
|
|
|
CurrentWorkEquipment.ParticleAnalyzer = "/InSituLaboratory.Assets;component/Images/aLarm/img_daiji.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "工作":
|
|
|
|
|
|
CurrentWorkEquipment.ParticleAnalyzer = "/InSituLaboratory.Assets;component/Images/aLarm/img_gognzuo.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 测序仪
|
|
|
|
|
|
switch (data.Sequencer)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "待机":
|
|
|
|
|
|
CurrentWorkEquipment.Sequencer = "/InSituLaboratory.Assets;component/Images/aLarm/img_daiji.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "工作":
|
|
|
|
|
|
CurrentWorkEquipment.Sequencer = "/InSituLaboratory.Assets;component/Images/aLarm/img_gognzuo.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
2024-10-31 00:29:52 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (currentFaultylist.Count() != 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
var data = _sysStatusService.GetCurrentFaultyEquipment().First();
|
2024-11-05 00:46:15 +00:00
|
|
|
|
|
|
|
|
|
|
// MEMS色谱仪
|
|
|
|
|
|
switch (data.Chromatograph_MEMS)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "故障":
|
|
|
|
|
|
currentFaultyEquipment.Chromatograph_MEMS = "/InSituLaboratory.Assets;component/Images/aLarm/img_baojing1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "正常":
|
|
|
|
|
|
currentFaultyEquipment.Chromatograph_MEMS = "/InSituLaboratory.Assets;component/Images/aLarm/img_zhengchang1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// MEMS质谱仪
|
|
|
|
|
|
switch (data.MassSpectrometer_MEMS)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "故障":
|
|
|
|
|
|
currentFaultyEquipment.MassSpectrometer_MEMS = "/InSituLaboratory.Assets;component/Images/aLarm/img_baojing1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "正常":
|
|
|
|
|
|
currentFaultyEquipment.MassSpectrometer_MEMS = "/InSituLaboratory.Assets;component/Images/aLarm/img_zhengchang1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 色质联用仪
|
|
|
|
|
|
switch (data.ColorMassSpectrometer)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "故障":
|
|
|
|
|
|
currentFaultyEquipment.ColorMassSpectrometer = "/InSituLaboratory.Assets;component/Images/aLarm/img_baojing1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "正常":
|
|
|
|
|
|
currentFaultyEquipment.ColorMassSpectrometer = "/InSituLaboratory.Assets;component/Images/aLarm/img_zhengchang1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 甲烷同位素分析仪
|
|
|
|
|
|
switch (data.CH4Analyzer)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "故障":
|
|
|
|
|
|
currentFaultyEquipment.CH4Analyzer = "/InSituLaboratory.Assets;component/Images/aLarm/img_baojing1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "正常":
|
|
|
|
|
|
currentFaultyEquipment.CH4Analyzer = "/InSituLaboratory.Assets;component/Images/aLarm/img_zhengchang1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 二氧化碳同位素分析仪
|
|
|
|
|
|
switch (data.CO2Analyzer)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "故障":
|
|
|
|
|
|
currentFaultyEquipment.CO2Analyzer = "/InSituLaboratory.Assets;component/Images/aLarm/img_baojing1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "正常":
|
|
|
|
|
|
currentFaultyEquipment.CO2Analyzer = "/InSituLaboratory.Assets;component/Images/aLarm/img_zhengchang1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 颗粒物分析仪
|
|
|
|
|
|
switch (data.ParticleAnalyzer)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "故障":
|
|
|
|
|
|
currentFaultyEquipment.ParticleAnalyzer = "/InSituLaboratory.Assets;component/Images/aLarm/img_baojing1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "正常":
|
|
|
|
|
|
currentFaultyEquipment.ParticleAnalyzer = "/InSituLaboratory.Assets;component/Images/aLarm/img_zhengchang1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 测序仪
|
|
|
|
|
|
switch (data.Sequencer)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "故障":
|
|
|
|
|
|
currentFaultyEquipment.Sequencer = "/InSituLaboratory.Assets;component/Images/aLarm/img_baojing1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "正常":
|
|
|
|
|
|
currentFaultyEquipment.Sequencer = "/InSituLaboratory.Assets;component/Images/aLarm/img_zhengchang1.png";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
2024-10-31 00:29:52 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 读取文本文档
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="o"></param>
|
|
|
|
|
|
public void DoRead(object o)
|
|
|
|
|
|
{
|
|
|
|
|
|
string? info = null;
|
|
|
|
|
|
string? txtContent = null;
|
|
|
|
|
|
OpenFileDialog openFileDialog = new OpenFileDialog();
|
|
|
|
|
|
openFileDialog.Title = "选择文件";
|
|
|
|
|
|
openFileDialog.Multiselect = false;//选择多个文件
|
|
|
|
|
|
openFileDialog.RestoreDirectory = true;//跟踪上次打开的文件的目录
|
|
|
|
|
|
//openFileDialog.Filter = "所有文件(*.*)|*";
|
|
|
|
|
|
openFileDialog.Filter = "Text files(*.txt) | *.txt";
|
|
|
|
|
|
openFileDialog.CheckFileExists = true;
|
|
|
|
|
|
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
|
|
|
|
|
{
|
|
|
|
|
|
info = openFileDialog.FileName;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(info))
|
|
|
|
|
|
{
|
|
|
|
|
|
//逐行读取文件,返回数组
|
|
|
|
|
|
txtContent = tools.ReadTXT_StreamReader(info);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|