| | |
| | | using Newtonsoft.Json; |
| | | using System.Collections.Generic; |
| | | |
| | | namespace NewPdaSqlServer.Dto.Simple; |
| | | |
| | | /// <summary> |
| | | /// 树形视图 - 用于Layui Tree组件渲染 |
| | | /// 树形结构DTO - 适配 Layui Tree 组件 |
| | | /// </summary> |
| | | public class TreeViewDto |
| | | { |
| | | /// <summary> |
| | | /// 菜单项ID |
| | | /// </summary> |
| | | [JsonProperty("id")] |
| | | public long Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 菜单显示名称 |
| | | /// </summary> |
| | | [JsonProperty("title")] |
| | | public string? Title { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 菜单英文标识 |
| | | /// </summary> |
| | | [JsonProperty("field")] |
| | | public string? Field { get; set; } |
| | | public string? Field { get; set; } // 对应 Code |
| | | |
| | | /// <summary> |
| | | /// 是否默认展开子节点 |
| | | /// </summary> |
| | | [JsonProperty("spread")] |
| | | public bool Spread { get; set; } |
| | | public bool Spread { get; set; } // 对应 IsExpanded |
| | | |
| | | /// <summary> |
| | | /// 子菜单列表 |
| | | /// 跳转链接 (Layui Tree点击时需要) |
| | | /// </summary> |
| | | [JsonProperty("href")] |
| | | public string? Href { get; set; } // 对应 Url |
| | | |
| | | /// <summary> |
| | | /// 节点类型 (前端图标判断依据) |
| | | /// </summary> |
| | | [JsonProperty("nodeType")] |
| | | public int NodeType { get; set; } |
| | | |
| | | [JsonProperty("children")] |
| | | public List<ChildrenDto>? Children { get; set; } |
| | | } |
| | | public List<TreeViewDto>? Children { get; set; } |
| | | } |