Browse Source

根据后端结构修改代码

蓝色星空 1 năm trước cách đây
mục cha
commit
5edfb77337

+ 30 - 8
Assets/Game/Blue/Controller/Item/ShowXunJian_UIItem.cs

@@ -1,5 +1,5 @@
 using System.Collections;
-using System.Collections.Generic;
+using TMPro;
 using Blue;
 using GHZLangChao;
 using SC.XR.Unity;
@@ -20,11 +20,13 @@ public class ShowXunJian_UIItem : MonoBehaviour, IController
 
     [SerializeField] private SCInputField LabelText_Input;
 
+    [SerializeField] private GameObject mErrorBtn_go;
+
     private void Start()
     {
         mNormal_Btn.onClick.AddListener(NormalClick);
         Warning_Btn.onClick.AddListener(WarningClick);
-        LabelText_Input.onValueChanged.AddListener(NewStr => mLabel = NewStr);
+        LabelText_Input.onValueChanged.AddListener(NewStr => mOutliers = NewStr);
     }
     private void OnEnable()
     {
@@ -38,12 +40,12 @@ public class ShowXunJian_UIItem : MonoBehaviour, IController
 
     private int mItemID; // 检查项目的编号 1-12
     private bool mNormal = true; //是否正常
-    private string mLabel = ""; // 标签
+    private string mOutliers = ""; // 标签
     private int mInspectionId; // 巡检编号,巡检开始时返回的id
 
     public void Set()
     {
-        this.GetService<IInspectionService>().Set(mItemID, mNormal, mLabel, mInspectionId);
+        this.GetService<IInspectionService>().Set(mItemID, mNormal, mOutliers, mInspectionId);
     }
 
     public void InitData(int ItemID, int InspectionId, InspectionStep InspectionStep = null)
@@ -56,17 +58,37 @@ public class ShowXunJian_UIItem : MonoBehaviour, IController
                 NormalClick();
             else
                 WarningClick();
-            if (!string.IsNullOrWhiteSpace(InspectionStep.label))
+            if (!string.IsNullOrWhiteSpace(InspectionStep.outliers))
             {
-                LabelText_Input.text = InspectionStep.label;
-                mLabel = InspectionStep.label;
+                LabelText_Input.text = InspectionStep.outliers;
+                mOutliers = InspectionStep.outliers;
             }
         }
     }
 
+    private float mErrorBtn_go_offset = 319;
+    public void SetlabelBtnCount(string[] labelList)
+    {
+        foreach(string label in labelList)
+        {
+            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(()=>
+            {
+                LabelText_Input.text += go.name;
+                mOutliers = LabelText_Input.text;
+            });
+        }
+    }
+
     public void SetLabel(string Label)
     {
-        mLabel = Label;
+        mOutliers = Label;
     }
 
     private void NormalClick()

+ 10 - 2
Assets/Game/Blue/RTC/Info/InspectionInfo.cs

@@ -8,14 +8,22 @@ using System.Collections.Generic;
 public class InspectionInfo
 {
     public int id; // 本次巡检ID
-    public Dictionary<string,string> items;
+    public Dictionary<string,InspectionItem> items;
     public Dictionary<string,InspectionStep> steps;
 }
 
+[Serializable]
+public class InspectionItem
+{
+    public string name; // 巡检项名称
+    public string question; // 巡检项的问题
+    public string[] label; // 标签列表
+}
+
 [Serializable]
 public class InspectionStep
 {
     public bool normal; // 是否正常
-    public string label; // 标签信息
+    public string outliers; // 标签信息
     public string[] images; // 图片
 }

+ 2 - 2
Assets/Game/Blue/RTC/Service/InspectionService.cs

