Void_F 9 сар өмнө
parent
commit
cdba8992c2

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 920 - 1
Assets/Prefabs/UI/XHYZT/GCYW.prefab


+ 8 - 8
Assets/Scripts/HttpGetData.cs

@@ -25,27 +25,27 @@ public class SensorData
     public string del_flag;
 
     /// <summary>
-    /// 闸门故障
+    /// 闂搁棬鏁呴殰
     /// </summary>
     public bool gate_breakdown;
 
     /// <summary>
-    /// 闸门手动模式 true手动 false远程
+    /// 闂搁棬鎵嬪姩妯″紡 true鎵嬪姩 false杩滅▼
     /// </summary>
     public bool gate_mode;
 
     /// <summary>
-    /// 闸门全开状态 
+    /// 闂搁棬鍏ㄥ紑鐘舵€� 
     /// </summary>
     public bool gate_open;
 
     /// <summary>
-    /// 闸门启门状态 true启门 false闭门
+    /// 闂搁棬鍚�棬鐘舵€� true鍚�棬 false闂�棬
     /// </summary>
     public bool gate_opening;
 
     /// <summary>
-    /// 闸门电源正常
+    /// 闂搁棬鐢垫簮姝e父
     /// </summary>
     public bool gate_power;
 
@@ -95,7 +95,7 @@ public class GetSingleDeviceData_AvgType
     public int DeviceID;
 
     /// <summary>
-    /// AvgType有三种类型,参数依次为hour(按小时平均),day(按日平均),month(按月平均)
+    /// AvgType鏈変笁绉嶇被鍨嬶紝鍙傛暟渚濇�涓篽our(鎸夊皬鏃跺钩鍧�),day(鎸夋棩骞冲潎),month(鎸夋湀骞冲潎)
     /// </summary>
     public string AvgType;
 
@@ -219,7 +219,7 @@ public class Project_EventData
 {
     public int waitAccept;
     public int hasHandle;
-    public int completeRate;
+    public string completeRate;
     public int waitHandle;
     public List<B08_TaskData> list;
 }
@@ -254,7 +254,7 @@ public class B08_TaskData
     public string remark;
     public int? status;
 
-    public int? transactor;
+    //public int? transactor;
     public string transactorName;
     public int? creator;
     public string creatorName;

+ 6 - 0
Assets/Scripts/HttpHelper.cs

@@ -799,6 +799,7 @@ public class HttpHelper : MonoBehaviour
         try
         { 
             jsonStr = await B08_API_data(ServerAddress.API_B08_dataStatis);
+            Debug.Log("API_B08_dataStatis"+jsonStr);
            GlobalData.B08DataStatis=JsonConvert.DeserializeObject<B08_dataStatis>(jsonStr);
         }
         catch (Exception e)
@@ -809,6 +810,7 @@ public class HttpHelper : MonoBehaviour
         try
         {
             jsonStr = await B08_API_data(ServerAddress.API_B08_inspectResult);
+            Debug.Log("API_B08_inspectResult"+jsonStr);
             GlobalData.B08InspectResult=JsonConvert.DeserializeObject<B08_inspectResult>(jsonStr);
         }
         catch (Exception e)
@@ -819,6 +821,7 @@ public class HttpHelper : MonoBehaviour
         try
         {
             jsonStr = await B08_API_data(ServerAddress.API_B08_projectExamine);
+            Debug.Log("API_B08_projectExamine"+jsonStr);
             GlobalData.B08ProjectExamine=JsonConvert.DeserializeObject<B08_projectExamine>(jsonStr);
         }
         catch (Exception e)
@@ -829,6 +832,7 @@ public class HttpHelper : MonoBehaviour
         try
         {
             jsonStr = await B08_API_data(ServerAddress.API_B08_event);
+            Debug.Log("API_B08_event"+jsonStr);
             GlobalData.B08Event=JsonConvert.DeserializeObject<B08_event>(jsonStr);
         }
         catch (Exception e)
@@ -839,6 +843,7 @@ public class HttpHelper : MonoBehaviour
         try
         {
             jsonStr = await B08_API_data(ServerAddress.API_B08_questionStatis);
+            Debug.Log("API_B08_questionStatis"+jsonStr);
             GlobalData.B08QuestionStatis=JsonConvert.DeserializeObject<B08_questionStatis>(jsonStr);
         }
         catch (Exception e)
