diff --git a/xiaofang/Assets/Scenes/Schedule_03.unity b/xiaofang/Assets/Scenes/Schedule_03.unity index 63ab4a29..9e317a90 100644 --- a/xiaofang/Assets/Scenes/Schedule_03.unity +++ b/xiaofang/Assets/Scenes/Schedule_03.unity @@ -501,6 +501,7 @@ MonoBehaviour: addBtn: {fileID: 0} subtractBtn: {fileID: 0} jsonReader1: {fileID: 1417128757} + warningPopPanel1: {fileID: 447504741} --- !u!1 &287151818 GameObject: m_ObjectHideFlags: 0 @@ -1156,7 +1157,7 @@ GameObject: m_Component: - component: {fileID: 447504738} - component: {fileID: 447504740} - - component: {fileID: 447504739} + - component: {fileID: 447504741} m_Layer: 5 m_Name: WarningPop m_TagString: Untagged @@ -1176,6 +1177,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: + - {fileID: 1884689974} - {fileID: 1790987176} m_Father: {fileID: 1592869153} m_RootOrder: 7 @@ -1185,36 +1187,6 @@ RectTransform: m_AnchoredPosition: {x: 0, y: -0.0088888} m_SizeDelta: {x: 1920, y: 1080} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &447504739 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 447504737} - 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: 0.5882353} - 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: 0d341980b0d10594ebff2c7fab7fb1d3, 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!222 &447504740 CanvasRenderer: m_ObjectHideFlags: 0 @@ -1223,6 +1195,20 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 447504737} m_CullTransparentMesh: 1 +--- !u!114 &447504741 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 447504737} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d22682848613f4488467b1f6b3f402b, type: 3} + m_Name: + m_EditorClassIdentifier: + closeBtn: {fileID: 1241914629} + showText: {fileID: 1468625400} --- !u!1 &452024856 GameObject: m_ObjectHideFlags: 0 @@ -2546,6 +2532,7 @@ MonoBehaviour: jsonReader1: {fileID: 1417128757} selectScenePanel: {fileID: 7468736064579811982} datePanel: {fileID: 468742199} + warningPopPanel: {fileID: 447504741} --- !u!114 &618256463 MonoBehaviour: m_ObjectHideFlags: 0 @@ -4398,7 +4385,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1031840000928267012, guid: f7e3ba3643cbe834083789575336030d, type: 3} propertyPath: m_SizeDelta.x - value: -1184 + value: -764 objectReference: {fileID: 0} - target: {fileID: 1031840000928267012, guid: f7e3ba3643cbe834083789575336030d, type: 3} propertyPath: m_SizeDelta.y @@ -6114,7 +6101,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.56078434, g: 0.6862745, b: 0.81568635, a: 1} + 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 @@ -7680,7 +7667,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: 197.98004, y: 11.888} + m_AnchoredPosition: {x: 0, y: 11.888} m_SizeDelta: {x: 269.8211, y: 81.795} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1241914627 @@ -7696,7 +7683,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 0.24313726} + 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 @@ -9641,7 +9628,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.18039216, g: 0.23137257, b: 0.36078432, a: 1} + 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 @@ -11111,7 +11098,7 @@ RectTransform: - {fileID: 671339046} - {fileID: 1046922002} m_Father: {fileID: 447504738} - m_RootOrder: 0 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -11355,6 +11342,10 @@ PrefabInstance: propertyPath: selectScene value: objectReference: {fileID: 7468736064579811982} + - target: {fileID: 2102021661377337229, guid: 86668fbe8407a8741bb903177bc93fdb, type: 3} + propertyPath: warningPopPanel + value: + objectReference: {fileID: 447504741} - target: {fileID: 2102021661377337229, guid: 86668fbe8407a8741bb903177bc93fdb, type: 3} propertyPath: jueseChoicePanel value: @@ -11795,6 +11786,82 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1814351535} m_CullTransparentMesh: 1 +--- !u!1 &1884689973 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1884689974} + - component: {fileID: 1884689976} + - component: {fileID: 1884689975} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1884689974 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1884689973} + 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: 447504738} + m_RootOrder: 0 + 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: -0.000061035, y: -0.000061035} + m_SizeDelta: {x: 1920, y: 1080} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1884689975 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1884689973} + 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: 0.5882353} + 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: 0d341980b0d10594ebff2c7fab7fb1d3, 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!222 &1884689976 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1884689973} + m_CullTransparentMesh: 1 --- !u!1 &1885878471 GameObject: m_ObjectHideFlags: 0 diff --git a/xiaofang/Assets/Script/Scheduled_03/Panel.cs b/xiaofang/Assets/Script/Scheduled_03/Panel.cs index 01d68bfc..cf2eb57c 100644 --- a/xiaofang/Assets/Script/Scheduled_03/Panel.cs +++ b/xiaofang/Assets/Script/Scheduled_03/Panel.cs @@ -94,6 +94,7 @@ public class Panel : Base public JSONReader jsonReader1; public SelectScenePanel selectScenePanel; public DatePanel datePanel; + public WarningPopPanel warningPopPanel; private bool isPersonSelected = false; // 标志是否选择了人员 private bool isDutySelected = false; // 标志是否选择了职责 @@ -298,21 +299,27 @@ public class Panel : Base //处理人员管理按钮 public void ClickPersonnelManagement() { - foreach (Transform child in panelContent) + if (sceneDataDictionary.Count != 0) { - Destroy(child.gameObject); + foreach (Transform child in panelContent) + { + Destroy(child.gameObject); + } + foreach (var sceneEntry in sceneDataDictionary) + { + GameObject managerPanelInstance = Instantiate(ManagerPanelPrefab, panelContent); + Button button = managerPanelInstance.GetComponent