|
@@ -22,17 +22,17 @@ const propTypes = {};
|
|
|
const defaultProps = {};
|
|
|
|
|
|
const pageMap = {
|
|
|
- '组织管理': <OrgManager />,
|
|
|
- '角色管理': <RoleManager />,
|
|
|
- '用户管理': <UserManager />,
|
|
|
- '数据权限': <DataManager />,
|
|
|
- '病区管理': <InpaManager />,
|
|
|
- '功能管理': <FuncManager />,
|
|
|
- '操作日志': <OperationLog />,
|
|
|
- '登录日志': <LoginLog />,
|
|
|
- '异常日志': <ExceptionLog />,
|
|
|
- '我的通知': <MyMessage />,
|
|
|
- '通知管理': <MsgManage />,
|
|
|
+ 'QXGL-ZZGL': <OrgManager />,
|
|
|
+ 'QXGL-JSGL': <RoleManager />,
|
|
|
+ 'QXGL-YHGL': <UserManager />,
|
|
|
+ 'QXGL-SJQX': <DataManager />,
|
|
|
+ 'QXGL-BQQX': <InpaManager />,
|
|
|
+ 'XTSZ-GNGL': <FuncManager />,
|
|
|
+ 'RZGL-CZRZ': <OperationLog />,
|
|
|
+ 'RZGL-DLRZ': <LoginLog />,
|
|
|
+ 'RZGL-YCRZ': <ExceptionLog />,
|
|
|
+ 'ZNTZ-WDTZ': <MyMessage />,
|
|
|
+ 'ZNTZ-TZGL': <MsgManage />,
|
|
|
}
|
|
|
|
|
|
let firstMenuPage = {}; //第一个菜单,自动激活时用
|
|
@@ -47,15 +47,15 @@ function AMenu() {
|
|
|
|
|
|
//切换菜单、增加tab
|
|
|
function changeMenu(val) {
|
|
|
- const idName = val.key.split("-");
|
|
|
+ const idName = val.key.split("&");
|
|
|
const item = panes.find((it) => it.key === idName[0]);
|
|
|
//console.log(item);
|
|
|
if (item) { //已存在当前tab,则定位即可不增加
|
|
|
- dispatch(active({idName:idName[0]}));
|
|
|
+ dispatch(active({idName:val.key}));
|
|
|
return;
|
|
|
}
|
|
|
dispatch(
|
|
|
- add({ title: idName[0], content: pageMap[idName[0]] || <NullPage />, key: idName[0] })
|
|
|
+ add({ title: idName[1], content: pageMap[idName[0]] || <NullPage />, key: val.key })
|
|
|
)
|
|
|
}
|
|
|
//获取菜单数据
|
|
@@ -76,11 +76,11 @@ function AMenu() {
|
|
|
return data.map((it) => {
|
|
|
if (it.menuType === '1') {
|
|
|
return (
|
|
|
- <Menu.Item key={it.menuName}>{it.menuName}</Menu.Item>
|
|
|
+ <Menu.Item key={it.code+"&"+it.menuName}>{it.menuName}</Menu.Item>
|
|
|
)
|
|
|
} else if (it.menuType === '0') {
|
|
|
return (
|
|
|
- <SubMenu key={it.menuId} title={it.menuName}>
|
|
|
+ <SubMenu key={it.code+"&"+it.menuName} title={it.menuName}>
|
|
|
{it.children ? getSubMenu(it.children) : ''}
|
|
|
</SubMenu>
|
|
|
)
|
|
@@ -93,7 +93,7 @@ function AMenu() {
|
|
|
getUserMenus();
|
|
|
const timeO = setTimeout(() => {
|
|
|
dispatch(
|
|
|
- add({ title: firstMenuPage.menuName, content: pageMap[firstMenuPage.menuName] || <NullPage />, key: firstMenuPage.menuName })
|
|
|
+ add({ title: firstMenuPage.menuName, content: pageMap[firstMenuPage.menuName] || <NullPage />, key: firstMenuPage.code })
|
|
|
);
|
|
|
}, 500);
|
|
|
return function clearOut() {
|