Răsfoiți Sursa

水位预警,水位图标替换,套口点补上

Void_F 17 ore în urmă
părinte
comite
97d4359b80

+ 230 - 1
Assets/Prefabs/UI/XHYZT/SWYJ.prefab

@@ -14814,6 +14814,8 @@ RectTransform:
   - {fileID: 3055591070522261930}
   - {fileID: 1131407422490970219}
   - {fileID: 8601019591330787923}
+  - {fileID: 5613448560832391166}
+  - {fileID: 138019657336343232}
   m_Father: {fileID: 0}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -14908,9 +14910,10 @@ MonoBehaviour:
   sWHeightUnits: []
   sWHeightUnitPrefab: {fileID: 1479493484440468058, guid: 1604d7403b5021741aa0c96854811b33, type: 3}
   runtimePointObj: {fileID: 5029940434980741371, guid: f7351d99134429b4280ee00172298cf5, type: 3}
-  shuiweiIconPrefab: {fileID: 1295938256603995126, guid: 7c2764f01ad9eb445a4c3d2aa47f4a14, type: 3}
   zdpmParent: {fileID: 8164022845319533604}
   zdpmPrefab: {fileID: 5666608153428404762, guid: 4a2b54fe3fb7dc3448def41df2eefcfc, type: 3}
+  swSY: {fileID: 4333192775402009780}
+  swXY: {fileID: 8083458041895868810}
 --- !u!1 &6148527700689888400
 GameObject:
   m_ObjectHideFlags: 0
@@ -25771,3 +25774,229 @@ MonoBehaviour:
     m_VerticalOverflow: 1
     m_LineSpacing: 1
   m_Text: 8
