lu
2025-09-03 58cb06f3c4d6d89cad0043ac04dfab504e2cd7f6
DevApp/Gs.DevApp/DevFrm/QC/DefectCode.cs
@@ -20,6 +20,8 @@
        public DefectCode(string _strType)
        {
            InitializeComponent();
            toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
            this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
            strType = _strType;
            tlMenu.IndicatorWidth = 50;
            tlMenu.CustomDrawNodeIndicator += (s, ee) =>
@@ -44,6 +46,13 @@
                frm.UpdateParent += (s2, ee2) =>
                {
                    getPageList(1);
                    // 例如,通过ID查找节点:
                    TreeListNode node = tlMenu.FindNodeByKeyID(strUpGuid);
                    if (node != null)
                    {
                        node.Expanded = true; // 展开节点
                        tlMenu.MakeNodeVisible(node); // 确保可见
                    }
                };
                frm.ShowDialog();
            };
@@ -106,11 +115,36 @@
                frm.UpdateParent += (s2, ee2) =>
                {
                    getPageList(1);
                    // 例如,通过ID查找节点:
                    TreeListNode node = tlMenu.FindNodeByKeyID(strGuid);
                    if (node !=null)
                    {
                        node.Expanded = true; // 展开节点
                        tlMenu.MakeNodeVisible(node); // 确保可见
                    }
                };
                frm.ShowDialog();
            };
        }
        /// <summary>
        /// 查询事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e)
        {
            Gs.DevApp.ToolBox.MsgHelper.ShowInformation("该窗体不支持查询,若想更新页面,请点击 刷新");
        }
        /// <summary>
        ///     刷新事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
        {
            _filterList.Clear();
            getPageList(1);
        }
        /// <summary>
        /// 右键弹出菜单,如果是行,增加子项目,否则增加主项
        /// </summary>
@@ -169,9 +203,9 @@
                tlMenu.KeyFieldName = "guid";
                tlMenu.ParentFieldName = "pid";
                tlMenu.EndUpdate();
                //this.tlMenu.CollapseAll();
               this.tlMenu.CollapseAll();
                // this.tlMenu.ExpandAll();
                this.tlMenu.ExpandToLevel(0);
                // this.tlMenu.ExpandToLevel(0);
            }
            catch (Exception ex)
            {