Commit f7d744a29a768ea40291cb4b72a97e7e7ea5366e
1 parent
c22e4154
fix:DEFECT-611 修复未分配修改密码菜单显示404,没有此页面,应该显示为没有权限
Showing
1 changed file
with
4 additions
and
6 deletions
... | ... | @@ -32,7 +32,7 @@ |
32 | 32 | icon="ion:document-text-outline" |
33 | 33 | /> |
34 | 34 | <MenuItem |
35 | - v-if="ifExistChangePassword" | |
35 | + v-if="hasPermission('system:password:view')" | |
36 | 36 | key="changePassword" |
37 | 37 | :text="t('layout.header.dropdownItemChangePassword')" |
38 | 38 | icon="ant-design:unlock-twotone" |
... | ... | @@ -73,7 +73,7 @@ |
73 | 73 | import { USER_INFO_KEY } from '/@/enums/cacheEnum'; |
74 | 74 | import { getAuthCache } from '/@/utils/auth'; |
75 | 75 | import { useRouter } from 'vue-router'; |
76 | - import { usePermissionStoreWithOut } from '/@/store/modules/permission'; | |
76 | + import { usePermission } from '/@/hooks/web/usePermission'; | |
77 | 77 | |
78 | 78 | type MenuEvent = 'logout' | 'doc' | 'lock' | 'personal' | 'changePassword'; |
79 | 79 | |
... | ... | @@ -91,10 +91,7 @@ |
91 | 91 | }, |
92 | 92 | setup() { |
93 | 93 | //修复修改密码根据后端返回的权限标识来显隐 |
94 | - const usePermissionStore: any = usePermissionStoreWithOut(); | |
95 | - let ifExistChangePassword = ref(false); | |
96 | - ifExistChangePassword.value = | |
97 | - usePermissionStore.getPermCodeList.includes('system:password:view'); | |
94 | + const { hasPermission } = usePermission(); | |
98 | 95 | //修复修改密码根据后端返回的权限标识来显隐 |
99 | 96 | const refreshPersonlData = reactive({ |
100 | 97 | avatar: '', |
... | ... | @@ -183,6 +180,7 @@ |
183 | 180 | register, |
184 | 181 | getUseLockPage, |
185 | 182 | ifExistChangePassword, |
183 | + hasPermission, | |
186 | 184 | }; |
187 | 185 | }, |
188 | 186 | }); | ... | ... |