+--- !u!1001 &3939248529708912686
+PrefabInstance:
+  m_ObjectHideFlags: 0
+  serializedVersion: 2
+  m_Modification:
+    m_TransformParent: {fileID: 7289340260209060652}
+    m_Modifications:
+    - target: {fileID: 1295938256603995126, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_Name
+      value: shuiwei_SY
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_Pivot.x
+      value: 0.5
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_Pivot.y
+      value: 0.5
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_RootOrder
+      value: 5
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_AnchorMax.x
+      value: 0.5
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_AnchorMax.y
+      value: 0.5
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_AnchorMin.x
+      value: 0.5
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_AnchorMin.y
+      value: 0.5
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_SizeDelta.x
+      value: 100
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_SizeDelta.y
+      value: 100
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_LocalPosition.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_LocalPosition.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_LocalPosition.z
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_LocalRotation.w
+      value: 1
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_LocalRotation.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_LocalRotation.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_LocalRotation.z
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_AnchoredPosition.x
+      value: -137
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_AnchoredPosition.y
+      value: 29
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.z
+      value: 0
+      objectReference: {fileID: 0}
+    m_RemovedComponents: []
+  m_SourcePrefab: {fileID: 100100000, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+--- !u!114 &4333192775402009780 stripped
+MonoBehaviour:
+  m_CorrespondingSourceObject: {fileID: 759299040552133786, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+  m_PrefabInstance: {fileID: 3939248529708912686}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 0}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 5adca38dcd8fb3c459c34069d51cf437, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+--- !u!224 &5613448560832391166 stripped
+RectTransform:
+  m_CorrespondingSourceObject: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+  m_PrefabInstance: {fileID: 3939248529708912686}
+  m_PrefabAsset: {fileID: 0}
+--- !u!1001 &8838213347747691792
+PrefabInstance:
+  m_ObjectHideFlags: 0
+  serializedVersion: 2
+  m_Modification:
+    m_TransformParent: {fileID: 7289340260209060652}
+    m_Modifications:
+    - target: {fileID: 1295938256603995126, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_Name
+      value: shuiwei_XY
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_Pivot.x
+      value: 0.5
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_Pivot.y
+      value: 0.5
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_RootOrder
+      value: 6
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_AnchorMax.x
+      value: 0.5
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_AnchorMax.y
+      value: 0.5
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_AnchorMin.x
+      value: 0.5
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_AnchorMin.y
+      value: 0.5
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_SizeDelta.x
+      value: 100
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_SizeDelta.y
+      value: 100
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_LocalPosition.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_LocalPosition.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_LocalPosition.z
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_LocalRotation.w
+      value: 1
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_LocalRotation.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_LocalRotation.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_LocalRotation.z
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_AnchoredPosition.x
+      value: -137
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_AnchoredPosition.y
+      value: 29
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.z
+      value: 0
+      objectReference: {fileID: 0}
+    m_RemovedComponents: []
+  m_SourcePrefab: {fileID: 100100000, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+--- !u!224 &138019657336343232 stripped
+RectTransform:
+  m_CorrespondingSourceObject: {fileID: 8885034799045031888, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+  m_PrefabInstance: {fileID: 8838213347747691792}
+  m_PrefabAsset: {fileID: 0}
+--- !u!114 &8083458041895868810 stripped
+MonoBehaviour:
+  m_CorrespondingSourceObject: {fileID: 759299040552133786, guid: 62298864aab77514e800bf7cf1f9bab6, type: 3}
+  m_PrefabInstance: {fileID: 8838213347747691792}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 0}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 5adca38dcd8fb3c459c34069d51cf437, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 

+ 24 - 0
Assets/Scripts/HttpHelper.cs

@@ -2125,11 +2125,35 @@ public class HttpHelper : MonoBehaviour
                 Debug.Log($"设备列表json :{www.downloadHandler.text}");
                 SensorListResult tempData = JsonUtility.FromJson<SensorListResult>(www.downloadHandler.text);
                 _devicesIdDatas = new Dictionary<string, DevicesId_Data>();
+                
+                
+                Dictionary<string, string> tempMap_BY = new Dictionary<string, string>();
+                Dictionary<string, string> tempMap_TK = new Dictionary<string, string>();
+
+                
                 for (int i = 0; i < tempData.rows.Count; i++)
                 {
+                    if (tempData.rows[i].stationName.Equals("套口"))
+                    {
+                        tempMap_TK.TryAdd(tempData.rows[i].sensorType, tempData.rows[i].sensorName);
+                    }
+                    else
+                    {
+                        tempMap_BY.TryAdd(tempData.rows[i].sensorType, tempData.rows[i].sensorName);
+                    }
+                    
                     _devicesIdDatas.Add(tempData.rows[i].sensorName, tempData.rows[i]);
                 }
 
+                foreach (var tempKey in tempMap_BY.Keys)
+                {
+                    Debug.Log("补元 设备类型:"+tempKey);
+                }
+                foreach (var tempKey in tempMap_TK.Keys)
+                {
+                    Debug.Log("套口 设备类型:"+tempKey);
+                }
+               
                 Debug.Log($"初始化设备列表成功!!! count:{tempData.total}");
             }
         }

+ 23 - 0
Assets/Scripts/UI/Data/TuYaLiData.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public enum tuYaLiType
+{
+    BuYuanTuYaLi,
+    TaoKouTuYaLi
+}
+
+[Serializable]
+public class TuYaLiData
+{
+    public string name;
+    public string targetName;
+    public tuYaLiType type;
+    public Transform targetTransform;
+    public float value;
+
+    public string sid;
+    public string gid;
+}

+ 11 - 0
Assets/Scripts/UI/Data/TuYaLiData.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: de906742cf318134c9e2c75d3a9af22c
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 0 - 2
Assets/Scripts/UI/UIView/GCJK/GCJKLayer.cs

@@ -609,7 +609,6 @@ public class GCJKLayer : YZTRootLayer
             string swDownName="";
             for (int i = 0; i < GlobalData.swDatas.Count; i++)
             {
-                Debug.Log(GlobalData.swDatas[i].stnm);
                 if (GlobalData.swDatas[i].stnm == "补元(上)")
                 {
                     swUp = GlobalData.swDatas[i].upz;
@@ -643,7 +642,6 @@ public class GCJKLayer : YZTRootLayer
             string swDownName="";
             for (int i = 0; i < GlobalData.swDatas.Count; i++)
             {
-                Debug.Log(GlobalData.swDatas[i].stnm);
                 if (GlobalData.swDatas[i].stnm == "套口(上)")
                 {
                     swUp = GlobalData.swDatas[i].upz;

+ 90 - 60
Assets/Scripts/UI/UIView/SWYJ/SWYJLayer.cs

@@ -22,15 +22,15 @@ public enum shuiWeiYuJingDataType
 [System.Serializable]
 public class StationData : IComparable
 {
-    public string stnm;      // 站名
-    public string lgtd;      // 经度
-    public string lttd;      // 纬度
-    public string stcd;      // 站码
+    public string stnm; // 站名
+    public string lgtd; // 经度
+    public string lttd; // 纬度
+    public string stcd; // 站码
 
-    public float? upz;       // 上水位
-    public float? dwz;       // 下水位
-    public float? tgtq;      // 流量
-    public string tm;        // 时间
+    public float? upz; // 上水位
+    public float? dwz; // 下水位
+    public float? tgtq; // 流量
+    public string tm; // 时间
 
     public string swchrcd;
     public string msqmt;
@@ -92,8 +92,7 @@ public class SWYJLayer : YZTRootLayer
     //水位变化与统计
     private BarChart shuiWeiBianHua;
 
-    [Header("工程安全监测-水位变化与统计数据")]
-    public ShuiWeiBianHuaData ShuiWeiBianHuaData_TK_Month;
+    [Header("工程安全监测-水位变化与统计数据")] public ShuiWeiBianHuaData ShuiWeiBianHuaData_TK_Month;
     public ShuiWeiBianHuaData ShuiWeiBianHuaData_TK_Day;
     public ShuiWeiBianHuaData ShuiWeiBianHuaData_TK_Hour;
 
@@ -112,7 +111,6 @@ public class SWYJLayer : YZTRootLayer
     public UnityEngine.UI.Button exitGlobalSWBtn;
 
 
-
     public Sprite highLightBtn;
     public Sprite normalBtn;
 
@@ -124,7 +122,7 @@ public class SWYJLayer : YZTRootLayer
 
     public GameObject runtimePointObj;
 
-    public GameObject shuiweiIconPrefab;
+    //public GameObject shuiweiIconPrefab;
     private List<ShuiWeiIconCtrl> _shuiWeiIconCtrls = new List<ShuiWeiIconCtrl>();
     private Transform _shuiWeiIconContent;
     private bool creatShuiWeiIcon = false;
@@ -133,6 +131,10 @@ public class SWYJLayer : YZTRootLayer
     public GameObject zdpmPrefab;
     //public GameObject[] zdpmObjs;
 
+    //上下游水位
+    public ShuiWeiCtrl swSY;
+    public ShuiWeiCtrl swXY;
+
     private void Awake()
     {
         Init();
@@ -143,6 +145,7 @@ public class SWYJLayer : YZTRootLayer
             TaoKouDataButton.GetComponent<UnityEngine.UI.Image>().sprite = normalBtn;
             StaticLod.instance.OnFoucusStatic(0);
             ChangeDataType(shuiWeiYuJingDataType.BuYuan);
+            CreateOrRefreshShuiWeiIcon();
         });
         TaoKouDataButton = this.transform.Find("Main/TaoKouButton").GetComponent<Button>();
         TaoKouDataButton.onClick.AddListener(() =>
@@ -151,6 +154,7 @@ public class SWYJLayer : YZTRootLayer
             TaoKouDataButton.GetComponent<UnityEngine.UI.Image>().sprite = highLightBtn;
             StaticLod.instance.OnFoucusStatic(1);
             ChangeDataType(shuiWeiYuJingDataType.TaoKou);
+            CreateOrRefreshShuiWeiIcon();
         });
 
         //水位
@@ -171,7 +175,6 @@ public class SWYJLayer : YZTRootLayer
 
     void InitSWZData()
     {
-
         if (GlobalData.qXZDatas.Count < 1 || GlobalData.qXZDatas1h.Count < 1)
             return;
 
@@ -185,9 +188,11 @@ public class SWYJLayer : YZTRootLayer
             {
                 xtValue = GlobalData.qXZDatas[i].dropSum6;
             }
+
             total24Value += GlobalData.qXZDatas[i].dropSum6;
             max24Value = MathF.Max(max24Value, GlobalData.qXZDatas[i].dropSum6);
         }
+
         avg24Value = total24Value / GlobalData.qXZDatas.Count;
 
         float total1Value = 0;
@@ -196,15 +201,15 @@ public class SWYJLayer : YZTRootLayer
 
         for (int i = 0; i < GlobalData.qXZDatas1h.Count; i++)
         {
-
             total1Value += GlobalData.qXZDatas[i].dropSum6;
             max1Value = MathF.Max(max24Value, GlobalData.qXZDatas[i].dropSum6);
         }
+
         avg1Value = total24Value / GlobalData.qXZDatas.Count;
 
 
         _dangQianYuLiangText.text =
-                $"{max1Value.ToString("0.00")} <size=14><color=#A5BBE2>mm</color></size>";
+            $"{max1Value.ToString("0.00")} <size=14><color=#A5BBE2>mm</color></size>";
         _zuiDaYuLiangText.text =
             $"{max24Value.ToString("0.00")} <size=14><color=#A5BBE2>mm</color></size>";
         _pingJunYuLiangText.text =
@@ -252,10 +257,12 @@ public class SWYJLayer : YZTRootLayer
             {
                 value1 = value1 / 100.0f;
             }
+
             if (value2 > 1000)
             {
                 value2 = value2 / 100.0f;
             }
+
             _pingJunShuiWeiText.text = $"{((value1 + value2) / 2).ToString("0.00")} <color=#A5BBE2>m</color>";
             _sheFangShuiWeiText.text = $"{GlobalData.threeLevelShuiWeiDatas[0].floodProtectionLevel} m";
             _jingJieShuiWeiText.text = $"{GlobalData.threeLevelShuiWeiDatas[0].warningLevel} m";
@@ -272,16 +279,17 @@ public class SWYJLayer : YZTRootLayer
             {
                 value1 = value1 / 100.0f;
             }
+
             if (value2 > 1000)
             {
                 value2 = value2 / 100.0f;
             }
+
             _pingJunShuiWeiText.text = $"{((value1 + value2) / 2).ToString("0.00")} <color=#A5BBE2>m</color>";
             _sheFangShuiWeiText.text = $"{GlobalData.threeLevelShuiWeiDatas[1].floodProtectionLevel} m";
             _jingJieShuiWeiText.text = $"{GlobalData.threeLevelShuiWeiDatas[1].warningLevel} m";
             _baoZhengShuiWeiText.text = $"{GlobalData.threeLevelShuiWeiDatas[1].guaranteeLevel} m";
             _shuiWeiText.text = $"{value1.ToString("0.00")}";
-
         }
     }
 
@@ -289,64 +297,84 @@ public class SWYJLayer : YZTRootLayer
     //水位图标
     public void CreateOrRefreshShuiWeiIcon()
     {
-        if (_shuiWeiIconCtrls.Count < 1)
+        if (currentDataType == 0)
         {
-            for (int i = 0; i < GlobalData.BuYuanShuiWeiDataList.Count; i++)
+            float? swUp = null;
+            float? swDown = null;
+            string swUpName = "";
+            string swDownName = "";
+            for (int i = 0; i < GlobalData.swDatas.Count; i++)
             {
-                ShuiWeiIconCtrl tempIcon =
-                    Instantiate(shuiweiIconPrefab, _shuiWeiIconContent).GetComponent<ShuiWeiIconCtrl>();
-                tempIcon.Init(GlobalData.BuYuanShuiWeiDataList[i]);
-                _shuiWeiIconCtrls.Add(tempIcon);
-            }
+                if (GlobalData.swDatas[i].stnm == "补元(上)")
+                {
+                    swUp = GlobalData.swDatas[i].upz;
+                    swUpName = GlobalData.swDatas[i].stnm;
+                }
 
-            if (_shuiWeiIconCtrls.Count < 1)
-            {
-                return;
+                if (GlobalData.swDatas[i].stnm == "补元(下)")
+                {
+                    swDown = GlobalData.swDatas[i].dwz;
+                    swDownName = GlobalData.swDatas[i].stnm;
+                }
             }
 
-            GameObject[] BY_targs = GameObject.FindGameObjectsWithTag(shuiWeiType.BuYuanShuiWei.ToString());
-            GameObject[] TK_targs = GameObject.FindGameObjectsWithTag(shuiWeiType.TaoKouShuiWei.ToString());
-            for (int i = 0; i < _shuiWeiIconCtrls.Count; i++)
+            var swTargets = GameObject.FindGameObjectsWithTag("BY_SW");
+            for (int i = 0; i < swTargets.Length; i++)
             {
-                string objName = _shuiWeiIconCtrls[i]._data.targetName;
-                if (_shuiWeiIconCtrls[i]._data.type == shuiWeiType.BuYuanShuiWei)
+                if (swTargets[i].name.Equals("BY_ZhaQian"))
                 {
-                    for (int j = 0; j < BY_targs.Length; j++)
-                    {
-                        if (BY_targs[j].gameObject.name == objName)
-                        {
-                            _shuiWeiIconCtrls[i].targetTransForm = BY_targs[j].transform;
-                            break;
-                        }
-                    }
+                    swSY.SetData(swUpName, swUp, swTargets[i].transform);
                 }
-                else
+
+                if (swTargets[i].name.Equals("BY_ZhaHou"))
                 {
-                    for (int j = 0; j < TK_targs.Length; j++)
-                    {
-                        if (TK_targs[j].gameObject.name == objName)
-                        {
-                            _shuiWeiIconCtrls[i].targetTransForm = TK_targs[j].transform;
-                            break;
-                        }
-                    }
+                    swXY.SetData(swDownName, swDown, swTargets[i].transform);
                 }
             }
         }
         else
         {
-            for (int i = 0; i < GlobalData.BuYuanShuiWeiDataList.Count; i++)
+            float? swUp = null;
+            float? swDown = null;
+            string swUpName = "";
+            string swDownName = "";
+            for (int i = 0; i < GlobalData.swDatas.Count; i++)
             {
-                _shuiWeiIconCtrls[i].Init(GlobalData.BuYuanShuiWeiDataList[i]);
+                if (GlobalData.swDatas[i].stnm == "套口(上)")
+                {
+                    swUp = GlobalData.swDatas[i].upz;
+                    swUpName = GlobalData.swDatas[i].stnm;
+                }
+
+                if (GlobalData.swDatas[i].stnm == "套口(下)")
+                {
+                    swDown = GlobalData.swDatas[i].dwz;
+                    swDownName = GlobalData.swDatas[i].stnm;
+                }
             }
-        }
-    }
 
+            var swTargets = GameObject.FindGameObjectsWithTag("TK_SW");
+            for (int i = 0; i < swTargets.Length; i++)
+            {
+                if (swTargets[i].name.Equals("TK_ZhaQian"))
+                {
+                    swSY.SetData(swUpName, swUp, swTargets[i].transform);
+                }
 
+                if (swTargets[i].name.Equals("TK_ZhaHou"))
+                {
+                    swXY.SetData(swDownName, swDown, swTargets[i].transform);
+                }
+            }
+        }
+    }
 
 
     public void Init()
     {
+        swSY.Init();
+        swXY.Init();
+
         //全域雨量
         _dangQianYuLiangText = this.transform.Find("Left/QuanYuYuLiang/DangQianYuLiang/numText").GetComponent<Text>();
         _zuiDaYuLiangText = this.transform.Find("Left/QuanYuYuLiang/ZuiDaYuLiang/numText").GetComponent<Text>();
@@ -356,8 +384,6 @@ public class SWYJLayer : YZTRootLayer
         _weatherTypeIcon = this.transform.Find("Left/QuanYuYuLiang/weatherIcon").GetComponent<Image>();
 
 
-
-
         //工程安全监测
         //检测数据
         _pingJunShuiWeiText = this.transform.Find("RightUp/JianKongShuJu/PingJunShuiWei/numText").GetComponent<Text>();
@@ -414,7 +440,8 @@ public class SWYJLayer : YZTRootLayer
                 SWHeightUnit swHUnit = gameObject.GetComponent<SWHeightUnit>();
                 swHUnit.transform.SetParent(miniMapSWContent.transform);
                 float max = math.max(GlobalData.swDatas[i].upz ?? 0, GlobalData.swDatas[i].dwz ?? 0);
-                swHUnit.Init(GlobalData.swDatas[i].lgtd, GlobalData.swDatas[i].lttd, GlobalData.swDatas[i].stnm, max.ToString());
+                swHUnit.Init(GlobalData.swDatas[i].lgtd, GlobalData.swDatas[i].lttd, GlobalData.swDatas[i].stnm,
+                    max.ToString());
                 sWHeightUnits.Add(swHUnit);
 
                 swHUnit.bingObj = Instantiate(runtimePointObj).gameObject;
@@ -432,12 +459,15 @@ public class SWYJLayer : YZTRootLayer
             for (int i = 0; i < GlobalData.swDatas.Count; i++)
             {
                 float max = math.max(GlobalData.swDatas[i].upz ?? 0, GlobalData.swDatas[i].dwz ?? 0);
-                sWHeightUnits[i].Init(GlobalData.swDatas[i].lgtd, GlobalData.swDatas[i].lttd, GlobalData.swDatas[i].stnm, max.ToString());
+                sWHeightUnits[i].Init(GlobalData.swDatas[i].lgtd, GlobalData.swDatas[i].lttd,
+                    GlobalData.swDatas[i].stnm, max.ToString());
             }
         }
+
         miniMap.gameObject.SetActive(true);
         main.gameObject.SetActive(false);
     }
