DeviceDetailsControl.cs 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. using UnityEngine.UI;
  2. using Blue;
  3. using GHZLangChao;
  4. using TMPro;
  5. using System.Collections.Generic;
  6. using UnityEngine;
  7. /// <summary>
  8. /// 设备信息控制面板
  9. /// </summary>
  10. public class DeviceDetailsControl : AbstractController
  11. {
  12. //public Text deviceId; // 设备ID
  13. //public Text deviceName; // 设备名称
  14. public TextMeshProUGUI deviceModel; // 设备型号
  15. public TextMeshProUGUI deviceType; // 设备类型
  16. public TextMeshProUGUI assetTagNumber; // 资产标签号
  17. public TextMeshProUGUI serialNumber; // 序列号
  18. public TextMeshProUGUI equipmentNumber; // 设备编码
  19. public TextMeshProUGUI assetStatus; // 资产状态
  20. public TextMeshProUGUI deviceStatus; // 设备状态
  21. public TextMeshProUGUI deliveryData; // 交付日期
  22. public TextMeshProUGUI enabledDate; // 启用日期
  23. public TextMeshProUGUI serverUsageType; // 服务器使用类型
  24. public TextMeshProUGUI typicalModel; // 典配模型
  25. public TextMeshProUGUI equipmentBrand; // 设备品牌
  26. public TextMeshProUGUI manufacturer; // 生产厂商
  27. public TextMeshProUGUI equipmentWeight; // 设备重量(KG)
  28. public TextMeshProUGUI equipmentPower; // 设备功率(W)
  29. public TextMeshProUGUI originType; // 产地类型
  30. public TextMeshProUGUI collectionCPName; // 集采目录产品名称
  31. public TextMeshProUGUI resourcePool; // 所在资源池
  32. public TextMeshProUGUI wherePOD; // 所在POD
  33. public TextMeshProUGUI networkDomain; // 所在网络域
  34. public TextMeshProUGUI city; // 所在城市
  35. public TextMeshProUGUI building; // 所在楼宇
  36. public TextMeshProUGUI floor; // 所在楼层
  37. public TextMeshProUGUI computerRoomName; // 所在机房名称
  38. public TextMeshProUGUI computerRoomCoding; // 所在机房编码
  39. public TextMeshProUGUI cabinetNumber; // 机柜编号
  40. public TextMeshProUGUI uMessage; // U位信息
  41. public TextMeshProUGUI deviceOrientation; // 设备朝向
  42. public TextMeshProUGUI manageIP; // 管理IP
  43. public TextMeshProUGUI saveIP; // 存储IP
  44. public TextMeshProUGUI iPMIIP; // IPMIP
  45. public TextMeshProUGUI businessIP; // 业务IP
  46. public TextMeshProUGUI projectName; // 项目名称
  47. public TextMeshProUGUI equipmentSupplier; // 设备供货商
  48. public TextMeshProUGUI assetOwner; // 资产责任人
  49. public TextMeshProUGUI territorialPAManager; // 属地省资产负责人
  50. public TextMeshProUGUI equipmentBTTOrganization; // 设备归属组织
  51. public TextMeshProUGUI facilityManagementOrganization; // 设备管理组织
  52. public TextMeshProUGUI equipmentMaintenanceOrganization; // 设备维护组织
  53. public TextMeshProUGUI businessSystem; // 业务系统
  54. public DataItem item;
  55. public void UpdateData(DeviceParameters DeviceParameter, DataItem item)
  56. {
  57. this.item = item;
  58. if (item != null)
  59. item.gameObject.SetActive(false);
  60. //deviceId.text = DeviceParameter.deviceId.ToString();
  61. //deviceName.text = DeviceParameter.deviceName;
  62. deviceModel.text = DeviceParameter.deviceModel;
  63. assetTagNumber.text = DeviceParameter.assetNumber;
  64. serialNumber.text = DeviceParameter.serialNumber;
  65. equipmentNumber.text = DeviceParameter.deviceNumber;
  66. assetStatus.text = DeviceParameter.assetStatus;
  67. deviceStatus.text = DeviceParameter.deviceStatus;
  68. deliveryData.text = DeviceParameter.deliveryDate;
  69. enabledDate.text = DeviceParameter.activationDate;
  70. serverUsageType.text = DeviceParameter.serverUsageType;
  71. typicalModel.text = DeviceParameter.typical;
  72. equipmentBrand.text = DeviceParameter.deviceNumber;
  73. manufacturer.text = DeviceParameter.manufacturer;
  74. equipmentWeight.text = DeviceParameter.eight;
  75. equipmentPower.text = DeviceParameter.power;
  76. originType.text = DeviceParameter.origin;
  77. collectionCPName.text = DeviceParameter.catalogProductName;
  78. resourcePool.text = DeviceParameter.resourcePool;
  79. wherePOD.text = DeviceParameter.pod;
  80. networkDomain.text = DeviceParameter.network;
  81. city.text = DeviceParameter.province;
  82. building.text = DeviceParameter.building;
  83. floor.text = DeviceParameter.floor;
  84. computerRoomName.text = DeviceParameter.engineRoomName;
  85. cabinetNumber.text = DeviceParameter.cabinetNumber;
  86. uMessage.text = DeviceParameter.u;
  87. deviceOrientation.text = DeviceParameter.deviceOrientation;
  88. manageIP.text = DeviceParameter.managementIP;
  89. saveIP.text = DeviceParameter.saveIP;
  90. iPMIIP.text = DeviceParameter.iPMIIP;
  91. businessIP.text = DeviceParameter.businessIP;
  92. equipmentSupplier.text = DeviceParameter.supplier;
  93. territorialPAManager.text = DeviceParameter.provincePrincipal;
  94. equipmentBTTOrganization.text = DeviceParameter.ownershipOrganization;
  95. facilityManagementOrganization.text = DeviceParameter.managementOrganization;
  96. equipmentMaintenanceOrganization.text = DeviceParameter.maintenanceOrganization;
  97. businessSystem.text = DeviceParameter.businessSystem;
  98. InitWarnimgInfo();
  99. }
  100. public void CloseOnClick()
  101. {
  102. gameObject.SetActive(false);
  103. if (item != null)
  104. {
  105. item.gameObject.SetActive(true);
  106. item = null;
  107. }
  108. }
  109. [SerializeField] Transform warnimingContent;
  110. private List<AlarmData> AlarmDataList;
  111. [SerializeField] GameObject WarningZeroPanel;
  112. private void InitWarnimgInfo()
  113. {
  114. AlarmDataList = UICallManager.Instance.GetAlarmData();
  115. for (int i = 0; i < AlarmDataList.Count; i++)
  116. {
  117. GameObject go = Instantiate(InstantiateSystem.Instance.BlueObject.WarningInfoItem, warnimingContent);
  118. go.GetComponent<WarningInfoItem>().Init(AlarmDataList[i]);
  119. }
  120. if(AlarmDataList.Count==0)
  121. WarningZeroPanel.SetActive(true);
  122. }
  123. }