This commit is contained in:
wangxiaoxian 2026-03-09 14:51:36 +08:00
parent 3b75720790
commit 75bc71b532
1 changed files with 0 additions and 11 deletions

View File

@ -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() {