mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-09 10:43:47 +08:00
优化菜单、省市区树结构排序,修复部门搜索空指针问题
This commit is contained in:
@@ -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 菜单路由
|
||||
|
||||
@@ -169,3 +169,12 @@ type ProvincesCityLabelInp struct {
|
||||
}
|
||||
|
||||
type ProvincesCityLabelModel string
|
||||
|
||||
// ProvincesTree 树
|
||||
type ProvincesTree struct {
|
||||
entity.SysProvinces
|
||||
Key int64 `json:"key" dc:"key"`
|
||||
Label string `json:"label" dc:"标签"`
|
||||
Value int64 `json:"value" dc:"键值"`
|
||||
Children []*ProvincesTree `json:"children"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user