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 model =false;
public static bool tiao =true; public static bool tiao =true;
public static bool visit = false;
private void Start() private void Start()
{ {
GameObject.Find("UIRoot1").SetActive(false); GameObject.Find("UIRoot1").SetActive(false);

View File

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

View File

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

View File

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

View File

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