@@ -21,7 +21,7 @@ public class InspectionService : IInspectionService
                 JObject jobject = JObject.Parse(message);
                 if (jobject["code"].ToString() == "200" && !string.IsNullOrWhiteSpace(jobject["data"].ToString()))
                 {
-                    //Debug.LogError("data:" + jobject["data"].ToString());
+                    Debug.LogError("data:" + jobject["data"].ToString());
                     InspectionInfo = JsonConvert.DeserializeObject<InspectionInfo>(jobject["data"].ToString());
                     /*
                     Debug.LogError($"ID:{InspectionInfo.id}");
@@ -47,7 +47,7 @@ public class InspectionService : IInspectionService
         JsonData data = new JsonData();
         data["itemId"] = ItemID;
         data["normal"] = Normal;
-        data["label"] = Label;
+        data["outliers"] = Label;
         data["inspectionId"] = InspectionId;
         CoroutineSystem.Instance.StartCoroutine(HttpTool.Instance.SendHttp(HttpActionLang.inspection_step, data.ToJson(), message =>
         {

+ 571 - 35
Assets/Game/PrefabTemplate/借用_XunjianToogleUI.prefab

@@ -385,7 +385,7 @@ RectTransform:
   - {fileID: 975195066659560577}
   - {fileID: 975195068466191497}
   m_Father: {fileID: 426336088900465281}
-  m_RootOrder: 4
+  m_RootOrder: 6
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
@@ -769,6 +769,141 @@ RectTransform:
   m_AnchoredPosition: {x: 0, y: -398}
   m_SizeDelta: {x: 1096, y: 553.47}
   m_Pivot: {x: 0, y: 1}
+--- !u!1 &1620012128636858333
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 7710480350074813704}
+  - component: {fileID: 316303798191287414}
+  - component: {fileID: 1055929084722654153}
+  m_Layer: 5
+  m_Name: Text (Legacy)
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &7710480350074813704
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1620012128636858333}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 292977685651934832}
+  m_RootOrder: 0
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0, y: 0}
+  m_AnchorMax: {x: 1, y: 1}
+  m_AnchoredPosition: {x: 0, y: 0}
+  m_SizeDelta: {x: 0, y: 0}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &316303798191287414
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1620012128636858333}
+  m_CullTransparentMesh: 1
+--- !u!114 &1055929084722654153
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1620012128636858333}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_RaycastTarget: 1
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_text: "\u95E8\u7A97\u7834\u635F"
+  m_isRightToLeft: 0
+  m_fontAsset: {fileID: 11400000, guid: 53b37c1f568195149b410dacded90c09, type: 2}
+  m_sharedMaterial: {fileID: 1738077909898060448, guid: 53b37c1f568195149b410dacded90c09, type: 2}
+  m_fontSharedMaterials: []
+  m_fontMaterial: {fileID: 0}
+  m_fontMaterials: []
+  m_fontColor32:
+    serializedVersion: 2
+    rgba: 4294967295
+  m_fontColor: {r: 1, g: 1, b: 1, a: 1}
+  m_enableVertexGradient: 0
+  m_colorMode: 3
+  m_fontColorGradient:
+    topLeft: {r: 1, g: 1, b: 1, a: 1}
+    topRight: {r: 1, g: 1, b: 1, a: 1}
+    bottomLeft: {r: 1, g: 1, b: 1, a: 1}
+    bottomRight: {r: 1, g: 1, b: 1, a: 1}
+  m_fontColorGradientPreset: {fileID: 0}
+  m_spriteAsset: {fileID: 0}
+  m_tintAllSprites: 0
+  m_StyleSheet: {fileID: 0}
+  m_TextStyleHashCode: -1183493901
+  m_overrideHtmlColors: 0
+  m_faceColor:
+    serializedVersion: 2
+    rgba: 4294967295
+  m_fontSize: 60
+  m_fontSizeBase: 60
+  m_fontWeight: 400
+  m_enableAutoSizing: 0
+  m_fontSizeMin: 0
+  m_fontSizeMax: 0
+  m_fontStyle: 1
+  m_HorizontalAlignment: 2
+  m_VerticalAlignment: 4096
+  m_textAlignment: 65535
+  m_characterSpacing: 0
+  m_wordSpacing: 0
+  m_lineSpacing: 0
+  m_lineSpacingMax: 0
+  m_paragraphSpacing: 0
+  m_charWidthMaxAdj: 0
+  m_enableWordWrapping: 1
+  m_wordWrappingRatios: 0.4
+  m_overflowMode: 0
+  m_linkedTextComponent: {fileID: 0}
+  parentLinkedComponent: {fileID: 0}
+  m_enableKerning: 0
+  m_enableExtraPadding: 0
+  checkPaddingRequired: 0
+  m_isRichText: 1
+  m_parseCtrlCharacters: 1
+  m_isOrthographic: 1
+  m_isCullingEnabled: 0
+  m_horizontalMapping: 0
+  m_verticalMapping: 0
+  m_uvLineOffset: 0
+  m_geometrySortingOrder: 0
+  m_IsTextObjectScaleStatic: 0
+  m_VertexBufferAutoSizeReduction: 0
+  m_useMaxVisibleDescender: 1
+  m_pageToDisplay: 1
+  m_margin: {x: 0, y: 0, z: 0, w: 0}
+  m_isUsingLegacyAnimationComponent: 0
+  m_isVolumetricText: 0
+  m_hasFontAssetChanged: 0
+  m_baseMaterial: {fileID: 0}
+  m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
 --- !u!1 &1665478907277382121
 GameObject:
   m_ObjectHideFlags: 0
@@ -904,6 +1039,152 @@ MonoBehaviour:
   m_hasFontAssetChanged: 0
   m_baseMaterial: {fileID: 0}
   m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
+--- !u!1 &1787561885454903764
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 292977685651934832}
+  - component: {fileID: 5608431096545896889}
+  - component: {fileID: 1882630950775925274}
+  - component: {fileID: 7828552023725679642}
+  m_Layer: 5
+  m_Name: Error_Btn (2)
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 0
+--- !u!224 &292977685651934832
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1787561885454903764}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children:
+  - {fileID: 7710480350074813704}
+  m_Father: {fileID: 426336088900465281}
+  m_RootOrder: 3
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0.5, y: 0.5}
+  m_AnchorMax: {x: 0.5, y: 0.5}
+  m_AnchoredPosition: {x: 372, y: 94}
+  m_SizeDelta: {x: 300, y: 120}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &5608431096545896889
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1787561885454903764}
+  m_CullTransparentMesh: 1
+--- !u!114 &1882630950775925274
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1787561885454903764}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_RaycastTarget: 1
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_Sprite: {fileID: 21300000, guid: 4715960795a096d49baddcc42518441c, type: 3}
+  m_Type: 0
+  m_PreserveAspect: 0
+  m_FillCenter: 1
+  m_FillMethod: 4
+  m_FillAmount: 1
+  m_FillClockwise: 1
+  m_FillOrigin: 0
+  m_UseSpriteMesh: 0
+  m_PixelsPerUnitMultiplier: 1
+--- !u!114 &7828552023725679642
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1787561885454903764}
+  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: 1882630950775925274}
+  m_OnClick:
+    m_PersistentCalls:
+      m_Calls:
+      - m_Target: {fileID: 975195068224255630}
+        m_TargetAssemblyTypeName: SC.XR.Unity.SCInputField, Assembly-CSharp
+        m_MethodName: set_text
+        m_Mode: 5
+        m_Arguments:
+          m_ObjectArgument: {fileID: 0}
+          m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
+          m_IntArgument: 0
+          m_FloatArgument: 0
+          m_StringArgument: "\u95E8\u7A97\u7834\u635F"
+          m_BoolArgument: 0
+        m_CallState: 2
+      - m_Target: {fileID: 8966606207285345890}
+        m_TargetAssemblyTypeName: ShowXunJian_UIItem, Assembly-CSharp
+        m_MethodName: SetLabel
+        m_Mode: 5
+        m_Arguments:
+          m_ObjectArgument: {fileID: 0}
+          m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
+          m_IntArgument: 0
+          m_FloatArgument: 0
+          m_StringArgument: "\u95E8\u7A97\u7834\u635F"
+          m_BoolArgument: 0
+        m_CallState: 2
 --- !u!1 &2069637635460717687
 GameObject:
   m_ObjectHideFlags: 0
@@ -2022,7 +2303,7 @@ RectTransform:
   - {fileID: 443678400480800778}
   - {fileID: 6478760537675272447}
   m_Father: {fileID: 426336088900465281}
-  m_RootOrder: 3
+  m_RootOrder: 5
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
@@ -2790,6 +3071,152 @@ MonoBehaviour:
   m_FillOrigin: 0
   m_UseSpriteMesh: 0
   m_PixelsPerUnitMultiplier: 1
+--- !u!1 &4751438644437779260
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 1769505359654222316}
+  - component: {fileID: 1396601645124191864}
+  - component: {fileID: 1901988537819806534}
+  - component: {fileID: 7290336171566520708}
+  m_Layer: 5
+  m_Name: Error_Btn (3)
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 0
+--- !u!224 &1769505359654222316
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 4751438644437779260}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children:
+  - {fileID: 6979760688328333755}
+  m_Father: {fileID: 426336088900465281}
+  m_RootOrder: 4
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0.5, y: 0.5}
+  m_AnchorMax: {x: 0.5, y: 0.5}
+  m_AnchoredPosition: {x: -266, y: 94}
+  m_SizeDelta: {x: 300, y: 120}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &1396601645124191864
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 4751438644437779260}
+  m_CullTransparentMesh: 1
+--- !u!114 &1901988537819806534
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 4751438644437779260}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_RaycastTarget: 1
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_Sprite: {fileID: 21300000, guid: 4715960795a096d49baddcc42518441c, type: 3}
+  m_Type: 0
+  m_PreserveAspect: 0
+  m_FillCenter: 1
+  m_FillMethod: 4
+  m_FillAmount: 1
+  m_FillClockwise: 1
+  m_FillOrigin: 0
+  m_UseSpriteMesh: 0
+  m_PixelsPerUnitMultiplier: 1
+--- !u!114 &7290336171566520708
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 4751438644437779260}
+  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: 1901988537819806534}
+  m_OnClick:
+    m_PersistentCalls:
+      m_Calls:
+      - m_Target: {fileID: 975195068224255630}
+        m_TargetAssemblyTypeName: SC.XR.Unity.SCInputField, Assembly-CSharp
+        m_MethodName: set_text
+        m_Mode: 5
+        m_Arguments:
+          m_ObjectArgument: {fileID: 0}
+          m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
+          m_IntArgument: 0
+          m_FloatArgument: 0
+          m_StringArgument: "\u95E8\u7981\u5931\u7075"
+          m_BoolArgument: 0
+        m_CallState: 2
+      - m_Target: {fileID: 8966606207285345890}
+        m_TargetAssemblyTypeName: ShowXunJian_UIItem, Assembly-CSharp
+        m_MethodName: SetLabel
+        m_Mode: 5
+        m_Arguments:
+          m_ObjectArgument: {fileID: 0}
+          m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
+          m_IntArgument: 0
+          m_FloatArgument: 0
+          m_StringArgument: "\u95E8\u7981\u5931\u7075"
+          m_BoolArgument: 0
+        m_CallState: 2
 --- !u!1 &4884044017604430186
 GameObject:
   m_ObjectHideFlags: 0
@@ -3674,6 +4101,8 @@ RectTransform:
   - {fileID: 273424252448019309}
   - {fileID: 6088361386184106886}
   - {fileID: 1405034866829593793}
+  - {fileID: 292977685651934832}
+  - {fileID: 1769505359654222316}
   - {fileID: 3461209586397352647}
   - {fileID: 975195068224255629}
   m_Father: {fileID: 4751524369283230363}
@@ -3887,7 +4316,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!224 &6088361386184106886
 RectTransform:
   m_ObjectHideFlags: 0
@@ -3906,7 +4335,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
-  m_AnchoredPosition: {x: -266, y: 94}
+  m_AnchoredPosition: {x: -585, y: 94}
   m_SizeDelta: {x: 300, y: 120}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &3358976647464937657
@@ -3990,31 +4419,7 @@ MonoBehaviour:
   m_TargetGraphic: {fileID: 5089669961876050262}
   m_OnClick:
     m_PersistentCalls:
-      m_Calls:
-      - m_Target: {fileID: 975195068224255630}
-        m_TargetAssemblyTypeName: SC.XR.Unity.SCInputField, Assembly-CSharp
-        m_MethodName: set_text
-        m_Mode: 5
-        m_Arguments:
-          m_ObjectArgument: {fileID: 0}
-          m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
-          m_IntArgument: 0
-          m_FloatArgument: 0
-          m_StringArgument: "\u95E8\u7981\u5931\u7075"
-          m_BoolArgument: 0
-        m_CallState: 2
-      - m_Target: {fileID: 8966606207285345890}
-        m_TargetAssemblyTypeName: ShowXunJian_UIItem, Assembly-CSharp
-        m_MethodName: SetLabel
-        m_Mode: 5
-        m_Arguments:
-          m_ObjectArgument: {fileID: 0}
-          m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
-          m_IntArgument: 0
-          m_FloatArgument: 0
-          m_StringArgument: "\u95E8\u7981\u5931\u7075"
-          m_BoolArgument: 0
-        m_CallState: 2
+      m_Calls: []
 --- !u!1 &7541715656771924501
 GameObject:
   m_ObjectHideFlags: 0
@@ -4070,11 +4475,6 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: dfc512df28703e348bf2f1078ba25147, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  ListBtn:
-  - {fileID: 585850126648938878}
-  - {fileID: 838409171594320795}
-  - {fileID: 2801564913960114947}
-  - {fileID: 4285441740163874500}
   mNormal_Btn: {fileID: 4736414394839638515}
   Warning_Btn: {fileID: 2398182161521905652}
   NormalBG1_go: {fileID: 2786768829415089053}
@@ -4084,6 +4484,7 @@ MonoBehaviour:
   NormalPanel_go: {fileID: 1268108450370532904}
   WarningPanel_go: {fileID: 3706178895091204087}
   LabelText_Input: {fileID: 975195068224255630}
+  mErrorBtn_go: {fileID: 7477279148625475104}
 --- !u!1 &7584859786364747502
 GameObject:
   m_ObjectHideFlags: 0
@@ -4313,7 +4714,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!224 &1405034866829593793
 RectTransform:
   m_ObjectHideFlags: 0
@@ -4441,3 +4842,138 @@ MonoBehaviour:
           m_StringArgument: "\u95E8\u7A97\u7834\u635F"
           m_BoolArgument: 0
         m_CallState: 2
+--- !u!1 &8426859253182461188
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 6979760688328333755}
+  - component: {fileID: 8692520412634995719}
+  - component: {fileID: 3287434331753710098}
+  m_Layer: 5
+  m_Name: Text (Legacy)
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &6979760688328333755
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8426859253182461188}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 1769505359654222316}
+  m_RootOrder: 0
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0, y: 0}
+  m_AnchorMax: {x: 1, y: 1}
+  m_AnchoredPosition: {x: 0, y: 0}
+  m_SizeDelta: {x: 0, y: 0}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &8692520412634995719
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8426859253182461188}
+  m_CullTransparentMesh: 1
+--- !u!114 &3287434331753710098
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8426859253182461188}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_RaycastTarget: 1
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_text: "\u95E8\u7981\u5931\u7075"
+  m_isRightToLeft: 0
+  m_fontAsset: {fileID: 11400000, guid: 53b37c1f568195149b410dacded90c09, type: 2}
+  m_sharedMaterial: {fileID: 1738077909898060448, guid: 53b37c1f568195149b410dacded90c09, type: 2}
+  m_fontSharedMaterials: []
+  m_fontMaterial: {fileID: 0}
+  m_fontMaterials: []
+  m_fontColor32:
+    serializedVersion: 2
+    rgba: 4294967295
+  m_fontColor: {r: 1, g: 1, b: 1, a: 1}
+  m_enableVertexGradient: 0
+  m_colorMode: 3
+  m_fontColorGradient:
+    topLeft: {r: 1, g: 1, b: 1, a: 1}
+    topRight: {r: 1, g: 1, b: 1, a: 1}
+    bottomLeft: {r: 1, g: 1, b: 1, a: 1}
+    bottomRight: {r: 1, g: 1, b: 1, a: 1}
+  m_fontColorGradientPreset: {fileID: 0}
+  m_spriteAsset: {fileID: 0}
+  m_tintAllSprites: 0
+  m_StyleSheet: {fileID: 0}
+  m_TextStyleHashCode: -1183493901
+  m_overrideHtmlColors: 0
+  m_faceColor:
+    serializedVersion: 2
+    rgba: 4294967295
+  m_fontSize: 60
+  m_fontSizeBase: 60
+  m_fontWeight: 400
+  m_enableAutoSizing: 0
+  m_fontSizeMin: 0
+  m_fontSizeMax: 0
+  m_fontStyle: 1
+  m_HorizontalAlignment: 2
+  m_VerticalAlignment: 4096
+  m_textAlignment: 65535
+  m_characterSpacing: 0
+  m_wordSpacing: 0
+  m_lineSpacing: 0
+  m_lineSpacingMax: 0
+  m_paragraphSpacing: 0
+  m_charWidthMaxAdj: 0
+  m_enableWordWrapping: 1
+  m_wordWrappingRatios: 0.4
+  m_overflowMode: 0
+  m_linkedTextComponent: {fileID: 0}
+  parentLinkedComponent: {fileID: 0}
+  m_enableKerning: 0
+  m_enableExtraPadding: 0
+  checkPaddingRequired: 0
+  m_isRichText: 1
+  m_parseCtrlCharacters: 1
+  m_isOrthographic: 1
+  m_isCullingEnabled: 0
+  m_horizontalMapping: 0
+  m_verticalMapping: 0
+  m_uvLineOffset: 0
+  m_geometrySortingOrder: 0
+  m_IsTextObjectScaleStatic: 0
+  m_VertexBufferAutoSizeReduction: 0
+  m_useMaxVisibleDescender: 1
+  m_pageToDisplay: 1
+  m_margin: {x: 0, y: 0, z: 0, w: 0}
+  m_isUsingLegacyAnimationComponent: 0
+  m_isVolumetricText: 0
+  m_hasFontAssetChanged: 0
+  m_baseMaterial: {fileID: 0}
+  m_maskOffset: {x: 0, y: 0, z: 0, w: 0}

+ 5 - 4
Assets/Game/ShowXunJian/StartXunJian.cs

@@ -92,7 +92,7 @@ namespace GHZLangChao
         [SerializeField] private List<TMP_Text> ItemUIList = new List<TMP_Text>(); // 步骤内+“是否正常”
         [SerializeField] private List<ShowXunJian_UIItem> ItemList = new List<ShowXunJian_UIItem>(); // 每个步骤内的数据
         [SerializeField] private List<GameObject> ErrorList = new List<GameObject>(); // 错误图标
-        [SerializeField] private List<GameObject> BGList = new List<GameObject>(); // 选中后图标
+        [SerializeField] private List<GameObject> BGList = new List<GameObject>(); // 选中后图标 
         [SerializeField] private List<Toggle> ToggleList = new List<Toggle>();
 
         /// <summary>
@@ -102,9 +102,8 @@ namespace GHZLangChao
         {
             foreach (var item in InspectionInfo.items)
             {
-                ItemNameTextList[int.Parse(item.Key) - 1].text = item.Value + "接口";
-                ItemUIList[int.Parse(item.Key) - 1].text = item.Key + "、" + item.Value + "是否正常" + "接口";
-
+                ItemNameTextList[int.Parse(item.Key) - 1].text = item.Value.name + "接口";
+                ItemUIList[int.Parse(item.Key) - 1].text = item.Key + "、" + item.Value.question;
                 if (InspectionInfo.steps.ContainsKey(item.Key)) //是否执行到此步骤
                 {
                     ItemList[int.Parse(item.Key) - 1].InitData(int.Parse(item.Key), InspectionInfo.id, InspectionInfo.steps[item.Key]);
@@ -113,6 +112,7 @@ namespace GHZLangChao
                 {
                     ItemList[int.Parse(item.Key) - 1].InitData(int.Parse(item.Key), InspectionInfo.id);
                 }
+                ItemList[int.Parse(item.Key) - 1].SetlabelBtnCount(item.Value.label);
             }
             foreach (var step in InspectionInfo.steps)
             {
@@ -164,6 +164,7 @@ namespace GHZLangChao
 
         public void End()
         {
+            currentUIItem.Set();
             foreach (bool isOn in toggleBoolList)
             {
                 if (!isOn)

+ 1 - 1
Assets/Scenes/LangChaoDemo2.unity

@@ -24045,7 +24045,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!224 &1746801817
 RectTransform:
   m_ObjectHideFlags: 0