Roc пре 1 година
родитељ
комит
369346a013
3 измењених фајлова са 7 додато и 1 уклоњено
  1. 1 0
      controllers/sys_menu.go
  2. 4 1
      models/system/sys_menu.go
  3. 2 0
      models/system/sys_role.go

+ 1 - 0
controllers/sys_menu.go

@@ -125,6 +125,7 @@ func (this *SysRoleController) SysMenuList() {
 			cm := new(system.ChildMenu)
 			cm.MenuId = 10000
 			cm.Name = "出差审批"
+			cm.NameEn = "Business Trip Approval"
 			cm.Path = "businessTripApproval"
 			cm.Component = "businessTripApproval"
 			cm.IconPath = ""

+ 4 - 1
models/system/sys_menu.go

@@ -31,6 +31,7 @@ type SysMenu struct {
 	CreateTime time.Time `description:"创建时间"`
 	ModifyTime time.Time `description:"更新时间"`
 	Api        string    `description:"按钮相关api"`
+	NameEn     string    `description:"菜单名称或者按钮名称(英文)"`
 }
 
 // GetSysMenuItemsByCondition 获取菜单列表
@@ -53,6 +54,7 @@ type MenuList struct {
 	MenuId    int          `description:"导航唯一标识"`
 	IsLevel   int          `description:"1,只有一级;2,有多级"`
 	Name      string       `json:"name" description:"导航名称"`
+	NameEn    string       `json:"name_en" description:"导航名称(英文)"`
 	Path      string       `json:"path"`
 	IconPath  string       `json:"icon_path"`
 	LevelPath string       `json:"level_path"`
@@ -64,6 +66,7 @@ type MenuList struct {
 type ChildMenu struct {
 	MenuId    int    `description:"导航唯一标识"`
 	Name      string `json:"name" description:"导航名称"`
+	NameEn    string `json:"name_en" description:"导航名称(英文)"`
 	Path      string `json:"path"`
 	Component string `json:"component"`
 	IconPath  string `json:"icon_path"`
@@ -187,4 +190,4 @@ func GetMenuButtonApisByRoleId(roleId int) (items []*SysMenu, err error) {
 				r.create_time DESC`
 	_, err = orm.NewOrm().Raw(sql, roleId).QueryRows(&items)
 	return
-}
+}

+ 2 - 0
models/system/sys_role.go

@@ -117,11 +117,13 @@ type SysRoleListResp struct {
 type RoleMenu struct {
 	MenuId int    `description:"导航唯一标识"`
 	Name   string `description:"导航名称"`
+	NameEn string `description:"导航名称(英文)"`
 }
 
 type RoleMenuList struct {
 	MenuId    int    `description:"导航唯一标识"`
 	Name      string `description:"导航名称"`
+	NameEn    string `description:"导航名称(英文)"`
 	Child     []*RoleMenu
 	CheckList []int
 }