Commit aa5a829b authored by 陈前坚's avatar 陈前坚

perf: menu

parent e539b0ef
...@@ -48,20 +48,21 @@ const Login = props => { ...@@ -48,20 +48,21 @@ const Login = props => {
localStorage.setItem('token', token?.access_token || ''); localStorage.setItem('token', token?.access_token || '');
setUserMode(userMode); setUserMode(userMode);
setLoginName(loginName); setLoginName(loginName);
if (userMode === USER_MODE.ADMIN || userMode === USER_MODE.SUPER) { if (userMode === USER_MODE.SUPER || userMode === USER_MODE.ADMIN) {
const authority = [AUTHORITY.LOGIN, AUTHORITY[userMode]]; const authority = [AUTHORITY.LOGIN, AUTHORITY[userMode]];
setAuthority(authority); setAuthority(authority);
setAuth(authority); setAuth(authority);
history.push(`/dbm/dbInit/`); if (userMode === USER_MODE.SUPER) {
history.push(`/solution`);
} else {
history.push(`/dbm/dbInit`);
}
} }
if (userMode === USER_MODE.COMMON) { if (userMode === USER_MODE.COMMON) {
// const authority = [AUTHORITY.LOGIN, AUTHORITY.COMMON]; const authority = [AUTHORITY.LOGIN, AUTHORITY.COMMON];
// setAuthority(authority); setAuthority(authority);
// setAuth(authority); setAuth(authority);
// history.push(`/ou/orgList/`); history.push(`/userCenter/UserManage`);
notification.warning({
message: msg || '没有权限!',
});
} }
} else { } else {
notification.warning({ notification.warning({
......
...@@ -85,13 +85,13 @@ export default { ...@@ -85,13 +85,13 @@ export default {
{ {
path: '/dbm/dbsm', path: '/dbm/dbsm',
name: '数据库标准化管理', name: '数据库标准化管理',
authority: superAuthority, authority: adminAuthority,
component: ManagementDataBase, component: ManagementDataBase,
}, },
{ {
path: '/dbm/connectConfig', path: '/dbm/connectConfig',
name: '数据库连接配置', name: '数据库连接配置',
authority: superAuthority, authority: adminAuthority,
component: DatabaseConnectConfig, component: DatabaseConnectConfig,
}, },
], ],
...@@ -100,7 +100,6 @@ export default { ...@@ -100,7 +100,6 @@ export default {
path: '/userCenter', path: '/userCenter',
name: '用户中心', name: '用户中心',
component: BlankLayout, component: BlankLayout,
authority: adminAuthority,
icon: <UsergroupAddOutlined style={iconStyle} />, icon: <UsergroupAddOutlined style={iconStyle} />,
routes: [ routes: [
{ {
...@@ -131,7 +130,6 @@ export default { ...@@ -131,7 +130,6 @@ export default {
component: BlankLayout, component: BlankLayout,
name: '平台中心', name: '平台中心',
icon: <SettingOutlined style={iconStyle} />, icon: <SettingOutlined style={iconStyle} />,
authority: adminAuthority,
routes: [ routes: [
{ {
path: '/platformCenter/gis', path: '/platformCenter/gis',
...@@ -194,13 +192,6 @@ export default { ...@@ -194,13 +192,6 @@ export default {
}, },
], ],
}, },
{
path: '/platformCenter/vedio',
name: '视频管理',
url:
'/web4/?widget=product/oms/VideoConfig/VideoConfig|hideMap=true&videoType=萤石云',
component: BaseFrameContainer,
},
{ {
path: '/platformCenter/emq', path: '/platformCenter/emq',
name: '宿主管理', name: '宿主管理',
...@@ -210,18 +201,11 @@ export default { ...@@ -210,18 +201,11 @@ export default {
}, },
], ],
}, },
{
path: '/dataCenter/dictionary',
name: '数据中心',
icon: <TableOutlined style={iconStyle} />,
component: Dictionary,
},
{ {
path: '/productCenter', path: '/productCenter',
component: BlankLayout, component: BlankLayout,
name: '应用中心', name: '应用中心',
icon: <HomeOutlined style={iconStyle} />, icon: <HomeOutlined style={iconStyle} />,
authority: adminAuthority,
routes: [ routes: [
{ {
path: '/productCenter/web', path: '/productCenter/web',
...@@ -233,11 +217,26 @@ export default { ...@@ -233,11 +217,26 @@ export default {
name: '移动应用配置', name: '移动应用配置',
component: MobileConfigPage, component: MobileConfigPage,
}, },
// { ],
// path: '/productCenter/miniProgram', },
// name: '小程序配置', {
// component: MobileConfigPage, path: '/dataCenter',
// }, name: '数据中心',
icon: <TableOutlined style={iconStyle} />,
component: BlankLayout,
routes: [
{
path: '/dataCenter/dictionary',
name: '数据字典',
component: Dictionary,
},
{
path: '/dataCenter/video',
name: '视频管理',
url:
'/web4/?widget=product/oms/VideoConfig/VideoConfig|hideMap=true&videoType=萤石云',
component: BaseFrameContainer,
},
], ],
}, },
{ {
...@@ -245,7 +244,6 @@ export default { ...@@ -245,7 +244,6 @@ export default {
component: BlankLayout, component: BlankLayout,
name: '系统日志', name: '系统日志',
icon: <CopyOutlined style={iconStyle} />, icon: <CopyOutlined style={iconStyle} />,
authority: adminAuthority,
routes: [ routes: [
{ {
path: '/log/service', path: '/log/service',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment