From 46f64905a3c309a50c0f245b3350cdeb8dd699c6 Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期三, 22 一月 2025 17:29:02 +0800 Subject: [PATCH] 计算优化 --- WinFrmUI/HStation.WinFrmUI.Auth.Core/01-menu/MenuViewModel.cs | 31 ++++++++++++++++++++++++++----- 1 files changed, 26 insertions(+), 5 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Auth.Core/01-menu/MenuViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Auth.Core/01-menu/MenuViewModel.cs index 958552c..9e192f4 100644 --- a/WinFrmUI/HStation.WinFrmUI.Auth.Core/01-menu/MenuViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Auth.Core/01-menu/MenuViewModel.cs @@ -14,12 +14,12 @@ public MenuViewModel() { } - public MenuViewModel(Yw.Vmo.ProjectMenu rhs) + public MenuViewModel(Yw.Vmo.ProjectMenuVmo rhs) { this.ID = rhs.ID; this.ProjectID = rhs.ProjectID; this.ParentID = rhs.ParentID; - this.Type = rhs.Type; + this.Type = (eMenuType)rhs.Type; this.Name = rhs.Name; this.Path = rhs.Path; this.Permission = rhs.Permission; @@ -32,12 +32,12 @@ this.Description = rhs.Description; } - public void Reset(Yw.Vmo.ProjectMenu rhs) + public void Reset(Yw.Vmo.ProjectMenuVmo rhs) { this.ID = rhs.ID; this.ProjectID = rhs.ProjectID; this.ParentID = rhs.ParentID; - this.Type = rhs.Type; + this.Type = (eMenuType)rhs.Type; this.Name = rhs.Name; this.Path = rhs.Path; this.Permission = rhs.Permission; @@ -68,7 +68,7 @@ /// 绫诲瀷 /// </summary> [DisplayName("绫诲瀷")] - public int Type { get; set; } + public eMenuType Type { get; set; } /// <summary> /// 鍚嶇О @@ -129,5 +129,26 @@ /// </summary> [DisplayName("璇存槑")] public string Description { get; set; } + + public enum eMenuType + { + /// <summary> + /// 鐩綍 + /// </summary> + [Description("鐩綍")] + Catalog = 1, + + /// <summary> + /// 鑿滃崟 + /// </summary> + [Description("鑿滃崟")] + Munu = 2, + + /// <summary> + /// 鍔熻兘鐐� + /// </summary> + [Description("鍔熻兘鐐�")] + Function = 3 + } } } \ No newline at end of file -- Gitblit v1.9.3