123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990 |
- using LitJson;
- using Newtonsoft.Json;
- using Newtonsoft.Json.Linq;
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using UnityEngine;
- using XRTool.Util;
- using static easyar.ImageTargetController;
- public class XunJianDataManager : Singleton<XunJianDataManager>
- {
- public XunJianListData chooseXunJian;
- public List<XunJianListData> xjDataList = new List<XunJianListData>();
- public int page = 1;
- public void GetXunJianList(Action<List<XunJianListData>> callback,int count)
- {
- WindowsManager.Instance.StartCoroutine(getList(callback, count));
- }
- public void GetXunJianCount(Action<int> callback)
- {
- WindowsManager.Instance.StartCoroutine(getListCount(callback));
- }
- public string nowArea = "全部";
- public void GetAreaList(string area, Action<List<XunJianListData>> callback)
- {
- nowArea = area;
- List<XunJianListData> data = new List<XunJianListData>();
- if (areaList.ContainsKey(area))
- {
- for (int i = 0; i < areaList[area].Count; i++)
- {
- Debug.Log(nowPeople == areaList[area][i].people);
- Debug.Log(!peopleList.ContainsKey(nowPeople));
- if (nowPeople == areaList[area][i].people || !peopleList.ContainsKey(nowPeople))
- {
- data.Add(areaList[area][i]);
- }
- }
- callback.Invoke(data);
- }
- else
- {
- for (int i = 0; i < xjDataList.Count; i++)
- {
- if (nowPeople == xjDataList[i].people || !peopleList.ContainsKey(nowPeople))
- {
- data.Add(xjDataList[i]);
- }
- }
- callback.Invoke(data);
- }
- }
- public string nowPeople="全部";
- public void GetPeopleList(string people, Action<List<XunJianListData>> callback)
- {
- nowPeople = people;
- List<XunJianListData> data = new List<XunJianListData>();
- if (peopleList.ContainsKey(people))
- {
- for (int i = 0; i < peopleList[people].Count; i++)
- {
- if(nowArea == peopleList[people][i].inarea||!areaList.ContainsKey(nowArea))
- {
- data.Add(peopleList[people][i]);
- }
-
- }
- callback.Invoke(data);
- }else
- {
- for (int i = 0; i < xjDataList.Count; i++)
- {
- if (nowArea == xjDataList[i].inarea || !areaList.ContainsKey(nowArea))
- {
- data.Add(xjDataList[i]);
- }
- }
- callback.Invoke(data);
- }
- }
- XunJianListData testData()
- {
- XunJianListData xj = new XunJianListData();
- xj.id = "saotu";
- xj.url = Application.streamingAssetsPath + "/DianYun/85471-ghzoffice (2).bytes";
- xj.projectname = "工厂巡检";
- xj.inarea = "杨浦区";
- xj.updateState = "新项目";
- xj.projectState = "测试巡检 ";
- xj.projectType = "未开始 ";
- xj.projectTime = "2023/11/23 10:53 ";
- xj.renwuModelType = RenWuModelType.SaoTu;
-
- xj.tasksList = new List<XunJianTasks>();
- xj.people = "员工A";
- return xj;
- }
- XunJianListData testData2()
- {
- XunJianListData xj = new XunJianListData();
- xj.id = "saotu";
- xj.url = Application.streamingAssetsPath + "/DianYun/85471-ghzoffice (2).bytes";
- xj.projectname = "办公室巡检";
- xj.inarea = "杨浦区";
- xj.updateState = "新项目";
- xj.projectState = "测试巡检 ";
- xj.projectType = "未开始 ";
- xj.projectTime = "2023/11/23 10:53 ";
- xj.renwuModelType = RenWuModelType.DianYun;
-
- xj.tasksList = new List<XunJianTasks>();
- xj.people = "员工B";
- return xj;
- }
- XunJianListData testData3()
- {
- XunJianListData xj = new XunJianListData();
- xj.id = "saotu";
- xj.url = Application.streamingAssetsPath + "/DianYun/85471-ghzoffice (2).bytes";
- xj.projectname = "机房巡检";
- xj.inarea = "杨浦区";
- xj.updateState = "新项目";
- xj.projectState = "巡检 ";
- xj.projectType = "未开始 ";
- xj.projectTime = "2023/11/23 10:53 ";
- xj.renwuModelType = RenWuModelType.None;
-
- xj.tasksList = new List<XunJianTasks>();
- xj.people = "员工C";
- xj.listWall = getWallData();
- return xj;
- }
- List<RenWuItem> getRenwuData()
- {
- List < RenWuItem > itemlist = new List<RenWuItem>();
- for (int j = 0; j < 7; j++)
- {
- RenWuItem rw = new RenWuItem();
- rw.imageUrl ="";
-
- rw.id = j.ToString();
- RenWuTypeModel rwtm = new RenWuTypeModel();
- RenWuTypeModel rwtm2 = new RenWuTypeModel();
- RenWuTypeModel rwtm3 = new RenWuTypeModel();
- RenWuTypeModel rwtm4 = new RenWuTypeModel();
-
- rw.index = j;
- switch(j)
- {
- case 0:
-
- rw.roadList = new List<Vector3>();
- rw.roadList.Add(new Vector3(-4.2f+0.5f, 0, 0.92f));
- rw.roadList.Add(new Vector3(-4.2f + 0.5f, 0, 2));
- rw.roadList.Add(new Vector3(-5 + 0.5f, 0, 2));
- rw.info = "请检查机房空调温度是否正常";
-
- rw.typeList = new List<RenWuTypeModel>();
- rwtm.id = "1";
- rwtm.type = RenWuType.Image;
- rwtm.url = Application.streamingAssetsPath + "/Demo1/温湿度.jpeg";
- rw.typeList.Add(rwtm);
- rwtm4.id = "4";
- rwtm4.type = RenWuType.Text;
- rwtm4.info = "通常要求机房长期工作环境温度: 0'C'4S'C; 短期工作环境温度: -5C~SSC";
- rw.typeList.Add(rwtm4);
- break;
- case 1:
-
- rw.roadList = new List<Vector3>();
- rw.roadList.Add(new Vector3(-4.2f + 0.5f, 0, 0.92f));
- rw.info = "请检查机房湿度是否正常";
-
- rw.typeList = new List<RenWuTypeModel>();
- rwtm4.id = "4";
- rwtm4.type = RenWuType.Text;
- rwtm4.info = "通常机房的长期工作环境相对漫庭应在5%RH~85%RH之间,不结露;短期工作环境相对湿度应在0%RH~95%RH之间,不结露.";
- rw.typeList.Add(rwtm4);
- rwtm.id = "1";
- rwtm.type = RenWuType.Image;
- rwtm.url = Application.streamingAssetsPath + "/Demo1/温湿度.jpeg";
- rw.typeList.Add(rwtm);
- break;
- case 2:
-
- rw.roadList = new List<Vector3>();
- rw.roadList.Add(new Vector3(-4.2f + 0.5f, 0, -1.6f));
- rw.info = "请检查服务器电源灯是否正常";
-
- rw.typeList = new List<RenWuTypeModel>();
- rwtm.id = "1";
- rwtm.type = RenWuType.Image;
- rwtm.url = Application.streamingAssetsPath + "/Demo1/服务器指示灯.png";
- rw.typeList.Add(rwtm);
- rwtm3.id = "3";
- rwtm3.type = RenWuType.Model;
- rwtm3.url = Application.streamingAssetsPath + "/Demo1/dell poweredge.fbx";
- rw.typeList.Add(rwtm3);
- break;
- case 3:
-
- rw.roadList = new List<Vector3>();
- rw.roadList.Add(new Vector3(-4.2f + 0.5f, 0, 0.52f));
- rw.roadList.Add(new Vector3(-1.78f, 0, 0.52f));
- rw.roadList.Add(new Vector3(-1.78f, 0, -1.6f));
- rw.info = "请检查服务器告警灯状态是否正常";
-
- rw.typeList = new List<RenWuTypeModel>();
- rwtm3.id = "3";
- rwtm3.type = RenWuType.Model;
- rwtm3.url = Application.streamingAssetsPath + "/Demo1/dell poweredge.fbx";
- rw.typeList.Add(rwtm3);
- rwtm2.id = "2";
- rwtm2.type = RenWuType.Video;
- rwtm2.url = Application.streamingAssetsPath + "/Demo1/服务器告警灯2.mp4";
- rw.typeList.Add(rwtm2);
- break;
- case 4:
-
- rw.roadList = new List<Vector3>();
- rw.roadList.Add(new Vector3(-1.78f, 0, 0.52f));
- rw.roadList.Add(new Vector3(-5.18f + 0.5f, 0, 0.52f));
- rw.info = "请检查服务器网线连接是否正常";
-
- rw.typeList = new List<RenWuTypeModel>();
- rwtm2.id = "2";
- rwtm2.type = RenWuType.Video;
- rwtm2.url = Application.streamingAssetsPath + "/Demo1/网线.mp4";
- rw.typeList.Add(rwtm2);
- break;
- case 5:
-
- rw.roadList = new List<Vector3>();
- rw.roadList.Add(new Vector3(-1.78f, 0, 0.52f));
- rw.info = "机房室内消防设施是否齐全";
-
- rw.typeList = new List<RenWuTypeModel>();
- rwtm.id = "1";
- rwtm.type = RenWuType.Image;
- rwtm.url = Application.streamingAssetsPath + "/Demo1/机房消防设施巡检.jpeg";
- rw.typeList.Add(rwtm);
- break;
- case 6:
-
- rw.roadList = new List<Vector3>();
- rw.roadList.Add(new Vector3(-4.2f + 0.5f, 0, 0.52f));
- rw.roadList.Add(new Vector3(-1.78f, 0, 0.52f));
- rw.roadList.Add(new Vector3(-1.78f, 0, -1f));
- rw.info = "机房室内消防设施摆放是否规范";
-
- rw.typeList = new List<RenWuTypeModel>();
- rwtm.id = "1";
- rwtm.type = RenWuType.Image;
- rwtm.url = Application.streamingAssetsPath + "/Demo1/机房消防设施摆放.jpeg";
- rw.typeList.Add(rwtm);
- break;
- }
-
-
- int randomInt = UnityEngine.Random.Range(0, 10);
- rw.isPaiZhao = randomInt > 5 ? true : false;
-
- int randomInt2 = UnityEngine.Random.Range(0, 10);
- rw.isYuanCheng = randomInt2 > 5 ? true : false;
- itemlist.Add(rw);
- }
- return itemlist;
- }
- public Dictionary<string, List<XunJianListData>> areaList = new Dictionary<string, List<XunJianListData>>();
- public Dictionary<string, List<XunJianListData>> peopleList = new Dictionary<string, List<XunJianListData>>();
- List<Wall> getWallData()
- {
- List<Wall> listWall = new List<Wall>();
- for (int i = 0; i < 6; i++)
- {
- switch (i)
- {
- case 0:
- Wall wall = new Wall();
- wall.listPoint.Add(new Vector3(-5, 0, 0.25f));
- wall.listPoint.Add(new Vector3(5, 0, 0.25f));
- wall.listPoint.Add(new Vector3(5, 0, -0.25f));
- wall.listPoint.Add(new Vector3(-5, 0, -0.25f));
- listWall.Add(wall);
- break;
- case 1:
- Wall wall1 = new Wall();
- wall1.listPoint.Add(new Vector3(-5, 0, -4.75f));
- wall1.listPoint.Add(new Vector3(5, 0, -4.75f));
- wall1.listPoint.Add(new Vector3(5, 0, -5.25f));
- wall1.listPoint.Add(new Vector3(-5, 0, -5.25f));
- listWall.Add(wall1);
- break;
- case 2:
- Wall wall2 = new Wall();
- wall2.listPoint.Add(new Vector3(-5.25f, 0, 0));
- wall2.listPoint.Add(new Vector3(-4.75f, 0, 0));
- wall2.listPoint.Add(new Vector3(-4.75f, 0, -5));
- wall2.listPoint.Add(new Vector3(-5.25f, 0, -5));
- listWall.Add(wall2);
- break;
- case 3:
- Wall wall3 = new Wall();
- wall3.listPoint.Add(new Vector3(4.75f, 0, 0));
- wall3.listPoint.Add(new Vector3(5.25f, 0, 0));
- wall3.listPoint.Add(new Vector3(5.25f, 0, -5));
- wall3.listPoint.Add(new Vector3(4.75f, 0, -5));
- listWall.Add(wall3);
- break;
- case 4:
- Wall wall4 = new Wall();
- wall4.listPoint.Add(new Vector3(-2.75f, 0, -1f));
- wall4.listPoint.Add(new Vector3(-2.25f, 0, -1f));
- wall4.listPoint.Add(new Vector3(-2.25f, 0, -3f));
- wall4.listPoint.Add(new Vector3(-2.75f, 0, -3f));
- listWall.Add(wall4);
- break;
- case 5:
- Wall wall5 = new Wall();
- wall5.listPoint.Add(new Vector3(2.25f, 0, -2));
- wall5.listPoint.Add(new Vector3(2.75f, 0, -2));
- wall5.listPoint.Add(new Vector3(2.75f, 0, -4));
- wall5.listPoint.Add(new Vector3(2.25f, 0, -4));
- listWall.Add(wall5);
- break;
- default:
- break;
- }
- }
- return listWall;
- }
- IEnumerator getListCount(Action<int> callback)
- {
- JsonData jsonData = new JsonData();
- jsonData["page"] = page++;
- jsonData["limit"] = 10;
- Debug.Log(jsonData.ToJson());
- yield return WindowsManager.Instance.StartCoroutine(HttpTool.Instance.SendHttp(HttpEdustryAction.InspectionList, jsonData.ToJson(), (string msg) =>
- {
- try
- {
- JObject jObject = JObject.Parse(msg);
- int listConunt = int.Parse(jObject["data"]["count"].ToString());
- callback.Invoke(listConunt);
- }
- catch
- {
- callback.Invoke(0);
- }
- }));
- }
- int getMaxCount = 10;
- IEnumerator getList(Action<List<XunJianListData>> callback,int count)
- {
- xjDataList.Clear();
- for (int i = 1; i < (count/ getMaxCount) +2; i++)
- {
- JsonData jsonData = new JsonData();
- jsonData["page"] = i;
- jsonData["limit"] = getMaxCount;
- Debug.Log(jsonData.ToJson());
- yield return WindowsManager.Instance.StartCoroutine(HttpTool.Instance.SendHttp(HttpEdustryAction.InspectionList, jsonData.ToJson(), (string msg) =>
- {
- Debug.Log("msg===>"+ msg);
- JObject jObject = JObject.Parse(msg);
- int listConunt = int.Parse(jObject["data"]["count"].ToString());
- List<XunJianData> data = JsonConvert.DeserializeObject<List<XunJianData>>(jObject["data"]["list"].ToString());
- xjDataList.AddRange(XunJianDataParetListData(data));
- callback.Invoke(xjDataList);
- }));
- }
- }
- IEnumerator testBack(Action<List<XunJianListData>> callback)
- {
-
- JsonData jsonData = new JsonData();
- jsonData["page"] = page++;
- jsonData["limit"] = 10;
- Debug.Log(jsonData.ToJson());
- yield return WindowsManager.Instance.StartCoroutine(HttpTool.Instance.SendHttp(HttpEdustryAction.InspectionList, jsonData.ToJson(), (string msg) =>
- {
- Debug.Log("DGJ ===>InspectionList " + msg);
- JObject jObject = JObject.Parse(msg);
- if (jObject["code"].ToString() == "200")
- {
- List<XunJianData> data = JsonConvert.DeserializeObject<List<XunJianData>>(jObject["data"]["list"].ToString());
- if(data==null||data.Count<1)
- {
- page = -1;
-
- }
- int listConunt = int.Parse(jObject["data"]["count"].ToString());
- Debug.Log(HttpEdustryAction.InspectionList +" Count " +listConunt);
- if(WindowsManager.Instance.isTest)
- {
-
-
-
- }
- #region old 排序
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #endregion
- xjDataList.AddRange(XunJianDataParetListData(data));
-
- peopleList = new Dictionary<string, List<XunJianListData>>();
- areaList = new Dictionary<string, List<XunJianListData>>();
-
- for (int i = 0; i < xjDataList.Count; i++)
- {
- if (areaList.ContainsKey(xjDataList[i].inarea))
- {
- areaList[xjDataList[i].inarea].Add(xjDataList[i]);
- }
- else
- {
- areaList.Add(xjDataList[i].inarea, new List<XunJianListData>());
- areaList[xjDataList[i].inarea].Add(xjDataList[i]);
- }
- if (peopleList.ContainsKey(xjDataList[i].people))
- {
- peopleList[xjDataList[i].people].Add(xjDataList[i]);
- }
- else
- {
- peopleList.Add(xjDataList[i].people, new List<XunJianListData>());
- peopleList[xjDataList[i].people].Add(xjDataList[i]);
- }
- }
-
- callback(xjDataList);
- }
- else
- {
- Debug.LogError("获取巡检列表失败 " + jObject["code"].ToString());
- xjDataList = new List<XunJianListData>();
- if (WindowsManager.Instance.isTest)
- {
- xjDataList.Add(testData3());
- xjDataList.Add(testData());
- xjDataList.Add(testData2());
- }
- callback(xjDataList);
- }
- }));
- }
- List<XunJianListData> XunJianDataParetListData(List<XunJianData> data)
- {
- List<XunJianListData> listData = new List<XunJianListData>();
- for (int i = 0; i < data.Count; i++)
- {
- XunJianListData xj = new XunJianListData();
- xj.id = data[i].id.ToString();
- xj.projectname = data[i].name;
- xj.inarea = data[i].regionName;
- xj.projectState = ((ProjectStatus)data[i].status).ToString();
- xj.projectType = ((ProjectType)data[i].type).ToString();
- DateTime dateTimes = UnixTimeStampToDateTime(data[i].inspectionTime);
- long notime = GetHttpTimer.Instance.timestamp;
- if (PlayerPrefs.HasKey("project_" + data[i].id))
- {
- long projectOld = long.Parse(PlayerPrefs.GetString("project_" + data[i].id));
- float chaju = projectOld - data[i].inspectionTime;
- xj.updateState = chaju < 86400 ? "已更新" : "---";
- }
- else
- {
- xj.updateState = "新项目";
- PlayerPrefs.SetString("project_" + data[i].id, notime.ToString());
- }
- xj.projectTime = dateTimes.Year.ToString() + "/" + dateTimes.Month.ToString() + "/" + dateTimes.Day.ToString() + " " + dateTimes.Hour.ToString() + ":" + dateTimes.Minute.ToString();
-
- xj.listWall = data[i].listWall;
- switch (data[i].status)
- {
- case 1:
- xj.projectState = "已完成";
- break;
- case 2:
- xj.projectState = "进行中";
- break;
- case 3:
- xj.projectState = "未开始";
- break;
- case 4:
- xj.projectState = "即将开始";
- break;
- case 5:
- xj.projectState = "已逾期";
- break;
- default:
- break;
- }
- switch (data[i].regionMapType)
- {
- case 0:
- xj.renwuModelType = RenWuModelType.None;
- break;
- case 1:
- xj.renwuModelType = RenWuModelType.None;
- break;
- case 2:
- xj.renwuModelType = RenWuModelType.DianYun;
- break;
- default:
- break;
- }
- listData.Add(xj);
- }
- return listData;
- }
-
- DateTime UnixTimeStampToDateTime(long unixTimeStamp)
- {
- DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
- return epoch.AddSeconds(unixTimeStamp).ToLocalTime();
- }
- public string StampToDateTime(string timeStamp)
- {
- DateTime startTime = System.TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1));
- DateTime dt = startTime.AddSeconds(double.Parse(timeStamp));
- return dt.ToString("yyyy/MM/dd");
- }
-
- bool IsWithin24Hours(DateTime dateTime1, DateTime dateTime2)
- {
- TimeSpan difference = dateTime2 - dateTime1;
- return Math.Abs(difference.TotalHours) <= 24;
- }
- public class XunJianListData
- {
- public int nowIndex = 0;
- public string id;
- public string projectname;
- public string inarea;
- public string updateState;
- public string projectState;
- public string projectType;
- public string projectTime;
-
- public List<XunJianTasks> tasksList;
- public RenWuModelType renwuModelType;
- public int regionMapType;
- public string url;
- public string people = "未知员工";
- public List<Wall> listWall;
-
-
-
- public int rwIndex = 0;
- }
- public class XunJianData
- {
- public int id { get; set; }
- public string name { get; set; }
- public string regionId { get; set; }
- public string regionName { get; set; }
- public int type { get; set; }
- public int status { get; set; }
- public int inspectionTime { get; set; }
-
-
-
- public int firstPublishTime { get; set; }
-
-
-
- public int publishTime { get; set; }
-
-
-
- public int sort_status { get; set; }
-
-
-
- public int sort_projectStatus { get; set; }
-
-
-
- public int regionMapType { get; set; }
- public List<EmployeesData> listEmployees { get; set; }
- public List<Wall> listWall { get; set; }
- }
- public class EmployeesData
- {
- public int id { get; set; }
- public string name { get; set; }
- public string number { get; set; }
- }
- public void GotoXunJian(XunJianListData xjld)
- {
- xjld.projectState = "进行中";
- chooseXunJian = xjld;
- WindowsManager.Instance.show(WindowConfig.windowType.XunJianStart);
- TopManager.Instance.gameObject.SetActive(false);
- JinRuRenwu.Instance.initStart();
- }
- public void gotoNext()
- {
- Debug.Log("DGj ===>gotoNext " + chooseXunJian.nowIndex);
-
- if (chooseXunJian.tasksList.Count > chooseXunJian.nowIndex)
- {
-
- if (JinRuRenwu.Instance != null)
- {
- JinRuRenwu.Instance.UpdateData();
- }
- if (RenWuListWindow.Instance != null)
- {
- RenWuListWindow.Instance.UpdateData();
- }
- if (CaoZuoLanManager.Instance)
- CaoZuoLanManager.Instance.nextInteractable(!chooseXunJian.tasksList[chooseXunJian.nowIndex].confirmNormal);
- }
- else
- {
- List<string> backTip = new List<string>();
- JsonData data = new JsonData();
- data["type"] = "30001";
- backTip.Add("1");
- backTip.Add(data.ToJson());
- backTip.Add("3");
- WindowsManager.Instance.show(WindowConfig.windowType.Error, false, WindowsManager.Instance.getErrorData("提示", "已经是最后一步了!", Color.gray, "icon", backTip, false, "自动退出", 5,"","退出巡检","返回").ToJson());
- chooseXunJian.projectState = "已完成";
- }
- chooseXunJian.nowIndex++;
- }
- public void chooseItem(int i)
- {
- chooseXunJian.nowIndex = i;
- if (JinRuRenwu.Instance != null)
- {
- JinRuRenwu.Instance.UpdateData();
- }
- if (RenWuListWindow.Instance != null)
- {
- RenWuListWindow.Instance.UpdateData();
- }
- }
- public class RenWuItem
- {
- public string id;
- public int index;
- public bool isPaiZhao;
- public bool isYuanCheng;
- public string info;
- public List<RenWuTypeModel> typeList;
- public List<Vector3> roadList;
- public string imageUrl;
- public ImageFileSourceData imageData;
- public RenWuState state = RenWuState.None;
-
- }
- public class XunJianTasks
- {
-
-
-
- public int id { get; set; }
-
-
-
- public int type { get; set; }
-
-
-
- public string title { get; set; }
-
-
-
- public string description { get; set; }
-
-
-
- public int targetingMethod { get; set; }
-
-
-
- public string locatorNumber { get; set; }
-
-
-
- public bool confirmNormal { get; set; }
-
-
-
- public List<MinioResources> diagram { get; set; }
-
-
-
- public List<MinioResources> resources { get; set; }
-
-
-
- public int projectId { get; set; }
- public int projectInspectionId { get; set; }
- public List<MinioResources> data { get; set; }
-
-
-
- public int status { get; set; }
-
-
-
- public long completionTime { get; set; }
-
-
-
- public int sort { get; set; }
-
-
-
-
-
-
-
- public List<Vector3> roadList { get; set; }
- public ImageFileSourceData imageData { get; set; }
- public RenWuState state = RenWuState.None;
- public List<int> listUpload = new List<int>();
-
-
-
- public float startTime { get; set; }
-
- }
- public class MinioResources
- {
- public int id { get; set; }
- public string path { get; set; }
- public string uuid { get; set; }
- public int loadingMethod { get; set; }
-
- public string info { get; set; }
- }
- public class RenWuTypeModel
- {
- public RenWuType type;
- public string id;
- public string url;
- public string info;
- }
- public class Wall
- {
- public List<Vector3> listPoint { get; set; }
- public Wall()
- {
- listPoint = new List<Vector3>();
- }
- }
- public enum RenWuState
- {
- None = 100001,
- Success = 100002,
- Fail = 100003,
- }
- public enum RenWuType
- {
- Text = 100001,
- Image = 100002,
- Video = 100003,
- Model = 100004,
- }
- public enum RenWuModelType
- {
- SaoTu = 100001,
- DingWeiBan = 100002,
- DianYun = 100003,
- None = 100004,
- }
- public enum ProjectType
- {
- 常规 =1,
- 异常 = 2
- }
- public enum ProjectStatus
- {
- 未开始 = 1,
- 即将开始 =2,
- 已逾期 = 3,
- 进行中 = 4,
- 已完成=5
- }
- }
|