Commit 1d7450276eea33b6831d1d09787215f18dec91c3
1 parent
67c7c7d4
feat:租户配置 租户管理员 新增权限标识(新增、编辑、删除)权限标识
Showing
2 changed files
with
11 additions
and
3 deletions
@@ -12,7 +12,7 @@ export const columns: BasicColumn[] = [ | @@ -12,7 +12,7 @@ export const columns: BasicColumn[] = [ | ||
12 | title: t('routes.common.system.tableTitleSystemMenuName'), //菜单名称 | 12 | title: t('routes.common.system.tableTitleSystemMenuName'), //菜单名称 |
13 | // title:'菜单名称', | 13 | // title:'菜单名称', |
14 | dataIndex: 'meta.title', | 14 | dataIndex: 'meta.title', |
15 | - width: 200, | 15 | + width: 180, |
16 | align: 'left', | 16 | align: 'left', |
17 | customRender: ({ record }) => { | 17 | customRender: ({ record }) => { |
18 | record = t(record.meta.title); //国际化处理 | 18 | record = t(record.meta.title); //国际化处理 |
@@ -32,11 +32,12 @@ export const columns: BasicColumn[] = [ | @@ -32,11 +32,12 @@ export const columns: BasicColumn[] = [ | ||
32 | title: t('routes.common.system.tableTitleSystemPermissionTag'), //权限标识 | 32 | title: t('routes.common.system.tableTitleSystemPermissionTag'), //权限标识 |
33 | // title:'权限标识', | 33 | // title:'权限标识', |
34 | dataIndex: 'permission', | 34 | dataIndex: 'permission', |
35 | - width: 180, | 35 | + width: 220, |
36 | }, | 36 | }, |
37 | { | 37 | { |
38 | title: t('routes.common.system.tableTitleSystemComponents'), //'组件' | 38 | title: t('routes.common.system.tableTitleSystemComponents'), //'组件' |
39 | // title:'组件', | 39 | // title:'组件', |
40 | + width: 120, | ||
40 | dataIndex: 'component', | 41 | dataIndex: 'component', |
41 | }, | 42 | }, |
42 | { | 43 | { |
@@ -8,7 +8,9 @@ | @@ -8,7 +8,9 @@ | ||
8 | > | 8 | > |
9 | <BasicTable @register="tenantAdminTable"> | 9 | <BasicTable @register="tenantAdminTable"> |
10 | <template #toolbar> | 10 | <template #toolbar> |
11 | - <a-button type="primary" @click="handleCreateTenantAdmin">新增租户管理员</a-button> | 11 | + <Authority value="api:yt:user:saveTenantAdmin:post"> |
12 | + <a-button type="primary" @click="handleCreateTenantAdmin">新增租户管理员</a-button> | ||
13 | + </Authority> | ||
12 | </template> | 14 | </template> |
13 | <template #action="{ record }"> | 15 | <template #action="{ record }"> |
14 | <TableAction | 16 | <TableAction |
@@ -37,12 +39,14 @@ | @@ -37,12 +39,14 @@ | ||
37 | label: '编辑', | 39 | label: '编辑', |
38 | icon: 'clarity:note-edit-line', | 40 | icon: 'clarity:note-edit-line', |
39 | tooltip: '编辑', | 41 | tooltip: '编辑', |
42 | + auth: 'api:yt:user:saveTenantAdmin:update', | ||
40 | onClick: handleEdit.bind(null, record), | 43 | onClick: handleEdit.bind(null, record), |
41 | }, | 44 | }, |
42 | { | 45 | { |
43 | label: '删除', | 46 | label: '删除', |
44 | icon: 'ant-design:delete-outlined', | 47 | icon: 'ant-design:delete-outlined', |
45 | tooltip: '删除', | 48 | tooltip: '删除', |
49 | + auth: 'api:yt:user:saveTenantAdmin:delete', | ||
46 | color: 'error', | 50 | color: 'error', |
47 | popConfirm: { | 51 | popConfirm: { |
48 | title: '是否确认删除', | 52 | title: '是否确认删除', |
@@ -90,6 +94,8 @@ | @@ -90,6 +94,8 @@ | ||
90 | import { MessageTypeEnum, SendResetPasswordEmailMsg } from '/@/api/tenant/tenantInfo'; | 94 | import { MessageTypeEnum, SendResetPasswordEmailMsg } from '/@/api/tenant/tenantInfo'; |
91 | import { useMessage } from '/@/hooks/web/useMessage'; | 95 | import { useMessage } from '/@/hooks/web/useMessage'; |
92 | import { RoleEnum } from '/@/enums/roleEnum'; | 96 | import { RoleEnum } from '/@/enums/roleEnum'; |
97 | + import { Authority } from '/@/components/Authority'; | ||
98 | + | ||
93 | export default defineComponent({ | 99 | export default defineComponent({ |
94 | name: 'TenantAdminDrawer', | 100 | name: 'TenantAdminDrawer', |
95 | components: { | 101 | components: { |
@@ -98,6 +104,7 @@ | @@ -98,6 +104,7 @@ | ||
98 | TenantAdminFormDrawer, | 104 | TenantAdminFormDrawer, |
99 | Tag, | 105 | Tag, |
100 | TableAction, | 106 | TableAction, |
107 | + Authority, | ||
101 | }, | 108 | }, |
102 | emits: ['register'], | 109 | emits: ['register'], |
103 | setup() { | 110 | setup() { |