using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class B08_EventListItem : MonoBehaviour { public B08_TaskData data; public Text nameText; public Text dateText; public Text managerText; public Text stateText; public Text ctrlText; public GameObject more; public Text PlaneDateText; public Text CompleteDateText; public Text UseTimeText; public Text LocalText; public Button moreButton; public bool moreMessage = false; public RectTransform rect; public void Init(B08_TaskData _data) { data = _data; rect = this.GetComponent(); nameText = this.transform.Find("name").GetComponent(); dateText = this.transform.Find("date").GetComponent(); managerText = this.transform.Find("principal").GetComponent(); stateText = this.transform.Find("state").GetComponent(); ctrlText = this.transform.Find("ctrl").GetComponent(); more = this.transform.Find("more").gameObject; PlaneDateText = more.transform.Find("PlaneDate").GetComponent(); CompleteDateText = more.transform.Find("CompleteDate").GetComponent(); UseTimeText = more.transform.Find("UseTime").GetComponent(); LocalText = more.transform.Find("Local").GetComponent(); nameText.text = data.title; dateText.text = data.updateTime; managerText.text = data.transactorName; if (data.projectStatus==null||data.projectStatus.Equals("")) { stateText.text = "未知"; } else { stateText.text = data.projectStatus; } PlaneDateText.text = $"计划完成日期:2024/03/16"; CompleteDateText.text = $"实际完成日期:2024/03/16"; UseTimeText.text = $"已用时间:0天02:12:67"; LocalText.text = $"所属部门:安全部"; more.SetActive(false); moreButton = ctrlText.GetComponent