Commit a88a792ed119a23d4a66ceb59c3ff932f047ca56
1 parent
a79afdf7
fix: system dict control add permission
Showing
1 changed file
with
7 additions
and
2 deletions
... | ... | @@ -4,7 +4,9 @@ |
4 | 4 | <div style="background-color: #f0f2f5"> |
5 | 5 | <BasicTable @register="registerTable"> |
6 | 6 | <template #toolbar> |
7 | - <a-button type="primary" @click="handleCreate"> 新增字典值 </a-button> | |
7 | + <Authority value="api:yt:dictItem:post"> | |
8 | + <a-button type="primary" @click="handleCreate"> 新增字典值 </a-button> | |
9 | + </Authority> | |
8 | 10 | </template> |
9 | 11 | <template #action="{ record }"> |
10 | 12 | <TableAction |
... | ... | @@ -12,12 +14,14 @@ |
12 | 14 | { |
13 | 15 | label: '编辑', |
14 | 16 | icon: 'clarity:note-edit-line', |
17 | + auth: 'api:yt:dictItem:update', | |
15 | 18 | onClick: handleEdit.bind(null, record), |
16 | 19 | }, |
17 | 20 | { |
18 | 21 | label: '删除', |
19 | 22 | icon: 'ant-design:delete-outlined', |
20 | 23 | color: 'error', |
24 | + auth: 'api:yt:dictItem:delete', | |
21 | 25 | popConfirm: { |
22 | 26 | title: '是否确认删除', |
23 | 27 | confirm: handleDelete.bind(null, record), |
... | ... | @@ -44,10 +48,11 @@ |
44 | 48 | |
45 | 49 | import { columns, searchFormSchema } from './dict.item.data'; |
46 | 50 | import { useMessage } from '/@/hooks/web/useMessage'; |
51 | + import Authority from '/@/components/Authority/src/Authority.vue'; | |
47 | 52 | |
48 | 53 | export default defineComponent({ |
49 | 54 | name: 'ItemIndex', |
50 | - components: { BasicDrawer, BasicTable, ItemDrawer, TableAction }, | |
55 | + components: { BasicDrawer, BasicTable, ItemDrawer, TableAction, Authority }, | |
51 | 56 | setup() { |
52 | 57 | let dictId; |
53 | 58 | const { createMessage } = useMessage(); | ... | ... |