using DG.Tweening;
using UnityEngine;
using UnityEngine.UI;
using static InterfaceManager;
///
/// 显示区
///
public class CalendarDetailsInspectionData : MonoBehaviour
{
public static CalendarDetailsInspectionData Inst;
public GameObject bg;
public Transform content;
RectTransform content_ret;
GridLayoutGroup content_grid;
public Inspection inspection;
///
/// 机器人名称
///
public Text robotName;
///
/// 任务类型
///
public Text taskTypeName;
///
/// 房间名称
///
public Text roomName;
///
/// 文件下载地址
///
public Text pdfPath;
///
/// 任务名称
///
public Text taskName;
///
/// 开始时间
///
public Text startTime;
///
/// 结束时间
///
public Text endTime;
public Vector3 vector3;
///
/// 下载
///
public Button btnDownload;
private void Awake()
{
Inst = this;
content_ret = content.GetComponent();
content_grid = content.GetComponent();
close();
}
// Start is called before the first frame update
void Start()
{
btnDownload.onClick.AddListener(() => {
WebInteraction.Inst.TestSend(http_ip_address+ "/jk/"+inspection.pdfPath);
});
}
// Update is called once per frame
void Update()
{
GameManager.Inst.AdaptiveHight(content.gameObject, content, content_ret, content_grid);
}
public void open(Inspection _inspection)
{
gameObject.SetActive(true);
inspection = _inspection;
robotName.text = _inspection.robotName;
taskTypeName.text = _inspection.taskTypeName;
roomName.text = _inspection.roomName;
pdfPath.text = http_ip_address + "/jk/" + _inspection.pdfPath;
taskName.text = _inspection.taskName;
startTime.text = _inspection.startTime;
endTime.text = _inspection.endTime;
//img_bg.gameObject.SetActive(true);
bg.gameObject.SetActive(true);
}
public void close()
{
bg.gameObject.SetActive(false);
gameObject.SetActive(false);
}
}