63 lines
1.6 KiB
C#
63 lines
1.6 KiB
C#
using DG.Tweening.Core.Easing;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.Events;
|
|
|
|
/// <summary>
|
|
/// 工单及工作票管理
|
|
/// </summary>
|
|
public class WorkorderMgr : BaseManager<WorkorderMgr>
|
|
{
|
|
public WorkTicket workTicket;
|
|
[SerializeField]
|
|
public Dictionary<string, UI_MatterItem> leftBtnActionMap = new Dictionary<string, UI_MatterItem>();
|
|
//public WorkTicketItem currentWorkTicket = new WorkTicketItem();
|
|
public void Init()
|
|
{
|
|
workTicket = GameManager.JsonMgr.LoadData<WorkTicket>("WorkOrderAndWorkTicket");
|
|
}
|
|
|
|
public WorkTicketItem GetCurrentSchemeWorkTicketDataBySchemeID(int id)
|
|
{
|
|
for (int i = 0; i < workTicket.workTicketItems.Count; i++)
|
|
{
|
|
if (workTicket.workTicketItems[i].schemeID.Equals(id.ToString()))
|
|
return workTicket.workTicketItems[i];
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public void CreateResultsItem()
|
|
{
|
|
|
|
}
|
|
|
|
public void AddLeftBtnActionMap(string label, UI_MatterItem mi)
|
|
{
|
|
if (!leftBtnActionMap.ContainsKey(label))
|
|
{
|
|
leftBtnActionMap.Add(label, mi);
|
|
}
|
|
}
|
|
|
|
public void RemoveLeftBtnActionMap(string label)
|
|
{
|
|
if (leftBtnActionMap.ContainsKey(label))
|
|
{
|
|
leftBtnActionMap.Remove(label);
|
|
}
|
|
}
|
|
|
|
public bool IsCantainskey(string label)
|
|
{
|
|
if (leftBtnActionMap.ContainsKey(label))
|
|
return true;
|
|
return false;
|
|
}
|
|
public void ClearLeftBtnActionMap()
|
|
{
|
|
leftBtnActionMap.Clear();
|
|
}
|
|
}
|