This commit is contained in:
parent
3b75720790
commit
75bc71b532
|
|
@ -156,7 +156,6 @@
|
|||
<script>
|
||||
import { getUserList, createUser, updateUser, deleteUser, resetUserPassword } from '@/api/user'
|
||||
import { getAllRoles } from '@/api/role'
|
||||
import { getUserInfo } from '@/utils/auth'
|
||||
import { hasPermission } from '@/utils/permission'
|
||||
|
||||
export default {
|
||||
|
|
@ -178,8 +177,6 @@ export default {
|
|||
dialogTitle: '添加用户',
|
||||
isEdit: false,
|
||||
submitLoading: false,
|
||||
currentUserId: null,
|
||||
isAdmin: false,
|
||||
userForm: {
|
||||
id: null,
|
||||
username: '',
|
||||
|
|
@ -209,18 +206,10 @@ export default {
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadUserInfo()
|
||||
this.fetchRoleList()
|
||||
this.fetchUserList()
|
||||
},
|
||||
methods: {
|
||||
loadUserInfo() {
|
||||
const userInfo = getUserInfo()
|
||||
if (userInfo) {
|
||||
this.currentUserId = userInfo.id
|
||||
this.isAdmin = userInfo.role === 'admin' || (userInfo.role && userInfo.role.code === 'admin')
|
||||
}
|
||||
},
|
||||
hasPermission,
|
||||
|
||||
async fetchRoleList() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue