SysMenuOutput.cs 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. using System.Collections;
  2. using YBEE.EQM.Core;
  3. namespace YBEE.EQM.Application
  4. {
  5. /// <summary>
  6. /// 菜单输出参数
  7. /// </summary>
  8. public class SysMenuOutput : ITreeNode
  9. {
  10. /// <summary>
  11. /// 菜单Id
  12. /// </summary>
  13. [Required]
  14. public int Id { get; set; }
  15. /// <summary>
  16. /// 父Id
  17. /// </summary>
  18. [Required]
  19. public int Pid { get; set; }
  20. /// <summary>
  21. /// 名称
  22. /// </summary>
  23. [Required]
  24. public string Name { get; set; }
  25. /// <summary>
  26. /// 编码
  27. /// </summary>
  28. public string Code { get; set; }
  29. /// <summary>
  30. /// 菜单类型(字典 0目录 1菜单 2按钮)
  31. /// </summary>
  32. [Required]
  33. public MenuType MenuType { get; set; }
  34. /// <summary>
  35. /// 图标
  36. /// </summary>
  37. public string Icon { get; set; }
  38. /// <summary>
  39. /// 路由地址
  40. /// </summary>
  41. public string Router { get; set; }
  42. /// <summary>
  43. /// 组件地址
  44. /// </summary>
  45. public string Component { get; set; }
  46. /// <summary>
  47. /// 权限标识
  48. /// </summary>
  49. public string Permission { get; set; }
  50. /// <summary>
  51. /// 打开方式(字典 0无 1组件 2内链 3外链)
  52. /// </summary>
  53. public MenuOpenType OpenType { get; set; }
  54. /// <summary>
  55. /// 是否可见
  56. /// </summary>
  57. public bool Visible { get; set; }
  58. /// <summary>
  59. /// 内链地址
  60. /// </summary>
  61. public string Link { get; set; }
  62. /// <summary>
  63. /// 重定向地址
  64. /// </summary>
  65. public string Redirect { get; set; }
  66. /// <summary>
  67. /// 排序
  68. /// </summary>
  69. public int Sort { get; set; }
  70. /// <summary>
  71. /// 备注
  72. /// </summary>
  73. public string Remark { get; set; }
  74. /// <summary>
  75. /// 子菜单项
  76. /// </summary>
  77. public List<SysMenuOutput> Children { get; set; }
  78. public int GetId()
  79. {
  80. return Id;
  81. }
  82. public int GetPid()
  83. {
  84. return Pid;
  85. }
  86. public void SetChildren(IList children)
  87. {
  88. var c = (List<SysMenuOutput>)children;
  89. if (c.Any())
  90. {
  91. Children = c;
  92. }
  93. }
  94. }
  95. }