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