优化菜单、省市区树结构排序,修复部门搜索空指针问题

This commit is contained in:
孟帅
2023-07-03 11:23:40 +08:00
parent 4a06a895b3
commit cc3ab9acec
18 changed files with 438 additions and 426 deletions

View File

@@ -57,11 +57,6 @@ func (in *MenuListInp) Filter(ctx context.Context) (err error) {
return
}
type MenuListModel struct {
List []*entity.AdminMenu `json:"list" dc:"数据列表"`
form.PageRes
}
// MenuSearchListInp 查询菜单列表
type MenuSearchListInp struct {
Name string `json:"name" dc:"菜单名称"`
@@ -74,12 +69,16 @@ func (in *MenuSearchListInp) Filter(ctx context.Context) (err error) {
type MenuSearchListModel []*model.TreeMenu
// MenuTree 菜单树结构
// MenuTree
type MenuTree struct {
// 适配n-tree
Id int64 `json:"key" `
Title string `json:"label"`
entity.AdminMenu
Key int64 `json:"key" `
Label string `json:"label" dc:"标签"`
Children []*MenuTree `json:"children"`
}
type MenuListModel struct {
List []*MenuTree `json:"list"`
}
// MenuRouteMeta 菜单路由