@@ -849,6 +854,7 @@ public class HttpHelper : MonoBehaviour
         try
         {
             jsonStr = await B08_API_data(ServerAddress.API_B08_inspectType);
+            Debug.Log("API_B08_inspectType"+jsonStr);
             GlobalData.B08InspectType=JsonConvert.DeserializeObject<B08_inspectType>(jsonStr);
         }
         catch (Exception e)

+ 62 - 19
Assets/Scripts/UI/UIView/GCYW/GCYWLayer.cs

@@ -53,6 +53,10 @@ public class GCYWLayer : YZTRootLayer
     private Text jiaoChaJianZhuCountText;
     private Text dingQiZhuanXiangCountText;
 
+    //工程管理
+    private PieChart gongChengGuanLiChart;
+    private PieChart fenJiKaoPingChart;
+    private Text gongChengGuanLiChartCount;
 
 
     private void Awake()
@@ -77,6 +81,10 @@ public class GCYWLayer : YZTRootLayer
         _tuFaShiJian_Slider = this.transform.Find("ShuJuTongJi/TuFaShiJian/slider").GetComponent<MPImage>();
 
         wenTiTongJiBarChart = this.transform.Find("ShuJuTongJi/XunJianTongJi/BarChart").GetComponent<BarChart>();
+        
+        gongChengGuanLiChart=this.transform.Find("GongChengGuanLi/GuanLiJianCha").GetComponent<PieChart>();
+        gongChengGuanLiChartCount=this.transform.Find("GongChengGuanLi/GuanLiJianCha/count/numText").GetComponent<Text>();
+        fenJiKaoPingChart=this.transform.Find("GongChengGuanLi/FenJiKaoPing").GetComponent<PieChart>();
 
         TFSJ_DaiChuLiNumTex = this.transform.Find("TuFaShiJian/DaiChuLi/count").GetComponent<Text>();
         TFSJ_DaiYanShouNumTex = this.transform.Find("TuFaShiJian/DaiYanShou/count").GetComponent<Text>();
@@ -104,14 +112,14 @@ public class GCYWLayer : YZTRootLayer
         if (GlobalData.B08DataStatis != null && GlobalData.B08DataStatis.data == null)
         {
             await HttpHelper._Instance.InitGCYWData();
-            SetShuJuTongJiData();
-            SetXunJianBarChart();
-            SetTFSJ_Data();
-            SetWTZG_Data();
-            SetXJLE_Data();
+          
         }
-
-
+        SetShuJuTongJiData();
+        SetXunJianBarChart();
+        SetGongChengGuanLiChart();
+        SetTFSJ_Data();
+        SetWTZG_Data();
+        SetXJLE_Data();
     }
 
     public void SetShuJuTongJiData()
@@ -122,14 +130,6 @@ public class GCYWLayer : YZTRootLayer
         _quanBuGongChengText.text = $"{tempData.data.allProject}";
         _dangRiGongChengText.text = $"{tempData.data.warnProject}";
         _zhengChangYunXingText.text = $"{tempData.data.normalProject}";
-
-        _zhengGaiWenTi_Count_Text.text = $"{tempData.data.questionTimes}";
-        _zhengGaiWenTi_Vlaue_Text.text = $"{tempData.data.questionCompleteRate}%";
-        _zhengGaiWenTi_Slider.fillAmount = tempData.data.questionCompleteRate * 0.01f;
-
-        _tuFaShiJian_Count_Text.text = $"{tempData.data.eventTimes}";
-        _tuFaShiJian_Vlaue_Text.text = $"{tempData.data.eventCompleteRate}%";
-        _tuFaShiJian_Slider.fillAmount = tempData.data.eventCompleteRate * 0.01f;
     }
 
     public void SetXunJianBarChart()
@@ -160,6 +160,41 @@ public class GCYWLayer : YZTRootLayer
         tempSeries[1].data.Clear();
         tempSeries[1].data.AddRange(tempDatas_1);
     }
