Skip to content

Commit

Permalink
fix: menu优化-将用户、菜单、权限、角色管理合并入系统管理下 (#181)
Browse files Browse the repository at this point in the history
* fix: nest初始化菜单优化-系统管理

* fix: vue补充系统管理locale

* fix: vue2补充系统管理locale
  • Loading branch information
Muyu-art authored Aug 22, 2024
1 parent 6e280c7 commit 9c612fe
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 78 deletions.
116 changes: 43 additions & 73 deletions packages/toolkits/pro/template/server/nestJs/src/menu/init/menuData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,113 +220,83 @@ export const menuData = [
locale: 'menu.cloud.contracts',
},
{
name: 'Menu',
order: 10,
name: 'MenuPage',
order: 9,
parentId: null,
menuType: 'admin',
icon: 'IconGrade',
menuType: 'normal',
icon: 'IconApp',
component: 'menu/index',
path: 'menu',
locale: 'menu.menu',
path: 'menuPage',
locale: 'menu.menuPage',
},
{
name: 'AllMenu',
name: 'SecondMenu',
order: 1,
parentId: null,
menuType: 'admin',
menuType: 'normal',
icon: '',
component: 'menu/info/index',
path: 'allMenu',
locale: 'menu.menu.info',
component: 'menu/index',
path: 'secondMenu',
locale: 'menu.menuPage.second',
},
{
name: 'Permission',
order: 11,
name: 'ThirdMenu',
order: 1,
parentId: null,
menuType: 'admin',
icon: 'IconFolderOpened',
component: 'permission/index',
path: 'permission',
locale: 'menu.permission',
menuType: 'normal',
icon: '',
component: 'menu/demo/index',
path: 'thirdMenu',
locale: 'menu.menuPage.third',
},
{
name: 'AllPermission',
name: 'SystemManager',
order: 10,
parentId: null,
menuType: 'normal',
icon: 'IconTotal',
component: 'menu/index',
path: '',
locale: 'menu.systemManager',
},
{
name: 'AllMenu',
order: 1,
parentId: null,
menuType: 'admin',
icon: '',
component: 'permission/info/index',
path: 'allPermission',
locale: 'menu.permission.info',
icon: 'IconGrade',
component: 'menu/info/index',
path: 'menu/allMenu',
locale: 'menu.menu.info',
},
{
name: 'Role',
order: 12,
name: 'AllPermission',
order: 1,
parentId: null,
menuType: 'admin',
icon: 'IconActivation',
component: 'role/index',
path: 'role',
locale: 'menu.role',
icon: 'IconFolderOpened',
component: 'permission/info/index',
path: 'permission/allPermission',
locale: 'menu.permission.info',
},
{
name: 'AllRole',
order: 1,
parentId: null,
menuType: 'admin',
icon: '',
icon: 'IconActivation',
component: 'role/info/index',
path: 'allRole',
path: 'role/allRole',
locale: 'menu.role.info',
},
{
name: 'UserManager',
order: 13,
parentId: null,
menuType: 'admin',
icon: 'IconGroup',
component: 'userManager/index',
path: 'userManager',
locale: 'menu.userManager',
},
{
name: 'AllInfo',
order: 1,
parentId: null,
menuType: 'admin',
icon: '',
icon: 'IconGroup',
component: 'userManager/info/index',
path: 'allInfo',
path: 'userManager/allInfo',
locale: 'menu.userManager.info',
},
{
name: 'MenuPage',
order: 9,
parentId: null,
menuType: 'normal',
icon: 'IconFiletext',
component: 'menu/index',
path: 'menuPage',
locale: 'menu.menuPage',
},
{
name: 'SecondMenu',
order: 1,
parentId: null,
menuType: 'normal',
icon: '',
component: 'menu/index',
path: 'secondMenu',
locale: 'menu.menuPage.second',
},
{
name: 'ThirdMenu',
order: 1,
parentId: null,
menuType: 'normal',
icon: '',
component: 'menu/demo/index',
path: 'thirdMenu',
locale: 'menu.menuPage.third',
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ export class MenuService {
menu[20].parentId = menuId[19];
menu[21].parentId = menuId[19];
menu[23].parentId = menuId[22];
menu[25].parentId = menuId[24];
menu[27].parentId = menuId[26];
menu[29].parentId = menuId[28];
menu[31].parentId = menuId[30];
menu[32].parentId = menuId[31];
menu[24].parentId = menuId[23];
menu[26].parentId = menuId[25];
menu[27].parentId = menuId[25];
menu[28].parentId = menuId[25];
menu[29].parentId = menuId[25];
}
for (const item of menu) {
await this.menu.update(item.id, { parentId: item.parentId });
Expand Down
1 change: 1 addition & 0 deletions packages/toolkits/pro/template/tinyvue/src/locale/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export default {
'menu.menuPage.second': 'Second Page',
'menu.menuPage.third': 'Menu Demo Page',
'menu.user': 'User Center',
'menu.systemManager': 'System Manager',
'menu.userManager': 'User Manager',
'menu.userManager.info': 'All User Info',
'menu.userManager.setting': 'All User Setting',
Expand Down
1 change: 1 addition & 0 deletions packages/toolkits/pro/template/tinyvue/src/locale/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export default {
'menu.menuPage.second': '二级菜单',
'menu.menuPage.third': '菜单demo页',
'menu.user': '个人中心',
'menu.systemManager': '系统管理',
'menu.userManager': '用户管理',
'menu.userManager.info': '查看用户',
'menu.userManager.setting': '修改信息',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export default {
'menu.menuPage.second': 'Second Page',
'menu.menuPage.third': 'Menu Demo Page',
'menu.user': 'User Center',
'menu.systemManager': 'System Manager',
'menu.userManager': 'User Manager',
'menu.userManager.info': 'All User Info',
'menu.userManager.setting': 'All User Setting',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export default {
'menu.menuPage.second': '二级菜单',
'menu.menuPage.third': '菜单demo页',
'menu.user': '个人中心',
'menu.systemManager': '系统管理',
'menu.userManager': '用户管理',
'menu.userManager.info': '所有用户',
'menu.userManager.setting': '修改信息',
Expand Down

0 comments on commit 9c612fe

Please sign in to comment.