From 9607b0b7ecb0f621e9e00c376063342c467788e9 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期四, 03 四月 2025 10:43:06 +0800 Subject: [PATCH] 字典 --- DevApp/Gs.DevApp/DevFrm/Work/SelectDictionary.cs | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/Work/SelectDictionary.cs b/DevApp/Gs.DevApp/DevFrm/Work/SelectDictionary.cs index 0a7b108..29bf1f2 100644 --- a/DevApp/Gs.DevApp/DevFrm/Work/SelectDictionary.cs +++ b/DevApp/Gs.DevApp/DevFrm/Work/SelectDictionary.cs @@ -37,6 +37,15 @@ new UpdateParentEventArgs { DynamicList = list }); Close(); }; + tlMenu.IndicatorWidth = 50; + tlMenu.CustomDrawNodeIndicator += (s, ee) => + { + if (ee.IsNodeIndicator) + { + var index = ee.Node.TreeList.GetVisibleIndexByNode(ee.Node); + ee.Info.DisplayText = (index + 1).ToString(); + } + }; } /// <summary> @@ -68,22 +77,23 @@ /// </summary> private void getTree() { - var pgq = new PageQueryModel(1, 999999, "a.idx"); + var pgq = new PageQueryModel(1, 999999, "a.defect_name"); var json = JsonConvert.SerializeObject(pgq); try { var strReturn = - UtilityHelper.HttpPost("", "MenuAction/GetListPage", json); + UtilityHelper.HttpPost("", "MesDefectCodeManager/GetListPage", json); var dd = UtilityHelper.ReturnToTablePage(strReturn); var dt = dd.rtnData.list; tlMenu.DataSource = dt; tlMenu.KeyFieldName = "guid"; - tlMenu.ParentFieldName = "upGuid"; - tlMenu.Tag = "name"; + tlMenu.ParentFieldName = "pid"; + tlMenu.Tag = "defectName"; tlMenu.EndUpdate(); this.tlMenu.CollapseAll(); // tlMenu.OptionsBehavior.Editable = true; tlMenu.OptionsBehavior.AllowRecursiveNodeChecking = false; + tlMenu.BestFitColumns(); } catch (Exception ex) { -- Gitblit v1.9.3