+    
+    public void SetGongChengGuanLiChart()
+    {
+        B08_projectExamine tempData = GlobalData.B08ProjectExamine;
+
+        var tempSeries = gongChengGuanLiChart.series;
+        int tempCount = 0;
+        SerieData[] tempDatas = new SerieData[tempData.data.type1.Length];
+        for (int i = 0; i < tempDatas.Length; i++)
+        {
+            tempDatas[i] = new SerieData();
+            tempDatas[i].data = new List<double>();
+            tempDatas[i].data.Add(i);
+            tempDatas[i].data.Add(tempData.data.type1[i].value);
+            tempDatas[i].name = tempData.data.type1[i].key;
+            tempCount += tempData.data.type1[i].value;
+        }
+        tempSeries[0].data.Clear();
+        tempSeries[0].data.AddRange(tempDatas);
+
+        gongChengGuanLiChartCount.text = tempCount.ToString();
+        
+        var tempSeries_1 = fenJiKaoPingChart.series;
+        SerieData[] tempDatas_1 = new SerieData[tempData.data.type2.Length];
+        for (int i = 0; i < tempDatas_1.Length; i++)
+        {
+            tempDatas_1[i] = new SerieData();
+            tempDatas_1[i].data = new List<double>();
+            tempDatas_1[i].data.Add(i);
+            tempDatas_1[i].data.Add(tempData.data.type2[i].value);
+            tempDatas_1[i].name = tempData.data.type2[i].key;
+        }
+        tempSeries_1[0].data.Clear();
+        tempSeries_1[0].data.AddRange(tempDatas_1);
+    }
 
 
     public void SetTFSJ_Data()
@@ -168,8 +203,8 @@ public class GCYWLayer : YZTRootLayer
         TFSJ_DaiChuLiNumTex.text = tempData.data.waitHandle.ToString();
         TFSJ_DaiYanShouNumTex.text = tempData.data.waitAccept.ToString();
         TFSJ_YiChuLiNumTex.text = tempData.data.hasHandle.ToString();
-        TFSJ_completeText.text = $"{tempData.data.completeRate}%";
-        TFSJ_completeSlider.fillAmount = tempData.data.completeRate * 0.01f;
+        TFSJ_completeText.text = $"{float.Parse(tempData.data.completeRate)*100.0f:0}%";
+        TFSJ_completeSlider.fillAmount =float.Parse(tempData.data.completeRate);
 
         for (int i = 0; i < TFSJ_eventItems.Count; i++)
         {
@@ -182,6 +217,10 @@ public class GCYWLayer : YZTRootLayer
             tempObj.Init(tempData.data.list[i]);
             TFSJ_eventItems.Add(tempObj.gameObject);
         }
+        
+        _tuFaShiJian_Count_Text.text = $"{tempData.data.waitHandle+tempData.data.waitAccept+tempData.data.hasHandle}";
+        _tuFaShiJian_Vlaue_Text.text = $"{float.Parse(tempData.data.completeRate)*100.0f:0}%";
+        _tuFaShiJian_Slider.fillAmount =float.Parse(tempData.data.completeRate);
     }
 
     public void SetWTZG_Data()
@@ -190,8 +229,8 @@ public class GCYWLayer : YZTRootLayer
         WTZG_DaiChuLiNumTex.text = tempData.data.waitHandle.ToString();
         WTZG_DaiYanShouNumTex.text = tempData.data.waitAccept.ToString();
         WTZG_YiChuLiNumTex.text = tempData.data.hasHandle.ToString();
-        WTZG_completeText.text = $"{tempData.data.completeRate}%";
-        WTZG_completeSlider.fillAmount = tempData.data.completeRate * 0.01f;
+        WTZG_completeText.text = $"{float.Parse(tempData.data.completeRate)*100.0f:0}%";
+        WTZG_completeSlider.fillAmount =float.Parse(tempData.data.completeRate);
 
         for (int i = 0; i < WTZG_eventItems.Count; i++)
         {
@@ -204,6 +243,10 @@ public class GCYWLayer : YZTRootLayer
             tempObj.Init(tempData.data.list[i]);
             WTZG_eventItems.Add(tempObj.gameObject);
         }
+        
+        _zhengGaiWenTi_Count_Text.text =$"{tempData.data.waitHandle+tempData.data.waitAccept+tempData.data.hasHandle}";
+        _zhengGaiWenTi_Vlaue_Text.text = $"{float.Parse(tempData.data.completeRate)*100.0f:0}%";
+        _zhengGaiWenTi_Slider.fillAmount = float.Parse(tempData.data.completeRate);
     }
 
     public void SetXJLE_Data()

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно