feat(@vben/web-antd): 更新路由权限控制并调整首页路径
This commit is contained in:
parent
d6bee4b911
commit
ce60c7194d
@ -11,7 +11,7 @@ const routes: RouteRecordRaw[] = [
|
||||
icon: MaterPerson,
|
||||
title: '个人',
|
||||
order: 5,
|
||||
authority: ['dashboard'],
|
||||
authority: ['user'],
|
||||
},
|
||||
},
|
||||
];
|
||||
|
@ -57,7 +57,7 @@ const routes: RouteRecordRaw[] = [
|
||||
meta: {
|
||||
icon: IconLog,
|
||||
title: '系统日志',
|
||||
authority: ['system'],
|
||||
authority: ['system:operationLog'],
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -67,7 +67,7 @@ const routes: RouteRecordRaw[] = [
|
||||
meta: {
|
||||
icon: FluentWorkflow,
|
||||
title: '工作流管理',
|
||||
authority: ['system'],
|
||||
authority: ['system:workflow'],
|
||||
},
|
||||
},
|
||||
],
|
||||
|
@ -151,14 +151,20 @@ export function useColumns(
|
||||
{
|
||||
code: 'append',
|
||||
text: '新增下级',
|
||||
permission: 'system:dept:create',
|
||||
},
|
||||
// {
|
||||
// code: 'auth',
|
||||
// text: '工作流',
|
||||
// },
|
||||
'edit', // 默认的编辑按钮
|
||||
{
|
||||
code: 'edit',
|
||||
text: '修改',
|
||||
permission: 'system:dept:update',
|
||||
},
|
||||
{
|
||||
code: 'delete', // 默认的删除按钮
|
||||
permission: 'system:dept:delete',
|
||||
disabled: (row: DeptApi.Dept) => {
|
||||
return !!(row.children && row.children.length > 0);
|
||||
},
|
||||
|
@ -80,7 +80,14 @@ async function onDelete() {
|
||||
<FormDrawer />
|
||||
<Grid table-title="用户列表">
|
||||
<template #toolbar-tools>
|
||||
<Button type="primary" @click="onDelete" danger> 批量删除 </Button>
|
||||
<Button
|
||||
type="primary"
|
||||
@click="onDelete"
|
||||
danger
|
||||
v-access:code="'system:log:delete'"
|
||||
>
|
||||
批量删除
|
||||
</Button>
|
||||
</template>
|
||||
<template #makeTime="{ row }">
|
||||
{{ dayjs(row.makeTime).format('YYYY-MM-DD HH:mm') }}
|
||||
|
@ -120,6 +120,18 @@ export function useColumns<T = RoleApi.Role>(
|
||||
nameField: 'name',
|
||||
nameTitle: '角色',
|
||||
onClick: onActionClick,
|
||||
options: [
|
||||
{
|
||||
code: 'edit',
|
||||
text: '编辑',
|
||||
permission: 'system:role:update',
|
||||
},
|
||||
{
|
||||
code: 'delete',
|
||||
text: '删除',
|
||||
permission: 'system:role:delete',
|
||||
},
|
||||
],
|
||||
},
|
||||
name: 'CellOperation',
|
||||
},
|
||||
|
@ -155,7 +155,11 @@ function onCreate() {
|
||||
<FormDrawer />
|
||||
<Grid table-title="角色列表">
|
||||
<template #toolbar-tools>
|
||||
<Button type="primary" @click="onCreate">
|
||||
<Button
|
||||
type="primary"
|
||||
@click="onCreate"
|
||||
v-access:code="'system:role:create'"
|
||||
>
|
||||
<Plus class="size-5" />
|
||||
{{ $t('ui.actionTitle.create', ['角色']) }}
|
||||
</Button>
|
||||
|
@ -191,14 +191,17 @@ export function useColumns<T = UserApi.User>(
|
||||
{
|
||||
code: 'resetPassword',
|
||||
text: '重置密码',
|
||||
permission: 'system:user:update',
|
||||
},
|
||||
{
|
||||
code: 'edit',
|
||||
text: '修改',
|
||||
permission: 'system:user:update',
|
||||
},
|
||||
{
|
||||
code: 'delete',
|
||||
text: '删除',
|
||||
permission: 'system:user:delete',
|
||||
},
|
||||
],
|
||||
name: 'CellOperation',
|
||||
|
@ -170,7 +170,11 @@ function onCreate() {
|
||||
<FormDrawer @success="onRefresh" />
|
||||
<Grid table-title="用户列表">
|
||||
<template #toolbar-tools>
|
||||
<Button type="primary" @click="onCreate">
|
||||
<Button
|
||||
type="primary"
|
||||
@click="onCreate"
|
||||
v-access:code="'system:user:create'"
|
||||
>
|
||||
<Plus class="size-5" />
|
||||
{{ $t('ui.actionTitle.create', ['用户']) }}
|
||||
</Button>
|
||||
|
@ -67,7 +67,11 @@ export function useColumns(
|
||||
onClick: onActionClick,
|
||||
},
|
||||
options: [
|
||||
'edit', // 默认的编辑按钮
|
||||
{
|
||||
code: 'update',
|
||||
text: '关联部门',
|
||||
permission: 'workflow:update',
|
||||
},
|
||||
],
|
||||
},
|
||||
field: 'operation',
|
||||
|
@ -6,7 +6,7 @@ export const LOGIN_PATH = '/auth/login';
|
||||
/**
|
||||
* @zh_CN 默认首页地址
|
||||
*/
|
||||
export const DEFAULT_HOME_PATH = '/analytics';
|
||||
export const DEFAULT_HOME_PATH = '/home';
|
||||
|
||||
export interface LanguageOption {
|
||||
label: string;
|
||||
|
Loading…
Reference in New Issue
Block a user