feat(projects): 添加系统管理的页面

This commit is contained in:
Soybean
2022-07-14 23:32:19 +08:00
parent 711a4ae34f
commit c33b5ebfef
11 changed files with 191 additions and 43 deletions

View File

@ -1,5 +1,5 @@
import { handleModuleRoutes } from '@/utils';
const modules = import.meta.globEager('./**/*.ts') as AuthRoute.RouteModule;
const modules = import.meta.glob('./**/*.ts', { eager: true }) as AuthRoute.RouteModule;
export const routes = handleModuleRoutes(modules);

View File

@ -0,0 +1,54 @@
const management: AuthRoute.Route = {
name: 'management',
path: '/management',
component: 'basic',
children: [
{
name: 'management_auth',
path: '/management/auth',
component: 'self',
meta: {
title: '权限管理',
requiresAuth: true,
icon: 'ic:baseline-security'
}
},
{
name: 'management_role',
path: '/management/role',
component: 'self',
meta: {
title: '角色管理',
requiresAuth: true,
icon: 'carbon:user-role'
}
},
{
name: 'management_user',
path: '/management/user',
component: 'self',
meta: {
title: '用户管理',
requiresAuth: true,
icon: 'ic:round-manage-accounts'
}
},
{
name: 'management_route',
path: '/management/route',
component: 'self',
meta: {
title: '路由管理',
requiresAuth: true,
icon: 'material-symbols:route'
}
}
],
meta: {
title: '系统管理',
icon: 'carbon:cloud-service-management',
order: 9
}
};
export default management;

View File

@ -18,16 +18,6 @@ const plugin: AuthRoute.Route = {
icon: 'simple-icons:apacheecharts'
}
},
{
name: 'plugin_charts_d3',
path: '/plugin/charts/d3',
component: 'self',
meta: {
title: 'D3',
requiresAuth: true,
icon: 'simple-icons:d3dotjs'
}
},
{
name: 'plugin_charts_antv',
path: '/plugin/charts/antv',

View File

@ -38,9 +38,7 @@ declare namespace AuthRoute {
| 'plugin_swiper'
| 'plugin_charts'
| 'plugin_charts_echarts'
| 'plugin_charts_d3'
| 'plugin_charts_antv'
| 'plugin_charts_chartjs'
| 'auth-demo'
| 'auth-demo_permission'
| 'auth-demo_super'
@ -57,6 +55,11 @@ declare namespace AuthRoute {
| 'multi-menu_first_second'
| 'multi-menu_first_second-new'
| 'multi-menu_first_second-new_third'
| 'management'
| 'management_user'
| 'management_role'
| 'management_auth'
| 'management_route'
| 'about';
/** 路由的path */

View File

@ -1,7 +1,5 @@
<template>
<div>
<h3>d3</h3>
</div>
<div>权限管理</div>
</template>
<script setup lang="ts"></script>

View File

@ -0,0 +1,7 @@
<template>
<div>角色管理</div>
</template>
<script setup lang="ts"></script>
<style scoped></style>

View File

@ -0,0 +1,7 @@
<template>
<div>路由管理</div>
</template>
<script setup lang="ts"></script>
<style scoped></style>

View File

@ -0,0 +1,7 @@
<template>
<div>用户管理</div>
</template>
<script setup lang="ts"></script>
<style scoped></style>