Showing
4 changed files
with
16 additions
and
5 deletions
src/enums/codeEnum.ts
0 → 100644
... | ... | @@ -15,24 +15,28 @@ |
15 | 15 | </template> |
16 | 16 | <template #action="{ record }"> |
17 | 17 | <TableAction |
18 | - :actions="[ | |
18 | + :actions=" | |
19 | +[ | |
19 | 20 | { |
20 | 21 | label:'用户详情', |
21 | 22 | icon: 'clarity:info-standard-line', |
22 | 23 | tooltip: '用户详情', |
23 | 24 | onClick: handleView.bind(null, record), |
25 | + ifShow: record.tenantCode != TenantCodeEnum.SYS_ADMIN_CODE, | |
24 | 26 | }, |
25 | 27 | { |
26 | 28 | label:'编辑', |
27 | 29 | icon: 'clarity:note-edit-line', |
28 | 30 | tooltip: '编辑', |
29 | 31 | onClick: handleEdit.bind(null, record), |
32 | + ifShow: record.tenantCode != TenantCodeEnum.SYS_ADMIN_CODE, | |
30 | 33 | }, |
31 | 34 | { |
32 | 35 | label:'删除', |
33 | 36 | icon: 'ant-design:delete-outlined', |
34 | 37 | color: 'error', |
35 | 38 | tooltip: '删除', |
39 | + ifShow: record.tenantCode != TenantCodeEnum.SYS_ADMIN_CODE, | |
36 | 40 | popConfirm: { |
37 | 41 | title: '是否确认删除', |
38 | 42 | confirm: handleDelete.bind(null, record), |
... | ... | @@ -48,6 +52,7 @@ |
48 | 52 | <script lang="ts"> |
49 | 53 | import { defineComponent, reactive } from 'vue'; |
50 | 54 | |
55 | + import {TenantCodeEnum} from '/@/enums/codeEnum'; | |
51 | 56 | import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
52 | 57 | import {deleteUser, getAccountList} from '/@/api/system/system'; |
53 | 58 | import { PageWrapper } from '/@/components/Page'; |
... | ... | @@ -143,6 +148,7 @@ |
143 | 148 | handleSelect, |
144 | 149 | handleView, |
145 | 150 | searchInfo, |
151 | + TenantCodeEnum | |
146 | 152 | }; |
147 | 153 | }, |
148 | 154 | }); | ... | ... |
... | ... | @@ -20,7 +20,8 @@ |
20 | 20 | </template> |
21 | 21 | <template #action="{ record }"> |
22 | 22 | <TableAction |
23 | - :actions="[ | |
23 | + :actions=" | |
24 | +[ | |
24 | 25 | { |
25 | 26 | icon: 'ant-design:usergroup-add-outlined', |
26 | 27 | label:'租户管理员', |
... | ... | @@ -57,7 +58,6 @@ import {deleteTenant, getTenantPage} from '/@/api/tenant/tenantApi'; |
57 | 58 | import {useDrawer} from "/@/components/Drawer"; |
58 | 59 | import TenantDrawer from "./TenantDrawer.vue" |
59 | 60 | import TenantAdminDrawer from "./TenantAdminDrawer.vue" |
60 | - | |
61 | 61 | export default defineComponent({ |
62 | 62 | components: {BasicTable, Avatar, TableImg, Tag, TableAction, TenantDrawer, TenantAdminDrawer}, |
63 | 63 | setup() { |
... | ... | @@ -136,7 +136,7 @@ export default defineComponent({ |
136 | 136 | tenantDrawer, |
137 | 137 | tenantAdminDrawer, |
138 | 138 | handleSuccess, |
139 | - handleTenantAdminDrawer | |
139 | + handleTenantAdminDrawer, | |
140 | 140 | }; |
141 | 141 | }, |
142 | 142 | }); | ... | ... |