@pubinfo/module-rbac 2.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +53 -0
- package/src/api/modules/assist/gonggaofuwu.ts +109 -0
- package/src/api/modules/assist/index.ts +5 -0
- package/src/api/modules/assist/qunzujiekou.ts +95 -0
- package/src/api/modules/assist/quyujiekou.ts +97 -0
- package/src/api/modules/assist/typings.d.ts +364 -0
- package/src/api/modules/configData/heibaimingdanfuwu.ts +95 -0
- package/src/api/modules/configData/index.ts +5 -0
- package/src/api/modules/configData/typings.d.ts +347 -0
- package/src/api/modules/configData/xitongpeizhifuwu.ts +322 -0
- package/src/api/modules/configData/zidianfuwu.ts +151 -0
- package/src/api/modules/log/caozuorizhifuwu.ts +37 -0
- package/src/api/modules/log/denglurizhifuwu.ts +37 -0
- package/src/api/modules/log/index.ts +4 -0
- package/src/api/modules/log/typings.d.ts +179 -0
- package/src/api/modules/rbac/gangweijiekou.ts +93 -0
- package/src/api/modules/rbac/index.ts +13 -0
- package/src/api/modules/rbac/jiaosejiekou.ts +124 -0
- package/src/api/modules/rbac/pubJiaosezukongzhiqi.ts +113 -0
- package/src/api/modules/rbac/shujuquanxianzhubiaokongzhiqi.ts +186 -0
- package/src/api/modules/rbac/typings.d.ts +2001 -0
- package/src/api/modules/rbac/yonghujiekou.ts +225 -0
- package/src/api/modules/rbac/yonghushoucangbiaojiekou.ts +93 -0
- package/src/api/modules/rbac/yonghuzuijinchangyongbiaojiekou.ts +72 -0
- package/src/api/modules/rbac/ziyuanjiekou.ts +223 -0
- package/src/api/modules/rbac/zuhuguanlijiekou.ts +91 -0
- package/src/api/modules/rbac/zuzhijiaosebiaokongzhiqi.ts +76 -0
- package/src/api/modules/rbac/zuzhijiekou.ts +171 -0
- package/src/api/request.ts +3 -0
- package/src/assets/icons/403.svg +1 -0
- package/src/assets/icons/403_dark.svg +1 -0
- package/src/assets/icons/404.svg +1 -0
- package/src/assets/icons/404_dark.svg +1 -0
- package/src/assets/icons/add-child.svg +1 -0
- package/src/assets/icons/authority.svg +1 -0
- package/src/assets/icons/authorize.svg +1 -0
- package/src/assets/icons/blacklist-disable.svg +1 -0
- package/src/assets/icons/blacklist-enable.svg +1 -0
- package/src/assets/icons/browser-360.svg +1 -0
- package/src/assets/icons/browser-chrome.svg +1 -0
- package/src/assets/icons/browser-edge.svg +1 -0
- package/src/assets/icons/browser-ie.svg +1 -0
- package/src/assets/icons/browser-other.svg +1 -0
- package/src/assets/icons/browser-qq.svg +1 -0
- package/src/assets/icons/browser-safari.svg +1 -0
- package/src/assets/icons/browser-uc.svg +1 -0
- package/src/assets/icons/change-org.svg +1 -0
- package/src/assets/icons/edit.svg +1 -0
- package/src/assets/icons/empty-data.svg +1 -0
- package/src/assets/icons/favorites.svg +1 -0
- package/src/assets/icons/icard.svg +1 -0
- package/src/assets/icons/icon_animation.svg +1 -0
- package/src/assets/icons/icon_breadcrumb.svg +1 -0
- package/src/assets/icons/icon_copyright.svg +1 -0
- package/src/assets/icons/icon_jt.svg +1 -0
- package/src/assets/icons/icon_layout.svg +1 -0
- package/src/assets/icons/icon_mainpage.svg +1 -0
- package/src/assets/icons/icon_menu.svg +1 -0
- package/src/assets/icons/icon_page_size.svg +1 -0
- package/src/assets/icons/icon_position_type.svg +1 -0
- package/src/assets/icons/icon_safe_manage.svg +1 -0
- package/src/assets/icons/icon_screen_scale.svg +6 -0
- package/src/assets/icons/icon_system_manage.svg +1 -0
- package/src/assets/icons/icon_tabbar.svg +1 -0
- package/src/assets/icons/icon_toolbar.svg +1 -0
- package/src/assets/icons/icon_topbar.svg +1 -0
- package/src/assets/icons/icon_watermark.svg +1 -0
- package/src/assets/icons/image-load-fail.svg +1 -0
- package/src/assets/icons/log-center.svg +1 -0
- package/src/assets/icons/logo-sig.svg +1 -0
- package/src/assets/icons/logo.svg +1 -0
- package/src/assets/icons/mima.svg +1 -0
- package/src/assets/icons/not-data.svg +1 -0
- package/src/assets/icons/org-main.svg +1 -0
- package/src/assets/icons/org-unmain.svg +1 -0
- package/src/assets/icons/process-management.svg +1 -0
- package/src/assets/icons/project-management.svg +1 -0
- package/src/assets/icons/rbac.svg +1 -0
- package/src/assets/icons/remove.svg +1 -0
- package/src/assets/icons/resource-app.svg +1 -0
- package/src/assets/icons/resource-btn.svg +1 -0
- package/src/assets/icons/resource-index.svg +1 -0
- package/src/assets/icons/resource-menu.svg +1 -0
- package/src/assets/icons/resource-nonmenu.svg +1 -0
- package/src/assets/icons/setting-manage.svg +1 -0
- package/src/assets/icons/test.svg +1 -0
- package/src/assets/icons/theme-check-mark.svg +1 -0
- package/src/assets/icons/theme-title.svg +1 -0
- package/src/assets/icons/toolbar-collapse.svg +1 -0
- package/src/assets/icons/tree_icon.svg +1 -0
- package/src/assets/icons/tree_icon_checked.svg +1 -0
- package/src/assets/icons/view.svg +1 -0
- package/src/assets/icons/workbench.svg +1 -0
- package/src/assets/icons/zddata.svg +1 -0
- package/src/assets/icons/zy_checked.svg +1 -0
- package/src/assets/icons/zy_default.svg +1 -0
- package/src/assets/images/layout/item1.webp +0 -0
- package/src/assets/images/layout/item1_dark.webp +0 -0
- package/src/assets/images/layout/item2.webp +0 -0
- package/src/assets/images/layout/item2_dark.webp +0 -0
- package/src/assets/images/layout/item3.webp +0 -0
- package/src/assets/images/layout/item3_dark.webp +0 -0
- package/src/assets/images/layout/item4.webp +0 -0
- package/src/assets/images/layout/item4_dark.webp +0 -0
- package/src/assets/images/layout/item5.webp +0 -0
- package/src/assets/images/layout/item5_dark.webp +0 -0
- package/src/assets/images/page-width/anto_min_w_dark.webp +0 -0
- package/src/assets/images/page-width/auto.webp +0 -0
- package/src/assets/images/page-width/auto_dark.webp +0 -0
- package/src/assets/images/page-width/auto_min_w.webp +0 -0
- package/src/assets/images/page-width/auto_min_w_dark.webp +0 -0
- package/src/assets/images/page-width/icon_auto.webp +0 -0
- package/src/assets/images/page-width/icon_auto_dark.webp +0 -0
- package/src/assets/images/page-width/icon_auto_min_w.webp +0 -0
- package/src/assets/images/page-width/icon_auto_min_w_dark.webp +0 -0
- package/src/assets/images/page-width/icon_middle.webp +0 -0
- package/src/assets/images/page-width/icon_middle_dark.webp +0 -0
- package/src/assets/images/page-width/icon_middle_max_w.webp +0 -0
- package/src/assets/images/page-width/icon_middle_max_w_dark.webp +0 -0
- package/src/assets/images/page-width/middle.webp +0 -0
- package/src/assets/images/page-width/middle_dark.webp +0 -0
- package/src/assets/images/page-width/middle_max_w.webp +0 -0
- package/src/assets/images/page-width/middle_max_w_dark.webp +0 -0
- package/src/assets/lottie/breadcrumb/dark/enable.json +1 -0
- package/src/assets/lottie/breadcrumb/dark/enableMainMenu.json +1 -0
- package/src/assets/lottie/breadcrumb/dark/style.json +1 -0
- package/src/assets/lottie/breadcrumb/light/enable.json +1 -0
- package/src/assets/lottie/breadcrumb/light/enableMainMenu.json +1 -0
- package/src/assets/lottie/breadcrumb/light/style.json +1 -0
- package/src/assets/lottie/layout/data-test.json +1 -0
- package/src/assets/lottie/layout/data.json +1 -0
- package/src/assets/lottie/menu/dark/enableHotkeys.json +1 -0
- package/src/assets/lottie/menu/dark/enableSubMenuCollapseButton.json +1 -0
- package/src/assets/lottie/menu/dark/isRounded.json +1 -0
- package/src/assets/lottie/menu/dark/menuActiveStyle.json +1 -0
- package/src/assets/lottie/menu/dark/subMenuCollapse.json +1 -0
- package/src/assets/lottie/menu/dark/subMenuUniqueOpened.json +1 -0
- package/src/assets/lottie/menu/light/enableHotkeys.json +1 -0
- package/src/assets/lottie/menu/light/enableSubMenuCollapseButton.json +1 -0
- package/src/assets/lottie/menu/light/isRounded.json +1 -0
- package/src/assets/lottie/menu/light/menuActiveStyle.json +1 -0
- package/src/assets/lottie/menu/light/subMenuCollapse.json +1 -0
- package/src/assets/lottie/menu/light/subMenuUniqueOpened.json +1 -0
- package/src/assets/lottie/other/dark/enableCopyright.json +1 -0
- package/src/assets/lottie/other/dark/enableHotkeys.json +1 -0
- package/src/assets/lottie/other/dark/switchTabbarAndToolbar.json +1 -0
- package/src/assets/lottie/other/light/enableCopyright.json +1 -0
- package/src/assets/lottie/other/light/enableHotkeys.json +1 -0
- package/src/assets/lottie/other/light/switchTabbarAndToolbar.json +1 -0
- package/src/assets/lottie/page_animation/dark/fadeinout.json +1 -0
- package/src/assets/lottie/page_animation/dark/fadeinout_old.json +1 -0
- package/src/assets/lottie/page_animation/dark/tobottom.json +1 -0
- package/src/assets/lottie/page_animation/dark/tobottom_old.json +1 -0
- package/src/assets/lottie/page_animation/dark/toleft.json +1 -0
- package/src/assets/lottie/page_animation/dark/toleft_old.json +1 -0
- package/src/assets/lottie/page_animation/dark/toright.json +1 -0
- package/src/assets/lottie/page_animation/dark/toright_old.json +1 -0
- package/src/assets/lottie/page_animation/dark/totop.json +1 -0
- package/src/assets/lottie/page_animation/dark/totop_old.json +1 -0
- package/src/assets/lottie/page_animation/light/fadeinout.json +1 -0
- package/src/assets/lottie/page_animation/light/tobottom.json +1 -0
- package/src/assets/lottie/page_animation/light/toleft.json +1 -0
- package/src/assets/lottie/page_animation/light/toright.json +1 -0
- package/src/assets/lottie/page_animation/light/totop.json +1 -0
- package/src/assets/lottie/tabbar/dark/enable.json +1 -0
- package/src/assets/lottie/tabbar/dark/enableHotkeys.json +1 -0
- package/src/assets/lottie/tabbar/dark/enableIcon.json +1 -0
- package/src/assets/lottie/tabbar/dark/enableMemory.json +1 -0
- package/src/assets/lottie/tabbar/dark/style.json +1 -0
- package/src/assets/lottie/tabbar/light/enable.json +1 -0
- package/src/assets/lottie/tabbar/light/enableHotkeys.json +1 -0
- package/src/assets/lottie/tabbar/light/enableIcon.json +1 -0
- package/src/assets/lottie/tabbar/light/enableMemory.json +1 -0
- package/src/assets/lottie/tabbar/light/style.json +1 -0
- package/src/assets/lottie/toolbar/dark/enableColorScheme.json +1 -0
- package/src/assets/lottie/toolbar/dark/enableFullscreen.json +1 -0
- package/src/assets/lottie/toolbar/dark/enableI18n.json +1 -0
- package/src/assets/lottie/toolbar/dark/enableNotification.json +1 -0
- package/src/assets/lottie/toolbar/dark/enablePageReload.json +1 -0
- package/src/assets/lottie/toolbar/dark/enableUserPreferences.json +1 -0
- package/src/assets/lottie/toolbar/dark/navSearchEnable.json +1 -0
- package/src/assets/lottie/toolbar/dark/navSearchEnableHotkeys.json +1 -0
- package/src/assets/lottie/toolbar/light/enableColorScheme.json +1 -0
- package/src/assets/lottie/toolbar/light/enableFullscreen.json +1 -0
- package/src/assets/lottie/toolbar/light/enableI18n.json +1 -0
- package/src/assets/lottie/toolbar/light/enableNotification.json +1 -0
- package/src/assets/lottie/toolbar/light/enablePageReload.json +1 -0
- package/src/assets/lottie/toolbar/light/enableUserPreferences.json +1 -0
- package/src/assets/lottie/toolbar/light/navSearchEnable.json +1 -0
- package/src/assets/lottie/toolbar/light/navSearchEnableHotkeys.json +1 -0
- package/src/assets/lottie/watermark/dark/enableWatermark.json +1 -0
- package/src/assets/lottie/watermark/light/enableWatermark.json +1 -0
- package/src/assets/styles/vxe-table.css +13 -0
- package/src/components/GroupSelector/index.vue +311 -0
- package/src/components/OrgTree/index.vue +91 -0
- package/src/components/OrgUserSelector/OrgSelector.vue +135 -0
- package/src/components/OrgUserSelector/UserSelector.vue +164 -0
- package/src/components/OrgUserSelector/index.ts +47 -0
- package/src/components/OrgUserSelector/provider.ts +373 -0
- package/src/components/ResourceSelector/enum.ts +5 -0
- package/src/components/ResourceSelector/hooks/useAppAndResource.ts +96 -0
- package/src/components/ResourceSelector/index.vue +432 -0
- package/src/composables/useLottie.ts +65 -0
- package/src/index.ts +31 -0
- package/src/interface.ts +54 -0
- package/src/routes/index.ts +156 -0
- package/src/routes/modules/authority.manage.menu.ts +105 -0
- package/src/routes/modules/log.manage.menu.ts +45 -0
- package/src/routes/modules/safe.manage.menu.ts +71 -0
- package/src/routes/modules/stylesetting.manage.menu.ts +130 -0
- package/src/routes/modules/system.manage.menu.ts +92 -0
- package/src/stores/index.ts +1 -0
- package/src/views/blackWhiteList/components/drawerBlackWhiteList.vue +132 -0
- package/src/views/blackWhiteList/enum.ts +7 -0
- package/src/views/blackWhiteList/index.vue +309 -0
- package/src/views/blackWhiteList/types.ts +4 -0
- package/src/views/breadcrumb_setting/animationData.ts +15 -0
- package/src/views/breadcrumb_setting/index.vue +147 -0
- package/src/views/components/HCheckList.vue +47 -0
- package/src/views/components/animation_item.vue +37 -0
- package/src/views/components/setItem.vue +126 -0
- package/src/views/data-permission/components/createAndEditDataPermission.vue +354 -0
- package/src/views/data-permission/enum.ts +59 -0
- package/src/views/data-permission/index.vue +190 -0
- package/src/views/dictionary/components/drawerDictionary.vue +108 -0
- package/src/views/dictionary/components/drawerDictionaryItem.vue +115 -0
- package/src/views/dictionary/enum.ts +8 -0
- package/src/views/dictionary/index.vue +194 -0
- package/src/views/dictionary/itemlist.vue +164 -0
- package/src/views/group/components/drawerGroup.vue +177 -0
- package/src/views/group/enum.ts +25 -0
- package/src/views/group/index.vue +207 -0
- package/src/views/layout_setting/index.vue +306 -0
- package/src/views/log_center/components/browserType.vue +35 -0
- package/src/views/log_center/components/loginHistoryDetail.vue +71 -0
- package/src/views/log_center/components/operateHistoryDetail.vue +80 -0
- package/src/views/log_center/login_history.vue +239 -0
- package/src/views/log_center/operate_history.vue +233 -0
- package/src/views/menu_setting/animationData.ts +27 -0
- package/src/views/menu_setting/index.vue +207 -0
- package/src/views/organization/components/drawerOrganization.vue +161 -0
- package/src/views/organization/components/drawerRole.vue +159 -0
- package/src/views/organization/components/roleSelect.vue +258 -0
- package/src/views/organization/enum.ts +26 -0
- package/src/views/organization/index.vue +516 -0
- package/src/views/other_setting/animationData.ts +15 -0
- package/src/views/other_setting/index.vue +250 -0
- package/src/views/other_setting/interface.ts +26 -0
- package/src/views/page_animation_setting/animationData.ts +23 -0
- package/src/views/page_animation_setting/index.vue +200 -0
- package/src/views/page_w_setting/index.vue +238 -0
- package/src/views/position/components/drawerPosition.vue +131 -0
- package/src/views/position/enum.ts +8 -0
- package/src/views/position/index.vue +167 -0
- package/src/views/region/components/drawerRegion.vue +143 -0
- package/src/views/region/enum.ts +24 -0
- package/src/views/region/index.vue +246 -0
- package/src/views/resource/components/ResourceEdit.vue +209 -0
- package/src/views/resource/components/RoleRelation.vue +100 -0
- package/src/views/resource/enum.ts +35 -0
- package/src/views/resource/index.vue +237 -0
- package/src/views/resource/interface.ts +6 -0
- package/src/views/role/components/ResourceRelation.vue +113 -0
- package/src/views/role/components/drawerRole.vue +191 -0
- package/src/views/role/enum.ts +26 -0
- package/src/views/role/index.vue +183 -0
- package/src/views/role/interface.ts +6 -0
- package/src/views/role_group/components/ResourceRelation.vue +91 -0
- package/src/views/role_group/components/drawerRole.vue +153 -0
- package/src/views/role_group/components/roleSelect.vue +224 -0
- package/src/views/role_group/enum.ts +22 -0
- package/src/views/role_group/index.vue +170 -0
- package/src/views/role_group/interface.ts +6 -0
- package/src/views/safe_setting/index.vue +237 -0
- package/src/views/tabbar_setting/animationData.ts +23 -0
- package/src/views/tabbar_setting/index.vue +186 -0
- package/src/views/tenant/components/TenantEdit.vue +226 -0
- package/src/views/tenant/index.vue +192 -0
- package/src/views/tenant/interface.ts +4 -0
- package/src/views/theme_setting/index.vue +465 -0
- package/src/views/toolbar_setting/animationData.ts +42 -0
- package/src/views/toolbar_setting/index.vue +189 -0
- package/src/views/user/components/OrgAndPosition.vue +156 -0
- package/src/views/user/components/UserAuthorization.vue +260 -0
- package/src/views/user/components/UserEdit.vue +267 -0
- package/src/views/user/components/roleSelect.vue +258 -0
- package/src/views/user/enum.ts +13 -0
- package/src/views/user/index.vue +266 -0
- package/src/views/user/interface.ts +43 -0
- package/src/views/watermark_setting/animationData.ts +7 -0
- package/src/views/watermark_setting/index.vue +236 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import type { RbacPages } from '@/interface';
|
|
2
|
+
import type { RouteRecordRaw } from 'vue-router';
|
|
3
|
+
import { merge } from 'lodash-es';
|
|
4
|
+
import AuthorityManageMenu from './modules/authority.manage.menu';
|
|
5
|
+
import LogManageMenu from './modules/log.manage.menu';
|
|
6
|
+
import SafeManageMenu from './modules/safe.manage.menu';
|
|
7
|
+
import StyleSettingMangeMenu from './modules/stylesetting.manage.menu';
|
|
8
|
+
import SystemManageMenu from './modules/system.manage.menu';
|
|
9
|
+
|
|
10
|
+
const asyncRoutes = [
|
|
11
|
+
{
|
|
12
|
+
meta: {
|
|
13
|
+
title: '权限管理系统',
|
|
14
|
+
// i18n: $t('route.rbac.title'),
|
|
15
|
+
icon: 'authority',
|
|
16
|
+
},
|
|
17
|
+
children: [
|
|
18
|
+
AuthorityManageMenu,
|
|
19
|
+
SystemManageMenu,
|
|
20
|
+
StyleSettingMangeMenu,
|
|
21
|
+
SafeManageMenu,
|
|
22
|
+
LogManageMenu,
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
const RBAC_ROUTE_MAP: RbacPages = {
|
|
28
|
+
AuthorityManage: {
|
|
29
|
+
Resource: true,
|
|
30
|
+
Role: true,
|
|
31
|
+
RoleGroup: true,
|
|
32
|
+
DataPermission: true,
|
|
33
|
+
Organization: true,
|
|
34
|
+
User: true,
|
|
35
|
+
Tenant: true,
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
SystemManage: {
|
|
39
|
+
DictionaryPage: {
|
|
40
|
+
Dictionary: true,
|
|
41
|
+
DictionaryItem: true,
|
|
42
|
+
},
|
|
43
|
+
Position: true,
|
|
44
|
+
Region: true,
|
|
45
|
+
Group: true,
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
SettingManage: {
|
|
49
|
+
ThemeSetting: true,
|
|
50
|
+
LayoutSetting: true,
|
|
51
|
+
PageAnimationSetting: true,
|
|
52
|
+
PageSizeSetting: true,
|
|
53
|
+
MenuSetting: true,
|
|
54
|
+
TabbarSetting: true,
|
|
55
|
+
ToolbarSetting: true,
|
|
56
|
+
BreadcrumbSetting: true,
|
|
57
|
+
OtherSetting: true,
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
SafeManage: {
|
|
61
|
+
Blacklist: true,
|
|
62
|
+
Whitelist: true,
|
|
63
|
+
SafeSetting: true,
|
|
64
|
+
WatermarkSetting: true,
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
LogManage: {
|
|
68
|
+
LoginHistory: true,
|
|
69
|
+
OperateHistory: true,
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* 根据传入的 `pages` 过滤路由
|
|
75
|
+
*/
|
|
76
|
+
export function filterPages(options: { pages?: RbacPages }) {
|
|
77
|
+
const { pages } = options;
|
|
78
|
+
const pageMap = merge(RBAC_ROUTE_MAP, pages);
|
|
79
|
+
|
|
80
|
+
const children = filterRoutesByMap(asyncRoutes[0].children, pageMap);
|
|
81
|
+
|
|
82
|
+
return [
|
|
83
|
+
{
|
|
84
|
+
...asyncRoutes[0],
|
|
85
|
+
children,
|
|
86
|
+
},
|
|
87
|
+
];
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* 根据 `map` 过滤 `routes`
|
|
92
|
+
*/
|
|
93
|
+
function filterRoutesByMap(routes: RouteRecordRaw[], pageMap: RbacPages) {
|
|
94
|
+
function filterRecursive(routeList: RouteRecordRaw[], map: Record<string, any>): RouteRecordRaw[] {
|
|
95
|
+
return routeList
|
|
96
|
+
.map(route => {
|
|
97
|
+
if (!route.name || !(route.name in map)) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const currentMap = map?.[route.name as string];
|
|
102
|
+
|
|
103
|
+
if (currentMap === false) {
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (currentMap === true) {
|
|
108
|
+
return route;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// 如果 map 中包含的是一个合法的 RouteRecordRaw,则替换 route
|
|
112
|
+
if (typeof currentMap === 'object' && Object.keys(currentMap).includes('path')) {
|
|
113
|
+
return currentMap;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// 递归处理子路由
|
|
117
|
+
if (typeof currentMap === 'object') {
|
|
118
|
+
const filteredChildren = route.children ? filterRecursive(route.children, currentMap) : [];
|
|
119
|
+
return { ...route, children: filteredChildren };
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return null;
|
|
123
|
+
})
|
|
124
|
+
.filter(Boolean);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return filterRecursive(routes, pageMap);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// TODO 将以下添加到测试用例
|
|
131
|
+
|
|
132
|
+
// const a = {
|
|
133
|
+
// AuthorityManage: {
|
|
134
|
+
// Resource: true,
|
|
135
|
+
// Role: false,
|
|
136
|
+
// },
|
|
137
|
+
// };
|
|
138
|
+
|
|
139
|
+
// const b = {
|
|
140
|
+
// AuthorityManage: {
|
|
141
|
+
// Resource: {
|
|
142
|
+
// name: 'Resource',
|
|
143
|
+
// path: 'resource',
|
|
144
|
+
// component: {},
|
|
145
|
+
// },
|
|
146
|
+
// Role: false,
|
|
147
|
+
// },
|
|
148
|
+
// };
|
|
149
|
+
|
|
150
|
+
// const c = {
|
|
151
|
+
// AuthorityManage: true,
|
|
152
|
+
// };
|
|
153
|
+
|
|
154
|
+
// const d = {
|
|
155
|
+
// AuthorityManage: false,
|
|
156
|
+
// };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { RouteRecordRaw } from 'vue-router';
|
|
2
|
+
// import { $t } from '@/locales';
|
|
3
|
+
|
|
4
|
+
// function Layout() {
|
|
5
|
+
// return import('@/layouts/index.vue');
|
|
6
|
+
// }
|
|
7
|
+
|
|
8
|
+
const routes: RouteRecordRaw = {
|
|
9
|
+
path: '/authority_manage',
|
|
10
|
+
// component: Layout,
|
|
11
|
+
redirect: '/authority_manage/resource',
|
|
12
|
+
name: 'AuthorityManage',
|
|
13
|
+
meta: {
|
|
14
|
+
title: '用户权限管理',
|
|
15
|
+
icon: 'icon_system_manage',
|
|
16
|
+
},
|
|
17
|
+
children: [
|
|
18
|
+
{
|
|
19
|
+
path: 'resource',
|
|
20
|
+
component: () => import('@/views/resource/index.vue'),
|
|
21
|
+
name: 'Resource',
|
|
22
|
+
meta: {
|
|
23
|
+
title: '资源管理',
|
|
24
|
+
singleMenu: true,
|
|
25
|
+
// i18n: $t('route.rbac.resource'),
|
|
26
|
+
auth: 'resource',
|
|
27
|
+
activeIcon: 'system-point',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
path: 'role',
|
|
32
|
+
component: () => import('@/views/role/index.vue'),
|
|
33
|
+
name: 'Role',
|
|
34
|
+
meta: {
|
|
35
|
+
title: '角色管理',
|
|
36
|
+
singleMenu: true,
|
|
37
|
+
// i18n: $t('route.rbac.role'),
|
|
38
|
+
auth: 'role',
|
|
39
|
+
activeIcon: 'system-point',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
path: 'role-group',
|
|
44
|
+
component: () => import('@/views/role_group/index.vue'),
|
|
45
|
+
name: 'RoleGroup',
|
|
46
|
+
meta: {
|
|
47
|
+
title: '角色组管理',
|
|
48
|
+
singleMenu: true,
|
|
49
|
+
// i18n: $t('route.rbac.roleGroup'),
|
|
50
|
+
auth: 'role_group',
|
|
51
|
+
activeIcon: 'system-point',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
path: 'data-permission',
|
|
56
|
+
component: () => import('@/views/data-permission/index.vue'),
|
|
57
|
+
name: 'DataPermission',
|
|
58
|
+
meta: {
|
|
59
|
+
title: '数据权限管理',
|
|
60
|
+
singleMenu: true,
|
|
61
|
+
// i18n: $t('route.rbac.dataPermission'),
|
|
62
|
+
auth: 'data_permission',
|
|
63
|
+
activeIcon: 'system-point',
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
path: 'organization',
|
|
68
|
+
component: () => import('@/views/organization/index.vue'),
|
|
69
|
+
name: 'Organization',
|
|
70
|
+
meta: {
|
|
71
|
+
title: '组织管理',
|
|
72
|
+
singleMenu: true,
|
|
73
|
+
// i18n: $t('route.rbac.organization'),
|
|
74
|
+
auth: 'organization',
|
|
75
|
+
activeIcon: 'system-point',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
path: 'user',
|
|
80
|
+
component: () => import('@/views/user/index.vue'),
|
|
81
|
+
name: 'User',
|
|
82
|
+
meta: {
|
|
83
|
+
title: '用户管理',
|
|
84
|
+
singleMenu: true,
|
|
85
|
+
// i18n: $t('route.rbac.user'),
|
|
86
|
+
auth: 'user',
|
|
87
|
+
activeIcon: 'system-point',
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
path: 'tenant',
|
|
92
|
+
component: () => import('@/views/tenant/index.vue'),
|
|
93
|
+
name: 'Tenant',
|
|
94
|
+
meta: {
|
|
95
|
+
title: '租户管理',
|
|
96
|
+
singleMenu: true,
|
|
97
|
+
// i18n: $t('route.rbac.tenant'),
|
|
98
|
+
auth: 'tenant',
|
|
99
|
+
activeIcon: 'system-point',
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export default routes;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { RouteRecordRaw } from 'vue-router';
|
|
2
|
+
// import { $t } from '@/locales';
|
|
3
|
+
|
|
4
|
+
// function Layout() {
|
|
5
|
+
// return import('@/layouts/index.vue');
|
|
6
|
+
// }
|
|
7
|
+
|
|
8
|
+
const routes: RouteRecordRaw = {
|
|
9
|
+
path: '/log_manage',
|
|
10
|
+
// component: Layout,
|
|
11
|
+
redirect: '/log_manage/login_history',
|
|
12
|
+
name: 'LogManage',
|
|
13
|
+
meta: {
|
|
14
|
+
title: '日志中心',
|
|
15
|
+
icon: 'log-center',
|
|
16
|
+
},
|
|
17
|
+
children: [
|
|
18
|
+
{
|
|
19
|
+
path: 'login_history',
|
|
20
|
+
component: () => import('@/views/log_center/login_history.vue'),
|
|
21
|
+
name: 'LoginHistory',
|
|
22
|
+
meta: {
|
|
23
|
+
title: '登录日志',
|
|
24
|
+
singleMenu: true,
|
|
25
|
+
// i18n: $t('route.rbac.loginHistory'),
|
|
26
|
+
activeIcon: 'system-point',
|
|
27
|
+
auth: 'login_history',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
path: 'operate_history',
|
|
32
|
+
component: () => import('@/views/log_center/operate_history.vue'),
|
|
33
|
+
name: 'OperateHistory',
|
|
34
|
+
meta: {
|
|
35
|
+
title: '操作日志',
|
|
36
|
+
singleMenu: true,
|
|
37
|
+
// i18n: $t('route.rbac.operateHistory'),
|
|
38
|
+
activeIcon: 'system-point',
|
|
39
|
+
auth: 'operate_history',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default routes;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { RouteRecordRaw } from 'vue-router';
|
|
2
|
+
// import { $t } from '@/locales';
|
|
3
|
+
|
|
4
|
+
// function Layout() {
|
|
5
|
+
// return import('@/layouts/index.vue');
|
|
6
|
+
// }
|
|
7
|
+
|
|
8
|
+
const routes: RouteRecordRaw = {
|
|
9
|
+
path: '/safe_manage',
|
|
10
|
+
// component: Layout,
|
|
11
|
+
redirect: '/safe_manage/blacklist',
|
|
12
|
+
name: 'SafeManage',
|
|
13
|
+
meta: {
|
|
14
|
+
title: '安全管理',
|
|
15
|
+
icon: 'icon_safe_manage',
|
|
16
|
+
},
|
|
17
|
+
children: [
|
|
18
|
+
{
|
|
19
|
+
path: 'blacklist',
|
|
20
|
+
component: () => import('@/views/blackWhiteList/index.vue'),
|
|
21
|
+
name: 'Blacklist',
|
|
22
|
+
meta: {
|
|
23
|
+
title: '黑名单管理',
|
|
24
|
+
singleMenu: true,
|
|
25
|
+
// i18n: $t('route.rbac.blacklist'),
|
|
26
|
+
auth: 'blacklist',
|
|
27
|
+
type: 'black',
|
|
28
|
+
activeIcon: 'system-point',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
path: 'whitelist',
|
|
33
|
+
component: () => import('@/views/blackWhiteList/index.vue'),
|
|
34
|
+
name: 'Whitelist',
|
|
35
|
+
meta: {
|
|
36
|
+
title: '白名单管理',
|
|
37
|
+
singleMenu: true,
|
|
38
|
+
// i18n: $t('route.rbac.whitelist'),
|
|
39
|
+
auth: 'whitelist',
|
|
40
|
+
type: 'white',
|
|
41
|
+
activeIcon: 'system-point',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
path: 'safe-setting',
|
|
46
|
+
component: () => import('@/views/safe_setting/index.vue'),
|
|
47
|
+
name: 'SafeSetting',
|
|
48
|
+
meta: {
|
|
49
|
+
title: '安全配置',
|
|
50
|
+
singleMenu: true,
|
|
51
|
+
// i18n: $t('route.rbac.safeSetting'),
|
|
52
|
+
activeIcon: 'system-point',
|
|
53
|
+
auth: 'safe_setting',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
path: 'watermark-setting',
|
|
58
|
+
component: () => import('@/views/watermark_setting/index.vue'),
|
|
59
|
+
name: 'WatermarkSetting',
|
|
60
|
+
meta: {
|
|
61
|
+
title: '页面水印配置',
|
|
62
|
+
singleMenu: true,
|
|
63
|
+
// i18n: $t('route.rbac.watermarkSetting'),
|
|
64
|
+
activeIcon: 'system-point',
|
|
65
|
+
auth: 'watermarkSetting',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export default routes;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import type { RouteRecordRaw } from 'vue-router';
|
|
2
|
+
// import { $t } from '@/locales';
|
|
3
|
+
|
|
4
|
+
// function Layout() {
|
|
5
|
+
// return import('@/layouts/index.vue');
|
|
6
|
+
// }
|
|
7
|
+
|
|
8
|
+
const routes: RouteRecordRaw = {
|
|
9
|
+
path: '/setting_manage',
|
|
10
|
+
// component: Layout,
|
|
11
|
+
redirect: '/setting_manage/theme-setting',
|
|
12
|
+
name: 'SettingManage',
|
|
13
|
+
meta: {
|
|
14
|
+
title: '样式配置',
|
|
15
|
+
icon: 'setting-manage',
|
|
16
|
+
auth: 'globalsettings',
|
|
17
|
+
},
|
|
18
|
+
children: [
|
|
19
|
+
{
|
|
20
|
+
path: 'theme-setting',
|
|
21
|
+
component: () => import('@/views/theme_setting/index.vue'),
|
|
22
|
+
name: 'ThemeSetting',
|
|
23
|
+
meta: {
|
|
24
|
+
title: '主题配置',
|
|
25
|
+
singleMenu: true,
|
|
26
|
+
// i18n: $t('route.rbac.themeSetting'),
|
|
27
|
+
auth: 'themeSetting',
|
|
28
|
+
activeIcon: 'system-point',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
path: 'layout-setting',
|
|
33
|
+
component: () => import('@/views/layout_setting/index.vue'),
|
|
34
|
+
name: 'LayoutSetting',
|
|
35
|
+
meta: {
|
|
36
|
+
title: '布局配置',
|
|
37
|
+
singleMenu: true,
|
|
38
|
+
// i18n: $t('route.rbac.layoutSetting'),
|
|
39
|
+
auth: 'layoutSetting',
|
|
40
|
+
activeIcon: 'system-point',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
path: 'page-animation-setting',
|
|
45
|
+
component: () => import('@/views/page_animation_setting/index.vue'),
|
|
46
|
+
name: 'PageAnimationSetting',
|
|
47
|
+
meta: {
|
|
48
|
+
title: '页面动画配置',
|
|
49
|
+
singleMenu: true,
|
|
50
|
+
// i18n: $t('route.rbac.pageAnimationSetting'),
|
|
51
|
+
auth: 'pageSetting',
|
|
52
|
+
activeIcon: 'system-point',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
path: 'page-size-setting',
|
|
57
|
+
component: () => import('@/views/page_w_setting/index.vue'),
|
|
58
|
+
name: 'PageSizeSetting',
|
|
59
|
+
meta: {
|
|
60
|
+
title: '页宽配置',
|
|
61
|
+
singleMenu: true,
|
|
62
|
+
// i18n: $t('route.rbac.pageSizeSetting'),
|
|
63
|
+
auth: 'pagesizeSetting',
|
|
64
|
+
activeIcon: 'system-point',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
path: 'menu-setting',
|
|
69
|
+
component: () => import('@/views/menu_setting/index.vue'),
|
|
70
|
+
name: 'MenuSetting',
|
|
71
|
+
meta: {
|
|
72
|
+
title: '导航栏配置',
|
|
73
|
+
singleMenu: true,
|
|
74
|
+
// i18n: $t('route.rbac.menuSetting'),
|
|
75
|
+
auth: 'menuSetting',
|
|
76
|
+
activeIcon: 'system-point',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
path: 'tabbar-setting',
|
|
81
|
+
component: () => import('@/views/tabbar_setting/index.vue'),
|
|
82
|
+
name: 'TabbarSetting',
|
|
83
|
+
meta: {
|
|
84
|
+
title: '标签栏配置',
|
|
85
|
+
singleMenu: true,
|
|
86
|
+
// i18n: $t('route.rbac.tabbarSetting'),
|
|
87
|
+
auth: 'tabbarSetting',
|
|
88
|
+
activeIcon: 'system-point',
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
path: 'toolbar-setting',
|
|
93
|
+
component: () => import('@/views/toolbar_setting/index.vue'),
|
|
94
|
+
name: 'ToolbarSetting',
|
|
95
|
+
meta: {
|
|
96
|
+
title: '工具栏配置',
|
|
97
|
+
singleMenu: true,
|
|
98
|
+
// i18n: $t('route.rbac.toolbarSetting'),
|
|
99
|
+
auth: 'toolbarSetting',
|
|
100
|
+
activeIcon: 'system-point',
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
path: 'breadcrumb-setting',
|
|
105
|
+
component: () => import('@/views/breadcrumb_setting/index.vue'),
|
|
106
|
+
name: 'BreadcrumbSetting',
|
|
107
|
+
meta: {
|
|
108
|
+
title: '面包屑配置',
|
|
109
|
+
singleMenu: true,
|
|
110
|
+
// i18n: $t('route.rbac.breadcrumbSetting'),
|
|
111
|
+
auth: 'breadcrumbSetting',
|
|
112
|
+
activeIcon: 'system-point',
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
path: 'other-setting',
|
|
117
|
+
component: () => import('@/views/other_setting/index.vue'),
|
|
118
|
+
name: 'OtherSetting',
|
|
119
|
+
meta: {
|
|
120
|
+
title: '其他配置',
|
|
121
|
+
singleMenu: true,
|
|
122
|
+
// i18n: $t('route.rbac.otherSetting'),
|
|
123
|
+
auth: 'otherSetting',
|
|
124
|
+
activeIcon: 'system-point',
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export default routes;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { RouteRecordRaw } from 'vue-router';
|
|
2
|
+
// import { $t } from '@/locales';
|
|
3
|
+
|
|
4
|
+
// function Layout() {
|
|
5
|
+
// return import('@/layouts/index.vue');
|
|
6
|
+
// }
|
|
7
|
+
|
|
8
|
+
const routes: RouteRecordRaw = {
|
|
9
|
+
path: '/system_manage',
|
|
10
|
+
// component: Layout,
|
|
11
|
+
redirect: '/system_manage/dictionary',
|
|
12
|
+
name: 'SystemManage',
|
|
13
|
+
meta: {
|
|
14
|
+
title: '系统配置',
|
|
15
|
+
icon: 'icon_safe_manage',
|
|
16
|
+
},
|
|
17
|
+
children: [
|
|
18
|
+
{
|
|
19
|
+
path: '/system_manage/dictionary',
|
|
20
|
+
name: 'DictionaryPage',
|
|
21
|
+
meta: {
|
|
22
|
+
title: '字典管理',
|
|
23
|
+
// i18n: $t('route.rbac.dictionary'),
|
|
24
|
+
auth: 'dictionary',
|
|
25
|
+
activeIcon: 'system-point',
|
|
26
|
+
},
|
|
27
|
+
children: [
|
|
28
|
+
{
|
|
29
|
+
path: '',
|
|
30
|
+
name: 'Dictionary',
|
|
31
|
+
component: () => import('@/views/dictionary/index.vue'),
|
|
32
|
+
meta: {
|
|
33
|
+
title: '字典管理',
|
|
34
|
+
sidebar: false,
|
|
35
|
+
breadcrumb: false,
|
|
36
|
+
activeMenu: '/system_manage/dictionary',
|
|
37
|
+
cache: 'DictionaryItem',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
path: 'detail/:id',
|
|
42
|
+
name: 'DictionaryItem',
|
|
43
|
+
component: () => import('@/views/dictionary/itemlist.vue'),
|
|
44
|
+
meta: {
|
|
45
|
+
title: '字典数据',
|
|
46
|
+
sidebar: false,
|
|
47
|
+
breadcrumb: true,
|
|
48
|
+
activeMenu: '/system_manage/dictionary',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
path: 'position',
|
|
55
|
+
component: () => import('@/views/position/index.vue'),
|
|
56
|
+
name: 'Position',
|
|
57
|
+
meta: {
|
|
58
|
+
title: '岗位管理',
|
|
59
|
+
singleMenu: true,
|
|
60
|
+
// i18n: $t('route.rbac.position'),
|
|
61
|
+
auth: 'position',
|
|
62
|
+
activeIcon: 'system-point',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
path: 'region',
|
|
67
|
+
component: () => import('@/views/region/index.vue'),
|
|
68
|
+
name: 'Region',
|
|
69
|
+
meta: {
|
|
70
|
+
title: '区域管理',
|
|
71
|
+
singleMenu: true,
|
|
72
|
+
// i18n: $t('route.rbac.region'),
|
|
73
|
+
auth: 'region',
|
|
74
|
+
activeIcon: 'system-point',
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
path: 'group',
|
|
79
|
+
component: () => import('@/views/group/index.vue'),
|
|
80
|
+
name: 'Group',
|
|
81
|
+
meta: {
|
|
82
|
+
title: '群组管理',
|
|
83
|
+
singleMenu: true,
|
|
84
|
+
// i18n: $t('route.rbac.group'),
|
|
85
|
+
auth: 'group',
|
|
86
|
+
activeIcon: 'system-point',
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export default routes;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useSettingsStore } from 'pubinfo';
|