Sfoglia il codice sorgente

B08任务列表部分逻辑

Void_F 6 mesi fa
parent
commit
2c876dbb4c

BIN
Assets/Art/UI/YZT/B08/icon_arrow.png


+ 147 - 0
Assets/Art/UI/YZT/B08/icon_arrow.png.meta

@@ -0,0 +1,147 @@
+fileFormatVersion: 2
+guid: 779fcdc003aef524e8c25ec53e62b282
+TextureImporter:
+  internalIDToNameTable: []
+  externalObjects: {}
+  serializedVersion: 12
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 0
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapsPreserveCoverage: 0
+    alphaTestReferenceValue: 0.5
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  streamingMipmaps: 0
+  streamingMipmapsPriority: 0
+  vTOnly: 0
+  ignoreMasterTextureLimit: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    serializedVersion: 2
+    filterMode: 1
+    aniso: 1
+    mipBias: 0
+    wrapU: 1
+    wrapV: 1
+    wrapW: 0
+  nPOTScale: 0
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 1
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spritePixelsToUnits: 100
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spriteGenerateFallbackPhysicsShape: 1
+  alphaUsage: 1
+  alphaIsTransparency: 0
+  spriteTessellationDetail: -1
+  textureType: 8
+  textureShape: 1
+  singleChannelComponent: 0
+  flipbookRows: 1
+  flipbookColumns: 1
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  ignorePngGamma: 0
+  applyGammaDecoding: 0
+  cookieLightType: 0
+  platformSettings:
+  - serializedVersion: 3
+    buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: WebGL
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Standalone
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Android
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Server
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+    physicsShape: []
+    bones: []
+    spriteID: 5e97eb03825dee720800000000000000
+    internalID: 0
+    vertices: []
+    indices: 
+    edges: []
+    weights: []
+    secondaryTextures: []
+    nameFileIdTable: {}
+  spritePackingTag: 
+  pSDRemoveMatte: 0
+  pSDShowRemoveMatteOption: 0
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 17 - 0
Assets/Prefabs/UI/Item/PointItem.prefab

@@ -131,6 +131,7 @@ GameObject:
   m_Component:
   - component: {fileID: 6380794509415626336}
   - component: {fileID: 6940519253357956703}
+  - component: {fileID: 1542081016859774888}
   m_Layer: 5
   m_Name: PointItem
   m_TagString: Untagged
@@ -171,6 +172,22 @@ CanvasRenderer:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 5031127884736356578}
   m_CullTransparentMesh: 1
+--- !u!114 &1542081016859774888
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 5031127884736356578}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 4de37c9110e12144ab85ae23ce281982, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  itemIndex: 0
+  posAndtimeText: {fileID: 4566918355548952672}
+  messageText: {fileID: 4208668523066118826}
+  imgButton: {fileID: 2511432421060659303}
 --- !u!1 &7191653453359174962
 GameObject:
   m_ObjectHideFlags: 0

+ 52 - 107
Assets/Prefabs/UI/Item/xunJianRenWuItem.prefab

@@ -200,9 +200,9 @@ RectTransform:
   m_Father: {fileID: 0}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0, y: 0}
-  m_AnchorMax: {x: 0, y: 0}
-  m_AnchoredPosition: {x: 0, y: 0}
+  m_AnchorMin: {x: 0.5, y: 0.5}
+  m_AnchorMax: {x: 0.5, y: 0.5}
+  m_AnchoredPosition: {x: -960, y: -540}
   m_SizeDelta: {x: 360, y: 354}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &3036474857411095205
@@ -264,6 +264,9 @@ MonoBehaviour:
   moreButton: {fileID: 0}
   moreMessage: 0
   rect: {fileID: 0}
