Showing
1 changed file
with
11 additions
and
1 deletions
| @@ -50,6 +50,7 @@ | @@ -50,6 +50,7 @@ | ||
| 50 | icon: 'ant-design:login-outlined', | 50 | icon: 'ant-design:login-outlined', |
| 51 | tooltip: '以客户用户身份登录', | 51 | tooltip: '以客户用户身份登录', |
| 52 | onClick: handleLoginCustomAdmin.bind(null, record), | 52 | onClick: handleLoginCustomAdmin.bind(null, record), |
| 53 | + ifShow: !isAdmin(role), | ||
| 53 | }, | 54 | }, |
| 54 | { | 55 | { |
| 55 | label: '用户详情', | 56 | label: '用户详情', |
| @@ -110,6 +111,9 @@ | @@ -110,6 +111,9 @@ | ||
| 110 | import { RouteRecordRaw } from 'vue-router'; | 111 | import { RouteRecordRaw } from 'vue-router'; |
| 111 | import { PAGE_NOT_FOUND_ROUTE } from '/@/router/routes/basic'; | 112 | import { PAGE_NOT_FOUND_ROUTE } from '/@/router/routes/basic'; |
| 112 | import { PageEnum } from '/@/enums/pageEnum'; | 113 | import { PageEnum } from '/@/enums/pageEnum'; |
| 114 | + import { getAuthCache } from '/@/utils/auth'; | ||
| 115 | + import { USER_INFO_KEY } from '/@/enums/cacheEnum'; | ||
| 116 | + import { isAdmin } from '/@/enums/roleEnum'; | ||
| 113 | 117 | ||
| 114 | export default defineComponent({ | 118 | export default defineComponent({ |
| 115 | name: 'AccountManagement', | 119 | name: 'AccountManagement', |
| @@ -124,6 +128,9 @@ | @@ -124,6 +128,9 @@ | ||
| 124 | Popconfirm, | 128 | Popconfirm, |
| 125 | }, | 129 | }, |
| 126 | setup() { | 130 | setup() { |
| 131 | + const userInfo: any = getAuthCache(USER_INFO_KEY); | ||
| 132 | + const role: string = userInfo?.roles[0]; | ||
| 133 | + | ||
| 127 | const go = useGo(); | 134 | const go = useGo(); |
| 128 | const [registerModal, { openModal }] = useModal(); | 135 | const [registerModal, { openModal }] = useModal(); |
| 129 | let searchInfo = reactive<Recordable>({}); | 136 | let searchInfo = reactive<Recordable>({}); |
| @@ -137,7 +144,7 @@ | @@ -137,7 +144,7 @@ | ||
| 137 | formConfig: { | 144 | formConfig: { |
| 138 | labelWidth: 120, | 145 | labelWidth: 120, |
| 139 | schemas: searchFormSchema, | 146 | schemas: searchFormSchema, |
| 140 | - autoSubmitOnEnter: true, | 147 | + // autoSubmitOnEnter: true, |
| 141 | resetFunc: resetFn, | 148 | resetFunc: resetFn, |
| 142 | }, | 149 | }, |
| 143 | useSearchForm: true, | 150 | useSearchForm: true, |
| @@ -148,6 +155,7 @@ | @@ -148,6 +155,7 @@ | ||
| 148 | title: '操作', | 155 | title: '操作', |
| 149 | dataIndex: 'action', | 156 | dataIndex: 'action', |
| 150 | slots: { customRender: 'action' }, | 157 | slots: { customRender: 'action' }, |
| 158 | + fixed: 'right', | ||
| 151 | }, | 159 | }, |
| 152 | }); | 160 | }); |
| 153 | const { hasBatchDelete, handleDeleteOrBatchDelete, selectionOptions } = useBatchDelete( | 161 | const { hasBatchDelete, handleDeleteOrBatchDelete, selectionOptions } = useBatchDelete( |
| @@ -218,6 +226,8 @@ | @@ -218,6 +226,8 @@ | ||
| 218 | organizationIdTreeRef, | 226 | organizationIdTreeRef, |
| 219 | hasBatchDelete, | 227 | hasBatchDelete, |
| 220 | handleDeleteOrBatchDelete, | 228 | handleDeleteOrBatchDelete, |
| 229 | + isAdmin, | ||
| 230 | + role, | ||
| 221 | }; | 231 | }; |
| 222 | }, | 232 | }, |
| 223 | }); | 233 | }); |