Compare commits

...

2 Commits

Author SHA1 Message Date
yulong 660a6f5d68 11 2024-03-12 17:50:48 +08:00
yulong 846768e49e 复盘回访按钮修改 2024-03-12 17:46:17 +08:00
5 changed files with 28 additions and 61 deletions

View File

@ -13,6 +13,7 @@ public class GameMain : MonoBehaviour {
public static bool model =false;
public static bool tiao =true;
public static bool visit = false;
private void Start()
{
GameObject.Find("UIRoot1").SetActive(false);

View File

@ -31,6 +31,7 @@ public class Judgmentstate : MonoBehaviour
fanhui1.onClick.AddListener(() =>
{
GameMain.tiao = false;
GameMain.visit = true;
//SceneManager.LoadScene("SampleScene");
OnLeaveRoom();
});

View File

@ -8,7 +8,7 @@ using XFrame.Core.UI;
public class Main_interface_Panel : XUIPanel
{
public Button fanhui_btn;//返回初始界面
public static Button fanhui_btn;//返回初始界面
public Button train;
public Button replay;
public Button appQuet;

View File

@ -44,6 +44,7 @@ public class Taskpanel : MonoBehaviour
fanhui.onClick.AddListener(() =>
{
GameMain.tiao = false;
GameMain.visit = true;
OnLeaveRoom();
});
two_dimensional.onClick.AddListener(() =>

View File

@ -90,11 +90,8 @@ public class View_Panel2 : XUIPanel
public Button entering_key_btn;//进入导调按钮
public Button scenario_btn;//想定编辑
public Button refresh_btn;//刷新房间按钮
public Button playback_btn;//复盘回访按钮
/// <summary>
/// 房间科目标题
/// </summary>
public Text roomSubjectTitle;
public View_Panel2() : base(UIType.Normal, UIMode.HideOther, UICollider.Normal)
{
@ -105,6 +102,7 @@ public class View_Panel2 : XUIPanel
roomModelDropdown = this.transform.Find("append_room_panl/roomModelDropdown").GetComponent<Dropdown>();
thinkingDropdown = this.transform.Find("append_room_panl/thinkingDropdown").GetComponent<Dropdown>();
refresh_btn = this.transform.Find("UPBG/Refresh_btn").GetComponent<Button>();
append_room_panl = GameObject.Find("View_Panel2(Clone)").transform.GetChild(2).GetComponent<Image>();
Fork_off_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(2).transform.GetChild(1).GetComponent<Button>();
room_input = GameObject.Find("View_Panel2(Clone)").transform.GetChild(2).transform.GetChild(3).GetComponent<InputField>();
@ -118,9 +116,8 @@ public class View_Panel2 : XUIPanel
off3_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(4).transform.GetChild(1).GetComponent<Button>();
place = GameObject.Find("View_Panel2(Clone)").transform.GetChild(1).transform.GetChild(0).transform.GetChild(0).GetComponent<Transform>();
//Storm_and_capture_panl
playback_btn = GameObject.Find("Main_interface_Panel(Clone)/UPBG/double_quotation_btn").GetComponent<Button>();
Storm_and_capture_panl = this.transform.Find("Storm_and_capture_panl").gameObject;
roomSubjectTitle = Storm_and_capture_panl.transform.Find("red_green_iamg/Title").GetComponent<Text>();
submitView = Storm_and_capture_panl.transform.Find("SubmitView").gameObject;
submitInstruct = submitView.transform.Find("Bg/Instruct").GetComponent<Text>();
svSubmitBtn = submitView.transform.Find("SubmitBtn").GetComponent<Button>();
@ -161,8 +158,7 @@ public class View_Panel2 : XUIPanel
jobInputField = selector_panl.transform.Find("JobInputField").GetComponent<InputField>();
userItem = userConent.GetChild(0).gameObject;
thinkingDropdown.options.Clear();
tijiao_btn.onClick.AddListener(() =>
{
if (!string.IsNullOrEmpty(currentAccount))
@ -241,12 +237,15 @@ public class View_Panel2 : XUIPanel
break;
case "02":
start_training_btn.gameObject.SetActive(false);
playback_btn.gameObject.SetActive(false);
break;
case "03":
start_training_btn.gameObject.SetActive(false);
playback_btn.gameObject.SetActive(false);
break;
case "04":
case "05":
playback_btn.gameObject.SetActive(false);
entering_key_btn.gameObject.SetActive(false);
//append_btn.interactable = false;
append_btn.gameObject.SetActive(false);
@ -254,6 +253,10 @@ public class View_Panel2 : XUIPanel
scenario_btn.gameObject.SetActive(false);
break;
}
if (GameMain.visit)
{
playback_btn.gameObject.SetActive(true);
}
OnRegisterFunction();
}
@ -270,20 +273,17 @@ public class View_Panel2 : XUIPanel
MyNetMQClient.instance._netMqListener.SubTopic(GlobalFlag.roomID);
if (GlobalFlag.field_Char1 == "学校")
{
SceneLoad.Instance.SceneChange("AdamTraining_pilot_terminal_panl 1");
//SceneManager.LoadScene("AdamTraining_pilot_terminal_panl 1");
SceneManager.LoadScene("AdamTraining_pilot_terminal_panl 1");
//CoroutineHandler.StartCoroutine(Loadscene());
//View_Panel2Attatch.view_Panel2Attatch.StartCoroutine(View_Panel2Attatch.view_Panel2Attatch.Loadscene("AdamTraining_pilot_terminal_panl 1"));
}
else if (GlobalFlag.field_Char1 == "山地")
else if(GlobalFlag.field_Char1 == "山地")
{
SceneLoad.Instance.SceneChange("AdamTraining_pilot_terminal_panl 3");
//SceneManager.LoadScene("AdamTraining_pilot_terminal_panl 3");
SceneManager.LoadScene("AdamTraining_pilot_terminal_panl 3");
//View_Panel2Attatch.view_Panel2Attatch.StartCoroutine(View_Panel2Attatch.view_Panel2Attatch.Loadscene("AdamTraining_pilot_terminal_panl 3"));
}
}
public async void GetAllRoomData()
{
@ -307,7 +307,6 @@ public class View_Panel2 : XUIPanel
public List<GameObject> currentAllAccount = new List<GameObject>();
public void CreateAllUser(List<DataItem> userInfo)
{
currentAccount = "";
if (userConent.childCount > 1)
{
for (int i = 1; i < userConent.childCount; i++)
@ -342,10 +341,6 @@ public class View_Panel2 : XUIPanel
currentAllAccount.Add(obj);
}
}
/// <summary>
/// 移除已经被分配的账号信息,在选择页面不显示已经被分配过的学员
/// </summary>
public void EliminateAccount()
{
if (currentEditorAccounts.Count > 0 && currentAllAccount.Count > 0)
@ -362,26 +357,12 @@ public class View_Panel2 : XUIPanel
}
}
}
/// <summary>
/// 取消分配
/// </summary>
public void DeleteAssignedAccount(string subjectID,string seatID)
{
for (int i = 0; i < currentEditorAccounts.Count; i++)
{
if(currentEditorAccounts[i].subjectID.Equals(subjectID)&& currentEditorAccounts[i].SeatID.Equals(seatID))
{
currentEditorAccounts.Remove(currentEditorAccounts[i]);
}
}
}
/// <summary>
/// 选择人员界面提交按钮
/// 席位分配提交按钮
/// </summary>
public void TiJiaoBtn()
{
if (string.IsNullOrEmpty(currentAccount) || currentAccount == "") return;
CurrentEditorAccount ced = new CurrentEditorAccount();
if (currentEditorAccounts.Count > 0)
{
@ -479,7 +460,7 @@ public class View_Panel2 : XUIPanel
}
}
/// <summary>
/// 新建房间 想定编辑里的科目信息 席位分配界面
/// 新建房间 想定编辑里的科目信息
/// </summary>
/// <param name="indexI"></param>
/// <param name="indexJ"></param>
@ -504,13 +485,6 @@ public class View_Panel2 : XUIPanel
EliminateAccount();
//Debug.Log($"currentSubjectID+currentSeatID={ currentSubjectID }={currentSeatID}");
});
seatTemp.transform.GetChild(4).GetComponent<Button>().onClick.AddListener(() =>
{
if (seatTemp.transform.GetChild(2).GetComponent<Text>().text == "xxxx") return;
DeleteAssignedAccount(subjectName, seatTemp.name);
seatTemp.transform.GetChild(2).GetComponent<Text>().text = "xxxx";
Debug.Log("删除分配信息");
});
if (GlobalFlag.currentUser.role_code.Equals("04") || GlobalFlag.currentUser.role_code.Equals("05") || GlobalFlag.currentUser.role_code.Equals("02"))
{
seatTemp.transform.GetChild(3).GetComponent<Button>().interactable = false;
@ -605,7 +579,7 @@ public class View_Panel2 : XUIPanel
//Debug.Log(" roomItem.nameID==" + roomItem.name);
CreateSubjectItem(currentRoomData.data);
});
roomItem.transform.Find("close_btn").GetComponent<Button>().onClick.AddListener(async () =>
{
string url = Url_Practice + roomItem.name;
@ -638,11 +612,9 @@ public class View_Panel2 : XUIPanel
GameObject subjectTemp = GameObject.Instantiate(currentRoomSubjectItem, currentRoomSubjectItemConnect);
subjectTemp.SetActive(true);
subjectTemp.name = di[index].Id;
string roomSubjectTitleTemp = di[index].Name;
subjectTemp.transform.GetChild(0).GetComponent<Text>().text = roomSubjectTitleTemp;
subjectTemp.transform.GetChild(0).GetComponent<Text>().text = di[index].Name;
subjectTemp.GetComponent<Button>().onClick.AddListener(async () =>
{
roomSubjectTitle.text = roomSubjectTitleTemp;
currentDIPracticeID = di[index].PracticeId;
currentDISubjectID = subjectTemp.name;
GlobalFlag.practiceSubjectID = subjectTemp.name;
@ -650,19 +622,11 @@ public class View_Panel2 : XUIPanel
CreateSubjectInfo(currentSubjectInfo.data);
});
}
UIBootstrap.Instance.WaitForT(WaitSubjectItemClick);
}
/// <summary>
/// 刷新科目列表里面的席位信息
/// </summary>
private void WaitSubjectItemClick()
{
if (currentRoomSubjectItemConnect.childCount > 1)
{
currentRoomSubjectItemConnect.GetChild(1).GetComponent<Button>().onClick.Invoke();
}
}
/// <summary>
/// 删除科目席位信息
/// </summary>
@ -820,14 +784,14 @@ public class View_Panel2 : XUIPanel
/// <summary>
/// 席位分配面板提交按钮和取消人员选择按钮
/// 分配面板提交按钮和取消人员选择按钮
/// </summary>
private void Submit()
{
seatSubmit_btn.onClick.AddListener(() =>
{
//UIBootstrap.Instance.CheckShowLoad(WaitShow);
WaitShow();
//UIBootstrap.Instance.CheckShowLoad(WaitShow);
WaitShow();
});
@ -837,7 +801,7 @@ public class View_Panel2 : XUIPanel
});
quxiao_btn.onClick.AddListener(() =>
{
selector_panl.gameObject.SetActive(false);
selector_panl.gameObject.SetActive(false);
});
}
@ -846,7 +810,6 @@ public class View_Panel2 : XUIPanel
append_room_panl.gameObject.SetActive(false);
distribution_panl.gameObject.SetActive(false);
selector_panl.gameObject.SetActive(false);
string accountInfo = AccountsInfo();
ReturnRoomID returnRoomId = await AsyncWebReq.Post<ReturnRoomID>(Url_GetRoomID + currentRoomName + "&MissionModel=" + currentMissionModel + "&ThinkingId=" + currentThinkingId + "&AccountsInfo=" + accountInfo, null);
if (returnRoomId.state)
@ -886,6 +849,7 @@ public class View_Panel2 : XUIPanel
/// </summary>
private void Verify()
{
verify_btn.onClick.AddListener(() =>
{
if (room_input.text.Length >= 1)