using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using static UnityEditor.Progress; public class Workorderlink : MonoBehaviour { /// <summary> /// 工单编号消息 /// </summary> public List<InputField> workorderlinkinputs = new List<InputField>(); /// <summary> /// 面板中间信息 /// </summary> public List<InputField> undertheinputs = new List<InputField>(); public void Setinit(Dictionary<string, string> str) { foreach (KeyValuePair<string, string> kvp in str) { switch (kvp.Key) { case "供电单位": workorderlinkinputs[0].text = kvp.Value; break; case "电能表资产编号": workorderlinkinputs[1].text = kvp.Value; break; case "模型名称": workorderlinkinputs[2].text = kvp.Value; break; case "用户编号/客户编号": workorderlinkinputs[3].text = kvp.Value; break; case "台区编号": workorderlinkinputs[4].text = kvp.Value; break; case "历史是否违窃": workorderlinkinputs[5].text = kvp.Value; break; case "用户名称": workorderlinkinputs[6].text = kvp.Value; break; case "台区名称": workorderlinkinputs[7].text = kvp.Value; break; case "窃电嫌疑度": workorderlinkinputs[8].text = kvp.Value; break; case "用户类型": workorderlinkinputs[9].text = kvp.Value; break; default: break; } } } }