using UnityEngine;
using UnityEngine.UI;
using TMPro;
namespace GHZLangChao
{
///
/// ShowDaoHang 面板 -- 故障面板 ---子物体
///
public class FaultPanel_Item : AbstractController
{
public TextMeshProUGUI Name; // 设备名称
public TextMeshProUGUI System; // 承载系统
public TextMeshProUGUI Level; // 告警级别
public TextMeshProUGUI Time;// 告警时间
private AlarmData AlarmData;
public void Init(AlarmData AlarmData)
{
this.AlarmData = AlarmData;
Name.text = AlarmData.title;
System.text = AlarmData.carryingSystem;
Level.text = AlarmData.level;
Time.text = AlarmData.equipmentAlarmTime;
}
private Color mButtonColor = new Color(102,178,255,128);
public void ClickButton()
{
Debug.Log($"选择了{name}");
GetComponent().color = mButtonColor;
XunJianManager.AlarmData = AlarmData;
BasicDeviceControl.AlarmData = AlarmData;
}
}
}