+  pointItemPrefab: {fileID: 5031127884736356578, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
+  PointItems: []
+  itemContent: {fileID: 2753270198851302937}
 --- !u!1 &3468084397990988624
 GameObject:
   m_ObjectHideFlags: 0
@@ -312,6 +315,7 @@ GameObject:
   - component: {fileID: 6937491493320732695}
   - component: {fileID: 3308441760696936670}
   - component: {fileID: 7366750946375338644}
+  - component: {fileID: 679458165368102963}
   m_Layer: 5
   m_Name: ctrlText
   m_TagString: Untagged
@@ -381,6 +385,50 @@ MonoBehaviour:
     m_VerticalOverflow: 0
     m_LineSpacing: 1
   m_Text: "\u64CD\u4F5C"
+--- !u!114 &679458165368102963
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 4289638360896212207}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Navigation:
+    m_Mode: 3
+    m_WrapAround: 0
+    m_SelectOnUp: {fileID: 0}
+    m_SelectOnDown: {fileID: 0}
+    m_SelectOnLeft: {fileID: 0}
+    m_SelectOnRight: {fileID: 0}
+  m_Transition: 1
+  m_Colors:
+    m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
+    m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+    m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+    m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+    m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
+    m_ColorMultiplier: 1
+    m_FadeDuration: 0.1
+  m_SpriteState:
+    m_HighlightedSprite: {fileID: 0}
+    m_PressedSprite: {fileID: 0}
+    m_SelectedSprite: {fileID: 0}
+    m_DisabledSprite: {fileID: 0}
+  m_AnimationTriggers:
+    m_NormalTrigger: Normal
+    m_HighlightedTrigger: Highlighted
+    m_PressedTrigger: Pressed
+    m_SelectedTrigger: Selected
+    m_DisabledTrigger: Disabled
+  m_Interactable: 1
+  m_TargetGraphic: {fileID: 7366750946375338644}
+  m_OnClick:
+    m_PersistentCalls:
+      m_Calls: []
 --- !u!1 &4659476670153129548
 GameObject:
   m_ObjectHideFlags: 0
@@ -657,8 +705,7 @@ RectTransform:
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
-  m_Children:
-  - {fileID: 8655553107316562743}
+  m_Children: []
   m_Father: {fileID: 4442041889986232426}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -1023,105 +1070,3 @@ MonoBehaviour:
   m_OnValueChanged:
     m_PersistentCalls:
       m_Calls: []
---- !u!1001 &2347379799235423575
-PrefabInstance:
-  m_ObjectHideFlags: 0
-  serializedVersion: 2
-  m_Modification:
-    m_TransformParent: {fileID: 2753270198851302937}
-    m_Modifications:
-    - target: {fileID: 5031127884736356578, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
-      propertyPath: m_Name
-      value: PointItem
-      objectReference: {fileID: 0}
-    - target: {fileID: 6380794509415626336, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
-      propertyPath: m_Pivot.x
-      value: 0.5
-      objectReference: {fileID: 0}
-    - target: {fileID: 6380794509415626336, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
-      propertyPath: m_Pivot.y
-      value: 0.5
-      objectReference: {fileID: 0}
-    - target: {fileID: 6380794509415626336, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
-      propertyPath: m_RootOrder
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 6380794509415626336, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
-      propertyPath: m_AnchorMax.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 6380794509415626336, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
-      propertyPath: m_AnchorMax.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 6380794509415626336, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
-      propertyPath: m_AnchorMin.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 6380794509415626336, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
-      propertyPath: m_AnchorMin.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 6380794509415626336, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
-      propertyPath: m_SizeDelta.x
-      value: 340
-      objectReference: {fileID: 0}
-    - target: {fileID: 6380794509415626336, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
-      propertyPath: m_SizeDelta.y
-      value: 90
-      objectReference: {fileID: 0}
-    - target: {fileID: 6380794509415626336, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
-      propertyPath: m_LocalPosition.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 6380794509415626336, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
-      propertyPath: m_LocalPosition.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 6380794509415626336, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
-      propertyPath: m_LocalPosition.z
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 6380794509415626336, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
-      propertyPath: m_LocalRotation.w
-      value: 1
-      objectReference: {fileID: 0}
-    - target: {fileID: 6380794509415626336, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
-      propertyPath: m_LocalRotation.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 6380794509415626336, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
-      propertyPath: m_LocalRotation.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 6380794509415626336, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
-      propertyPath: m_LocalRotation.z
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 6380794509415626336, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
-      propertyPath: m_AnchoredPosition.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 6380794509415626336, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
-      propertyPath: m_AnchoredPosition.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 6380794509415626336, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
-      propertyPath: m_LocalEulerAnglesHint.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 6380794509415626336, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
-      propertyPath: m_LocalEulerAnglesHint.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 6380794509415626336, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
-      propertyPath: m_LocalEulerAnglesHint.z
-      value: 0
-      objectReference: {fileID: 0}
-    m_RemovedComponents: []
-  m_SourcePrefab: {fileID: 100100000, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
---- !u!224 &8655553107316562743 stripped
-RectTransform:
-  m_CorrespondingSourceObject: {fileID: 6380794509415626336, guid: c1d384ff4ac793947969fffc3e358847, type: 3}
-  m_PrefabInstance: {fileID: 2347379799235423575}
-  m_PrefabAsset: {fileID: 0}

File diff suppressed because it is too large
+ 674 - 34
Assets/Prefabs/UI/XHYZT/GCYW.prefab


File diff suppressed because it is too large
+ 1 - 98
Assets/Scene 1.unity


+ 33 - 0
Assets/Scripts/HttpGetData.cs

@@ -312,4 +312,37 @@ public class CharData_item
     public int value;
 }
 
+[Serializable]
+public class B08_TaskListInfoData
+{
+    public B08_TaskListInfo data;
+}
+[Serializable]
+public class B08_TaskListInfo
+{
+    public B08_TaskInfoData[] list;
+    public int type;
+}
+[Serializable]
+public class B08_TaskInfoData
+{
+    public string task_id;
+    public string type;
+    public string xunjian_scope;
+    public string status;
+    public string start_time;
+    public B08_TaskItems[] task_items;
+}
+[Serializable]
+public class B08_TaskItems
+{
+    public string elevation;//高度
+    public string item_id;
+    public string img_path;
+    public string latitude;//维度
+    public string item_name;
+    public string longitude;//经度
+}
+
+
 #endregion

+ 27 - 2
Assets/Scripts/HttpHelper.cs

@@ -1517,9 +1517,18 @@ public class HttpHelper : MonoBehaviour
 
         try
         {
-            jsonStr = await B08_API_data(ServerAddress.API_B08_inspectType, type);
+            //jsonStr = await B08_API_data(ServerAddress.API_B08_inspectType, type);
+            //todo 特殊操作一下只有补元的
+            jsonStr = await B08_API_data(ServerAddress.API_B08_inspectType, 2);
             Debug.Log("API_B08_inspectType" + jsonStr);
             GlobalData.B08InspectType = JsonConvert.DeserializeObject<B08_inspectType>(jsonStr);
+            GlobalData.B08TaskListInfos = new B08_TaskListInfoData[GlobalData.B08InspectType.data.Length];
+            for (int i = 0; i < GlobalData.B08InspectType.data.Length; i++)
+            {
+                string tempResult = await B08_API_TaskInfo(i);
+                Debug.Log($"B08_API_TaskInfo type={i}:" + tempResult);
+                GlobalData.B08TaskListInfos[i]= JsonConvert.DeserializeObject<B08_TaskListInfoData>(tempResult);
+            }
         }
         catch (Exception e)
         {
@@ -1533,7 +1542,7 @@ public class HttpHelper : MonoBehaviour
         {
             cmdUrl += "1794245918999351298";
         }
-        else
+        else if(type==1)
         {
             cmdUrl += "1798366756789653505";
         }
@@ -1551,6 +1560,22 @@ public class HttpHelper : MonoBehaviour
         www.Dispose();
         return result;
     }
+    public async Task<string> B08_API_TaskInfo(int type)
+    {
+        Debug.Log("!!!:"+ServerAddress.API_B08_taskInfo+type);
+        UnityWebRequest www = new UnityWebRequest(ServerAddress.API_B08_taskInfo+type, "Get");
+        www.downloadHandler = new DownloadHandlerBuffer();
+        www.SetRequestHeader("Content-Type", "application/json");
+        await www.SendWebRequest();
+        if (www.result != UnityWebRequest.Result.Success)
+        {
+            Debug.LogWarning($"获取B08_API_TaskInfo type={type} 数据不成功,原因:返request不成功:" + www.downloadHandler.text);
+        }
+        string result = www.downloadHandler.text;
+        www.Dispose();
+        return result;
+    }
+    
 
     /// <summary>
     /// 获取站点水位信息

+ 1 - 0
Assets/Scripts/UI/Data/GlobalData.cs

@@ -86,6 +86,7 @@ public class GlobalData
     public static B08_event B08Event;
     public static B08_questionStatis B08QuestionStatis;
     public static B08_inspectType B08InspectType;
+    public static B08_TaskListInfoData[] B08TaskListInfos;
     public static int B08_Type = -1;
     #endregion   
     

+ 52 - 1
Assets/Scripts/UI/Item/B08_TaskListItem.cs

@@ -18,6 +18,12 @@ public class B08_TaskListItem : MonoBehaviour
 
     public bool moreMessage = false;
     public RectTransform rect;
+
+    public GameObject pointItemPrefab;
+    public List<B08_TaskPointItem> PointItems = new List<B08_TaskPointItem>();
+    public Transform itemContent;
+    public B08_TaskInfoData InfoData;
+    public GCYWLayer gcywLayer;
     public void Init()
     {
         rect = this.GetComponent<RectTransform>();
@@ -34,6 +40,10 @@ public class B08_TaskListItem : MonoBehaviour
         moreButton = ctrlText.GetComponent<Button>();
         moreButton.onClick.AddListener(ChangeMoreMessage);
 
+        moreMessage = false;
+        ctrlText.text = "详情";
+        rect.sizeDelta = new Vector2(360,38);
+        more.SetActive(false);
     }
 
     public void ChangeMoreMessage()
@@ -47,10 +57,51 @@ public class B08_TaskListItem : MonoBehaviour
         else
         {
             ctrlText.text = "收起";
-            rect.sizeDelta = new Vector2(360,254);
+            rect.sizeDelta = new Vector2(360,354);
             more.SetActive(true);
+            gcywLayer.SetTaskImgPanelData(InfoData.task_items);
         }
 
         moreMessage = !moreMessage;
     }
+
+    public void SetData(GCYWLayer baseLayer,B08_TaskInfoData data,int typeIndex)
+    {
+        gcywLayer = baseLayer;
+        InfoData = data;
+        string typeStr = "";
+        switch (typeIndex)
+        {
+            case 0:
+                typeStr = "电气";
+                break;
+            case 1:
+                typeStr = "闸站";
+                break;
+            case 2:
+                typeStr = "堤防";
+                break;
+            case 3:
+                typeStr = "交叉建筑";
+                break;
+            case 4:
+                typeStr = "定期专项";
+                break;
+        }
+        typeText.text = typeStr;
+        titleText.text = data.type;
+        stateText.text = data.status;
+        dateText.text = data.start_time;
+        for (int i = 0; i < PointItems.Count; i++)
+        {
+            Destroy(PointItems[i].gameObject);
+        }
+        PointItems.Clear();
+        for (int i = 0; i < data.task_items.Length; i++)
+        {
+            B08_TaskPointItem tempItem = Instantiate(pointItemPrefab,itemContent).GetComponent<B08_TaskPointItem>();
+            tempItem.SetData(baseLayer,data.task_items[i],i,data.start_time);
+            PointItems.Add(tempItem);
+        }
+    }
 }

+ 6 - 1
Assets/Scripts/UI/Tools/ServerAddress.cs

@@ -105,8 +105,13 @@ public class ServerAddress
     public static string API_B08_projectExamine = YZTServerAddress + "/open/projectExamine?projectId=";
     public static string API_B08_event = YZTServerAddress + "/open/event?projectId=";
     public static string API_B08_questionStatis = YZTServerAddress + "/open/questionStatis?projectId=";
-    public static string API_B08_inspectType = YZTServerAddress + "/open/inspectType?projectId=";
+    //public static string API_B08_inspectType = YZTServerAddress + "/open/inspectType?projectId=";
+    //只有补元的 先写死了
+    public static string API_B08_inspectType = YZTServerAddress + "/open/xunjianType";
     
+    //拿任务详细信息 (看起来是乱嗨写的)
+    public static string API_B08_taskInfo = YZTServerAddress + "/open/xunjianrenwu?xunjian_type=";
+  
     /// <summary>
     /// 获取站点水位信息(折线图和信息列表)
     /// </summary>

+ 31 - 0
Assets/Scripts/UI/UIView/GCYW/B08_TaskPointItem.cs

@@ -0,0 +1,31 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+public class B08_TaskPointItem : MonoBehaviour
+{
+    public int itemIndex;
+    public Text posAndtimeText;
+
+    public Text messageText;
+
+    public Button imgButton;
+    private GCYWLayer gcywLayer;
+    private void Awake()
+    {
+        imgButton.onClick.AddListener(() =>
+        {
+            gcywLayer.OpenTaskImgPanel();
+        });
+    }
+
+    public void SetData(GCYWLayer baseLayer,B08_TaskItems data,int index,string time)
+    {
+        gcywLayer = baseLayer;
+        itemIndex = index;
+        posAndtimeText.text = $"{(index==0?"起点":"")}  <color=#A5BFE2>{time}</color>";
+        messageText.text = $"{data.item_name}";
+    }
+}

+ 11 - 0
Assets/Scripts/UI/UIView/GCYW/B08_TaskPointItem.cs.meta

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

+ 39 - 10
Assets/Scripts/UI/UIView/GCYW/GCYWLayer.cs

@@ -3,6 +3,7 @@ using System.Collections;
 using System.Collections.Generic;
 using MPUIKIT;
 using UnityEngine;
+using UnityEngine.Serialization;
 using UnityEngine.UI;
 using XCharts.Runtime;
 
@@ -52,6 +53,11 @@ public class GCYWLayer : YZTRootLayer
     private Text diFangCountText;
     private Text jiaoChaJianZhuCountText;
     private Text dingQiZhuanXiangCountText;
+    private Button dianQiButton;
+    private Button zhaZhanButton;
+    private Button diFangButton;
+    private Button jianChaJianZhuButton;
+    private Button diQiZhuanXiangButton;
 
     //工程管理
     private PieChart gongChengGuanLiChart;
@@ -68,15 +74,11 @@ public class GCYWLayer : YZTRootLayer
     private CanvasGroup button_CG1;
     private CanvasGroup button_CG2;
 
-    public GameObject TaskListPanel;
-    public Button taskTpye_allButton;
-    public Button taskTpye_dianQiButton;
-    public Button taskTpye_zhaZhanButton;
-    public Button taskTpye_diFangButton;
-    public Button taskTpye_jianZhuButton;
-    public Button taskTpye_zhuanXiangButton;
-    
+    [FormerlySerializedAs("TaskListPanel")] public GameObject TaskListPanelObj;
+    public TaskListPanel taskListPanel;
 
+    public GameObject taskPhotoPanelObj;
+    public TaskPhotoPanel taskPhotoPanel;
     private void Awake()
     {
         Init();
@@ -123,7 +125,16 @@ public class GCYWLayer : YZTRootLayer
         diFangCountText = this.transform.Find("XunJianLeiXingZongJi/DiFang/count").GetComponent<Text>();
         jiaoChaJianZhuCountText = this.transform.Find("XunJianLeiXingZongJi/JiaoChaJianZhu/count").GetComponent<Text>();
         dingQiZhuanXiangCountText = this.transform.Find("XunJianLeiXingZongJi/DingQiZhuanXiang/count").GetComponent<Text>();
-
+        dianQiButton = dianQiCountText.transform.parent.GetComponent<Button>();
+        zhaZhanButton = zhaZhanCountText.transform.parent.GetComponent<Button>();
+        diFangButton = diFangCountText.transform.parent.GetComponent<Button>();
+        jianChaJianZhuButton = jiaoChaJianZhuCountText.transform.parent.GetComponent<Button>();
+        diQiZhuanXiangButton = dingQiZhuanXiangCountText.transform.parent.GetComponent<Button>();
+        dianQiButton.onClick.AddListener(()=>OpenTaskListPanel(0));
+        zhaZhanButton.onClick.AddListener(()=>OpenTaskListPanel(1));
+        diFangButton.onClick.AddListener(()=>OpenTaskListPanel(2));
+        jianChaJianZhuButton.onClick.AddListener(()=>OpenTaskListPanel(3));
+        diQiZhuanXiangButton.onClick.AddListener(()=>OpenTaskListPanel(4));
 
         checkPathButton = this.transform.Find("CheckPathButton").GetComponent<Button>();
         checkPathButtonText = checkPathButton.GetComponentInChildren<Text>();
@@ -163,6 +174,8 @@ public class GCYWLayer : YZTRootLayer
 
     private async void OnEnable()
     {
+        TaskListPanelObj.SetActive(false);
+        taskPhotoPanelObj.SetActive(false);
         ChangeData(0);
     }
 
@@ -306,7 +319,7 @@ public class GCYWLayer : YZTRootLayer
         zhaZhanCountText.text = tempData.data[1].value.ToString();
         diFangCountText.text = tempData.data[2].value.ToString();
         jiaoChaJianZhuCountText.text = tempData.data[3].value.ToString();
-       // dingQiZhuanXiangCountText.text = tempData.data[4].value.ToString();
+        dingQiZhuanXiangCountText.text = tempData.data[4].value.ToString();
     }
 
 
@@ -317,4 +330,20 @@ public class GCYWLayer : YZTRootLayer
         string textStr = showCheckPath ? "隐藏" : "显示";
         checkPathButtonText.text = $"巡检路线({textStr})";
     }
+
+    public void OpenTaskListPanel(int type)
+    {
+        taskListPanel.SetData(this);
+        TaskListPanelObj.SetActive(true);
+    }
+
+    public void SetTaskImgPanelData(B08_TaskItems[] itemsArray)
+    {
+       taskPhotoPanel.SetData(itemsArray);
+    }
+    
+    public void OpenTaskImgPanel()
+    {
+        taskPhotoPanelObj.SetActive(true);
+    }
 }

+ 52 - 0
Assets/Scripts/UI/UIView/GCYW/TaskListPanel.cs

@@ -0,0 +1,52 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+public class TaskListPanel : MonoBehaviour
+{
+    public Button taskTpye_allButton;
+    public Button taskTpye_dianQiButton;
+    public Button taskTpye_zhaZhanButton;
+    public Button taskTpye_diFangButton;
+    public Button taskTpye_jianZhuButton;
+    public Button taskTpye_zhuanXiangButton;
+
+    public GameObject taskItemPrefab;
+    
+    public Transform itemContent;
+    
+    public List<B08_TaskListItem> taskItemList = new List<B08_TaskListItem>();
+
+    public GCYWLayer gcywLayer;
+
+    private void Awake()
+    {
+           
+    }
+
+    public void SetData(GCYWLayer baseLayer)
+    {
+        gcywLayer = baseLayer;
+        for (int i = 0; i < taskItemList.Count; i++)
+        {
+            Destroy(taskItemList[i].gameObject);
+        }
+        taskItemList.Clear();
+        for (int i = 0; i < GlobalData.B08TaskListInfos.Length; i++)
+        {
+            var taskInfoList = GlobalData.B08TaskListInfos[i].data.list;
+            if (taskInfoList != null)
+            {
+                for (int j = 0; j < taskInfoList.Length; j++)
+                {
+                    B08_TaskListItem tempItem = Instantiate(taskItemPrefab, itemContent).GetComponent<B08_TaskListItem>();
+                    tempItem.Init();
+                    tempItem.SetData(gcywLayer,taskInfoList[j],i);
+                    taskItemList.Add(tempItem);
+                }
+            }
+        }
+    }
+}

+ 11 - 0
Assets/Scripts/UI/UIView/GCYW/TaskListPanel.cs.meta

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

+ 58 - 0
Assets/Scripts/UI/UIView/GCYW/TaskPhotoPanel.cs

@@ -0,0 +1,58 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+public class TaskPhotoPanel : MonoBehaviour
+{
+    public RawImage img;
+    public Text posText;
+    public Text messageText;
+    public Text pageText;
+    public Button lastItem;
+    public Button nextItem;
+    
+    public B08_TaskItems[] task_items;
+    public int currentIndex = 0;
+
+    private void Awake()
+    {
+        lastItem.onClick.AddListener(Last);
+        nextItem.onClick.AddListener(Next);
+    }
+
+    public void SetData(B08_TaskItems[] items)
+    {
+        currentIndex = 0;
+        task_items = items;
+        ChangePage(currentIndex);
+    }
+
+    public void Next()
+    {
+        if (currentIndex < task_items.Length - 1)
+        {
+            currentIndex++;
+            ChangePage(currentIndex);
+        }
+    }
+
+    public void Last()
+    {
+        if (currentIndex > 0)
+        {
+            currentIndex--;
+            ChangePage(currentIndex);
+        }
+    }
+
+    public void ChangePage(int pageIndex)
+    {
+        var currentData = task_items[pageIndex];
+        TextureLoadHelp._Instance.LoadTexFromUrl(currentData.img_path,img);
+        posText.text = currentData.item_name;
+        messageText.text = currentData.item_name;
+        pageText.text = $"{pageIndex + 1}/{task_items.Length}";
+    }
+}

+ 11 - 0
Assets/Scripts/UI/UIView/GCYW/TaskPhotoPanel.cs.meta

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

Some files were not shown because too many files changed in this diff