Преглед на файлове

异常详细信息改为中文,机房巡检步骤上报增加图片ID,ShowXunJian第九步Error图标异常

蓝色星空 преди 1 година
родител
ревизия
fa24c94e61

+ 4 - 4
Assets/Game/Blue/Controller/Item/ShowXunJian_UIItem.cs

@@ -45,7 +45,7 @@ public class ShowXunJian_UIItem : MonoBehaviour, IController
 
     public void Set()
     {
-        this.GetService<IInspectionService>().Set(mItemID, mNormal, mOutliers, mInspectionId);
+        this.GetService<IInspectionService>().Set(mItemID, mNormal, mOutliers, mInspectionId, new string[3] { "1", "2", "3" });
     }
 
     public void InitData(int ItemID, int InspectionId, InspectionStep InspectionStep = null)
@@ -69,16 +69,16 @@ public class ShowXunJian_UIItem : MonoBehaviour, IController
     private float mErrorBtn_go_offset = 319;
     public void SetlabelBtnCount(string[] labelList)
     {
-        foreach(string label in labelList)
+        foreach (string label in labelList)
         {
-            GameObject go = Instantiate(mErrorBtn_go,mErrorBtn_go.transform.parent);
+            GameObject go = Instantiate(mErrorBtn_go, mErrorBtn_go.transform.parent);
             go.GetComponentInChildren<TMP_Text>().text = label;
             go.name = label;
             Vector3 v3 = mErrorBtn_go.transform.localPosition;
             v3.x += mErrorBtn_go_offset;
             go.transform.localPosition = v3;
             go.SetActive(true);
-            go.GetComponent<Button>().onClick.AddListener(()=>
+            go.GetComponent<Button>().onClick.AddListener(() =>
             {
                 LabelText_Input.text += go.name;
                 mOutliers = LabelText_Input.text;

+ 21 - 1
Assets/Game/Blue/RTC/Info/InspectionInfo.cs

@@ -2,7 +2,7 @@ using System;
 using System.Collections.Generic;
 
 /// <summary>
-/// 巡检
+/// 机房巡检步骤上报
 /// </summary>
 [Serializable]
 public class InspectionInfo
@@ -12,6 +12,9 @@ public class InspectionInfo
     public Dictionary<string,InspectionStep> steps;
 }
 
+/// <summary>
+/// 机房巡检步骤上报---items
+/// </summary>
 [Serializable]
 public class InspectionItem
 {
@@ -20,10 +23,27 @@ public class InspectionItem
     public string[] label; // 标签列表
 }
 
+/// <summary>
+/// 机房巡检步骤上报---steps
+/// </summary>
 [Serializable]
 public class InspectionStep
 {
     public bool normal; // 是否正常
     public string outliers; // 标签信息
     public string[] images; // 图片
+}
+
+
+/// <summary>
+/// 机房巡检步骤上报
+/// </summary>
+[Serializable]
+public class InspectionStepSet
+{
+    public int itemId; // 检查项目的编号 1-12
+    public bool normal; // 是否正常
+    public string outliers; // 标签
+    public int inspectionId; // 巡检编号,巡检开始时返回的id
+    public string[] imageIds; // 图片文件ID 最多三个
 }

+ 19 - 7
Assets/Game/Blue/RTC/Service/InspectionService.cs

@@ -42,14 +42,26 @@ public class InspectionService : IInspectionService
             }));
     }
 
-    public void Set(int ItemID,bool Normal,string Label,int InspectionId)
+    /// <summary>
+    /// 机房巡检步骤上报
+    /// </summary>
+    /// <param name="ItemID">检查项目的编号 1-12</param>
+    /// <param name="Normal">是否正常</param>
+    /// <param name="Outliers">标签</param>
+    /// <param name="InspectionId">巡检编号,巡检开始时返回的id</param>
+    /// <param name="ImageIds">图片文件ID 最多三个</param>
+    public void Set(int ItemID, bool Normal, string Outliers, int InspectionId, string[] ImageIds)
     {
-        JsonData data = new JsonData();
-        data["itemId"] = ItemID;
-        data["normal"] = Normal;
-        data["outliers"] = Label;
-        data["inspectionId"] = InspectionId;
-        CoroutineSystem.Instance.StartCoroutine(HttpTool.Instance.SendHttp(HttpActionLang.inspection_step, data.ToJson(), message =>
+        InspectionStepSet mInspectionStepSet = new InspectionStepSet()
+        {
+            itemId = ItemID,
+            normal = Normal,
+            outliers = Outliers,
+            inspectionId = InspectionId,
+            imageIds = ImageIds
+        };
+        string JsonString = JsonConvert.SerializeObject(mInspectionStepSet);
+        CoroutineSystem.Instance.StartCoroutine(HttpTool.Instance.SendHttp(HttpActionLang.inspection_step, JsonString, message =>
         {
             JObject jobject = JObject.Parse(message);
             if (jobject["code"].ToString() == "200" && !string.IsNullOrWhiteSpace(jobject["data"].ToString()))

+ 11 - 1
Assets/Game/Blue/RTC/Service/接口/IInspectionService.cs

@@ -3,6 +3,16 @@ using Blue;
 public interface IInspectionService : IService
 {
     InspectionInfo InspectionInfo { get; }
+
     void Get();
-    void Set(int ItemID,bool Normal,string Label,int InspectionId);
+
+    /// <summary>
+    /// 机房巡检步骤上报
+    /// </summary>
+    /// <param name="ItemID">检查项目的编号 1-12</param>
+    /// <param name="Normal">是否正常</param>
+    /// <param name="Outliers">标签</param>
+    /// <param name="InspectionId">巡检编号,巡检开始时返回的id</param>
+    /// <param name="ImageIds">图片文件ID 最多三个</param>
+    void Set(int ItemID, bool Normal, string Label, int InspectionId, string[] ImageIds);
 }

+ 2 - 2
Assets/Game/PrefabTemplate/借用_XunjianToogleUI.prefab

@@ -348,7 +348,7 @@ MonoBehaviour:
     m_HorizontalOverflow: 0
     m_VerticalOverflow: 0
     m_LineSpacing: 1
-  m_Text: Enter text...
+  m_Text: "\u8BF7\u8F93\u5165\u8BE6\u7EC6\u4FE1\u606F..."
 --- !u!1 &975195068224255628
 GameObject:
   m_ObjectHideFlags: 0
@@ -2169,7 +2169,7 @@ MonoBehaviour:
   m_charWidthMaxAdj: 0
   m_enableWordWrapping: 1
   m_wordWrappingRatios: 0.4
-  m_overflowMode: 0
+  m_overflowMode: 1
   m_linkedTextComponent: {fileID: 0}
   parentLinkedComponent: {fileID: 0}
   m_enableKerning: 0

+ 2 - 1
Assets/Game/ShowXunJian/ShowXunJian.prefab

@@ -457,7 +457,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 1, y: 1}
   m_AnchorMax: {x: 1, y: 1}
-  m_AnchoredPosition: {x: -2110, y: -30}
+  m_AnchoredPosition: {x: -30, y: -30}
   m_SizeDelta: {x: 80, y: 80}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &2289804074462216128
@@ -7344,6 +7344,7 @@ MonoBehaviour:
           m_BoolArgument: 1
         m_CallState: 2
   currentUIItem: {fileID: 0}
+  LastUIItem: {fileID: 0}
   ItemNameTextList:
   - {fileID: 1108556361098302881}
   - {fileID: 5578992365418269874}