94 lines
2.3 KiB
C#
94 lines
2.3 KiB
C#
using DG.Tweening;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using static InterfaceManager;
|
|
|
|
/// <summary>
|
|
/// 显示区
|
|
/// </summary>
|
|
public class CalendarDetailsInspectionData : MonoBehaviour
|
|
{
|
|
public static CalendarDetailsInspectionData Inst;
|
|
public GameObject bg;
|
|
public Transform content;
|
|
RectTransform content_ret;
|
|
GridLayoutGroup content_grid;
|
|
public Inspection inspection;
|
|
/// <summary>
|
|
/// 机器人名称
|
|
/// </summary>
|
|
public Text robotName;
|
|
/// <summary>
|
|
/// 任务类型
|
|
/// </summary>
|
|
public Text taskTypeName;
|
|
/// <summary>
|
|
/// 房间名称
|
|
/// </summary>
|
|
public Text roomName;
|
|
/// <summary>
|
|
/// 文件下载地址
|
|
/// </summary>
|
|
public Text pdfPath;
|
|
/// <summary>
|
|
/// 任务名称
|
|
/// </summary>
|
|
public Text taskName;
|
|
/// <summary>
|
|
/// 开始时间
|
|
/// </summary>
|
|
public Text startTime;
|
|
/// <summary>
|
|
/// 结束时间
|
|
/// </summary>
|
|
public Text endTime;
|
|
public Vector3 vector3;
|
|
/// <summary>
|
|
/// 下载
|
|
/// </summary>
|
|
public Button btnDownload;
|
|
|
|
private void Awake()
|
|
{
|
|
Inst = this;
|
|
content_ret = content.GetComponent<RectTransform>();
|
|
content_grid = content.GetComponent<GridLayoutGroup>();
|
|
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);
|
|
}
|
|
}
|