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

perf: menu

parent e539b0ef
......@@ -48,20 +48,21 @@ const Login = props => {
localStorage.setItem('token', token?.access_token || '');
setUserMode(userMode);
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]];
setAuthority(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) {
// const authority = [AUTHORITY.LOGIN, AUTHORITY.COMMON];
// setAuthority(authority);
// setAuth(authority);
// history.push(`/ou/orgList/`);
notification.warning({
message: msg || '没有权限!',
});
const authority = [AUTHORITY.LOGIN, AUTHORITY.COMMON];
setAuthority(authority);
setAuth(authority);
history.push(`/userCenter/UserManage`);
}
} else {
notification.warning({
......
......@@ -85,13 +85,13 @@ export default {
{
path: '/dbm/dbsm',
name: '数据库标准化管理',
authority: superAuthority,
authority: adminAuthority,
component: ManagementDataBase,
},
{
path: '/dbm/connectConfig',
name: '数据库连接配置',
authority: superAuthority,
authority: adminAuthority,
component: DatabaseConnectConfig,
},
],
......@@ -100,7 +100,6 @@ export default {
path: '/userCenter',
name: '用户中心',
component: BlankLayout,
authority: adminAuthority,
icon: <UsergroupAddOutlined style={iconStyle} />,
routes: [
{
......@@ -131,7 +130,6 @@ export default {
component: BlankLayout,
name: '平台中心',
icon: <SettingOutlined style={iconStyle} />,
authority: adminAuthority,
routes: [
{
path: '/platformCenter/gis',
......@@ -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',
name: '宿主管理',
......@@ -210,18 +201,11 @@ export default {
},
],
},
{
path: '/dataCenter/dictionary',
name: '数据中心',
icon: <TableOutlined style={iconStyle} />,
component: Dictionary,
},
{
path: '/productCenter',
component: BlankLayout,
name: '应用中心',
icon: <HomeOutlined style={iconStyle} />,
authority: adminAuthority,
routes: [
{
path: '/productCenter/web',
......@@ -233,11 +217,26 @@ export default {
name: '移动应用配置',
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 {
component: BlankLayout,
name: '系统日志',
icon: <CopyOutlined style={iconStyle} />,
authority: adminAuthority,
routes: [
{
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