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