feat✨ admin角色编辑权限改为默认

This commit is contained in:
zhangwenjian committed 2020-10-24 13:14:57 +08:00
1 parent cc34268791
commit c814439f93
3 files changed
+16 -11

No files matched your search

+4 -4
View File
@@ -146,10 +146,10 @@ func DiguiMenu(menulist *[]Menu, menu Menu) Menu {
return menu
}
func (e *Menu) SetMenuLable() (m []MenuLable, err error) {
func (e *Menu) SetMenuLable() (m *[]MenuLable, err error) {
menulist, err := e.Get()
m = make([]MenuLable, 0)
ml := make([]MenuLable, 0)
for i := 0; i < len(menulist); i++ {
if menulist[i].ParentId != 0 {
continue
@@ -159,9 +159,9 @@ func (e *Menu) SetMenuLable() (m []MenuLable, err error) {
e.Label = menulist[i].Title
menusInfo := DiguiMenuLable(&menulist, e)
m = append(m, menusInfo)
ml = append(ml, menusInfo)
}
return
return &ml, err
}
func DiguiMenuLable(menulist *[]Menu, menu MenuLable) MenuLable {
+3 -3
View File
@@ -22,9 +22,9 @@ type SysRole struct {
DataScope string `json:"dataScope" gorm:"size:128;"`
BaseModel
Params string `json:"params" gorm:"-"`
MenuIds []int `json:"menuIds" gorm:"-"`
DeptIds []int `json:"deptIds" gorm:"-"`
Params string `json:"params" gorm:"-"`
MenuIds []int `json:"menuIds" gorm:"-"`
DeptIds []int `json:"deptIds" gorm:"-"`
}
func (SysRole) TableName() string {