123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- using UnityEngine.UI;
- using Blue;
- using GHZLangChao;
- using TMPro;
- using System.Collections.Generic;
- using UnityEngine;
- /// <summary>
- /// 设备信息控制面板
- /// </summary>
- public class DeviceDetailsControl : AbstractController
- {
- //public Text deviceId; // 设备ID
- //public Text deviceName; // 设备名称
- public TextMeshProUGUI deviceModel; // 设备型号
- public TextMeshProUGUI deviceType; // 设备类型
- public TextMeshProUGUI assetTagNumber; // 资产标签号
- public TextMeshProUGUI serialNumber; // 序列号
- public TextMeshProUGUI equipmentNumber; // 设备编码
- public TextMeshProUGUI assetStatus; // 资产状态
- public TextMeshProUGUI deviceStatus; // 设备状态
- public TextMeshProUGUI deliveryData; // 交付日期
- public TextMeshProUGUI enabledDate; // 启用日期
- public TextMeshProUGUI serverUsageType; // 服务器使用类型
- public TextMeshProUGUI typicalModel; // 典配模型
- public TextMeshProUGUI equipmentBrand; // 设备品牌
- public TextMeshProUGUI manufacturer; // 生产厂商
- public TextMeshProUGUI equipmentWeight; // 设备重量(KG)
- public TextMeshProUGUI equipmentPower; // 设备功率(W)
- public TextMeshProUGUI originType; // 产地类型
- public TextMeshProUGUI collectionCPName; // 集采目录产品名称
- public TextMeshProUGUI resourcePool; // 所在资源池
- public TextMeshProUGUI wherePOD; // 所在POD
- public TextMeshProUGUI networkDomain; // 所在网络域
- public TextMeshProUGUI city; // 所在城市
- public TextMeshProUGUI building; // 所在楼宇
- public TextMeshProUGUI floor; // 所在楼层
- public TextMeshProUGUI computerRoomName; // 所在机房名称
- public TextMeshProUGUI computerRoomCoding; // 所在机房编码
- public TextMeshProUGUI cabinetNumber; // 机柜编号
- public TextMeshProUGUI uMessage; // U位信息
- public TextMeshProUGUI deviceOrientation; // 设备朝向
- public TextMeshProUGUI manageIP; // 管理IP
- public TextMeshProUGUI saveIP; // 存储IP
- public TextMeshProUGUI iPMIIP; // IPMIP
- public TextMeshProUGUI businessIP; // 业务IP
- public TextMeshProUGUI projectName; // 项目名称
- public TextMeshProUGUI equipmentSupplier; // 设备供货商
- public TextMeshProUGUI assetOwner; // 资产责任人
- public TextMeshProUGUI territorialPAManager; // 属地省资产负责人
- public TextMeshProUGUI equipmentBTTOrganization; // 设备归属组织
- public TextMeshProUGUI facilityManagementOrganization; // 设备管理组织
- public TextMeshProUGUI equipmentMaintenanceOrganization; // 设备维护组织
- public TextMeshProUGUI businessSystem; // 业务系统
- public DataItem item;
- public void UpdateData(DeviceParameters DeviceParameter, DataItem item)
- {
- this.item = item;
- if (item != null)
- item.gameObject.SetActive(false);
- //deviceId.text = DeviceParameter.deviceId.ToString();
- //deviceName.text = DeviceParameter.deviceName;
- deviceModel.text = DeviceParameter.deviceModel;
- assetTagNumber.text = DeviceParameter.assetNumber;
- serialNumber.text = DeviceParameter.serialNumber;
- equipmentNumber.text = DeviceParameter.deviceNumber;
- assetStatus.text = DeviceParameter.assetStatus;
- deviceStatus.text = DeviceParameter.deviceStatus;
- deliveryData.text = DeviceParameter.deliveryDate;
- enabledDate.text = DeviceParameter.activationDate;
- serverUsageType.text = DeviceParameter.serverUsageType;
- typicalModel.text = DeviceParameter.typical;
- equipmentBrand.text = DeviceParameter.deviceNumber;
- manufacturer.text = DeviceParameter.manufacturer;
- equipmentWeight.text = DeviceParameter.eight;
- equipmentPower.text = DeviceParameter.power;
- originType.text = DeviceParameter.origin;
- collectionCPName.text = DeviceParameter.catalogProductName;
- resourcePool.text = DeviceParameter.resourcePool;
- wherePOD.text = DeviceParameter.pod;
- networkDomain.text = DeviceParameter.network;
- city.text = DeviceParameter.province;
- building.text = DeviceParameter.building;
- floor.text = DeviceParameter.floor;
- computerRoomName.text = DeviceParameter.engineRoomName;
- cabinetNumber.text = DeviceParameter.cabinetNumber;
- uMessage.text = DeviceParameter.u;
- deviceOrientation.text = DeviceParameter.deviceOrientation;
- manageIP.text = DeviceParameter.managementIP;
- saveIP.text = DeviceParameter.saveIP;
- iPMIIP.text = DeviceParameter.iPMIIP;
- businessIP.text = DeviceParameter.businessIP;
- equipmentSupplier.text = DeviceParameter.supplier;
- territorialPAManager.text = DeviceParameter.provincePrincipal;
- equipmentBTTOrganization.text = DeviceParameter.ownershipOrganization;
- facilityManagementOrganization.text = DeviceParameter.managementOrganization;
- equipmentMaintenanceOrganization.text = DeviceParameter.maintenanceOrganization;
- businessSystem.text = DeviceParameter.businessSystem;
- InitWarnimgInfo();
- }
- public void CloseOnClick()
- {
- gameObject.SetActive(false);
- if (item != null)
- {
- item.gameObject.SetActive(true);
- item = null;
- }
- }
- [SerializeField] Transform warnimingContent;
- private List<AlarmData> AlarmDataList;
- [SerializeField] GameObject WarningZeroPanel;
- private void InitWarnimgInfo()
- {
- AlarmDataList = UICallManager.Instance.GetAlarmData();
- for (int i = 0; i < AlarmDataList.Count; i++)
- {
- GameObject go = Instantiate(InstantiateSystem.Instance.BlueObject.WarningInfoItem, warnimingContent);
- go.GetComponent<WarningInfoItem>().Init(AlarmDataList[i]);
- }
- if(AlarmDataList.Count==0)
- WarningZeroPanel.SetActive(true);
- }
- }
|