+
     public void OnShuiWeiDropDownSelect(int value)
     {
         if (currentDataType == shuiWeiYuJingDataType.BuYuan)
@@ -474,7 +504,6 @@ public class SWYJLayer : YZTRootLayer
 
     public void SetShuiWeiTongJiBarChart(ShuiWeiBianHuaData shuiWeiBianHuaData)
     {
-
         shuiWeiBianHuaData.InverseAllData();
         string yearTitle = shuiWeiBianHuaData.GetYearRange();
         if (shuiWeiBianHuaData != null)
@@ -488,9 +517,10 @@ public class SWYJLayer : YZTRootLayer
                 string monthDay = date.ToString("MM-dd"); // 结果为"03-30"
                 x_chart.data.Add(monthDay);
             }
+
             x_chart.axisName.name = yearTitle;
             x_chart.refreshComponent?.Invoke();
-            
+
             var tempSeries = shuiWeiBianHua.series;
             tempSeries[0].ClearData();
             tempSeries[1].ClearData();
@@ -531,12 +561,12 @@ public class SWYJLayer : YZTRootLayer
                 obj.transform.GetChild(0).GetChild(0).GetComponent<Text>().text = "2";
             else
                 obj.transform.GetChild(0).GetChild(0).GetComponent<Text>().text = i + "";
-            obj.transform.GetChild(1).GetChild(0).GetComponent<Text>().text = $"{max} <size=14><color=#A5BBE2>m</color></size>";
+            obj.transform.GetChild(1).GetChild(0).GetComponent<Text>().text =
+                $"{max} <size=14><color=#A5BBE2>m</color></size>";
         }
     }
 
 
-
     public void ChangeDataType(shuiWeiYuJingDataType _type)
     {
         if (currentDataType != _type)