feat(admin,backend): 新增平台总后台超级管理员最高权限体系与会员列表、续费列表、订阅管理中心
这个提交包含在:
@@ -4,13 +4,8 @@ import { Layout, Menu, Breadcrumb, Spin } from '@arco-design/web-react';
|
||||
import cs from 'classnames';
|
||||
import {
|
||||
IconDashboard,
|
||||
IconList,
|
||||
IconSettings,
|
||||
IconFile,
|
||||
IconApps,
|
||||
IconCheckCircle,
|
||||
IconExclamationCircle,
|
||||
IconUser,
|
||||
IconMenuFold,
|
||||
IconMenuUnfold,
|
||||
IconIdcard,
|
||||
@@ -18,6 +13,7 @@ import {
|
||||
IconRobot,
|
||||
IconScan,
|
||||
IconUserGroup,
|
||||
IconSafe,
|
||||
} from '@arco-design/web-react/icon';
|
||||
import { useSelector } from 'react-redux';
|
||||
import qs from 'query-string';
|
||||
@@ -54,45 +50,44 @@ function getIconFromKey(key) {
|
||||
return <IconUserGroup className={styles.icon} />;
|
||||
case 'settings-biz':
|
||||
return <IconSettings className={styles.icon} />;
|
||||
case 'list':
|
||||
return <IconList className={styles.icon} />;
|
||||
case 'form':
|
||||
return <IconSettings className={styles.icon} />;
|
||||
case 'profile':
|
||||
return <IconFile className={styles.icon} />;
|
||||
case 'visualization':
|
||||
return <IconApps className={styles.icon} />;
|
||||
case 'result':
|
||||
return <IconCheckCircle className={styles.icon} />;
|
||||
case 'platform':
|
||||
return <IconSafe className={styles.icon} />;
|
||||
case 'exception':
|
||||
return <IconExclamationCircle className={styles.icon} />;
|
||||
case 'user':
|
||||
return <IconUser className={styles.icon} />;
|
||||
default:
|
||||
return <div className={styles['icon-empty']} />;
|
||||
}
|
||||
}
|
||||
|
||||
const KEEP_IGNORED_ROUTES = new Set([
|
||||
'crm/lead-profile',
|
||||
'exception/403',
|
||||
'exception/404',
|
||||
'exception/500',
|
||||
]);
|
||||
|
||||
function getFlattenRoutes(routes) {
|
||||
const mod = import.meta.glob('./pages/**/[a-z[]*.tsx');
|
||||
const res = [];
|
||||
function travel(_routes) {
|
||||
function travel(_routes, parentIgnored = false) {
|
||||
_routes.forEach((route) => {
|
||||
const visibleChildren = (route.children || []).filter(
|
||||
(child) => !child.ignore
|
||||
);
|
||||
if (route.key && (!route.children || !visibleChildren.length)) {
|
||||
try {
|
||||
route.component = lazyload(mod[`./pages/${route.key}/index.tsx`]);
|
||||
res.push(route);
|
||||
} catch (e) {
|
||||
console.log(route.key);
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
const ignored = parentIgnored || !!route.ignore;
|
||||
if (isArray(route.children) && route.children.length) {
|
||||
travel(route.children);
|
||||
travel(route.children, ignored);
|
||||
return;
|
||||
}
|
||||
if (!route.key) {
|
||||
return;
|
||||
}
|
||||
if (ignored && !KEEP_IGNORED_ROUTES.has(route.key)) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
route.component = lazyload(mod[`./pages/${route.key}/index.tsx`]);
|
||||
res.push(route);
|
||||
} catch (e) {
|
||||
console.log(route.key);
|
||||
console.error(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -297,7 +292,7 @@ function PageLayout() {
|
||||
</Route>
|
||||
<Route
|
||||
path="*"
|
||||
component={lazyload(() => import('./pages/exception/403'))}
|
||||
component={lazyload(() => import('./pages/exception/404'))}
|
||||
/>
|
||||
</Switch>
|
||||
</Content>
|
||||
|
||||
在新工单中引用
屏蔽一个用户