Skip to content

Commit 27fb85f

Browse files
authored
bugfix:用户管理界面无法分配 / 查看角色
1 parent 057ad2e commit 27fb85f

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

web/src/view/superAdmin/user/user.vue

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
</div>
175175
</template>
176176
</el-dialog>
177-
177+
178178
<el-drawer
179179
v-model="addUserDialog"
180180
:size="appStore.drawerSize"
@@ -356,6 +356,12 @@
356356
}
357357
)
358358
359+
const authOptions = ref([])
360+
const setOptions = (authData) => {
361+
authOptions.value = []
362+
setAuthorityOptions(authData, authOptions.value)
363+
}
364+
359365
const initPage = async () => {
360366
getTableData()
361367
const res = await getAuthorityList()
@@ -373,7 +379,7 @@
373379
nickName: '',
374380
password: ''
375381
})
376-
382+
377383
// 生成随机密码
378384
const generateRandomPassword = () => {
379385
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*'
@@ -395,7 +401,7 @@
395401
})
396402
})
397403
}
398-
404+
399405
// 打开重置密码对话框
400406
const resetPasswordFunc = (row) => {
401407
resetPwdInfo.value.ID = row.ID
@@ -404,7 +410,7 @@
404410
resetPwdInfo.value.password = ''
405411
resetPwdDialog.value = true
406412
}
407-
413+
408414
// 确认重置密码
409415
const confirmResetPassword = async () => {
410416
if (!resetPwdInfo.value.password) {
@@ -414,12 +420,12 @@
414420
})
415421
return
416422
}
417-
423+
418424
const res = await resetPassword({
419425
ID: resetPwdInfo.value.ID,
420426
password: resetPwdInfo.value.password
421427
})
422-
428+
423429
if (res.code === 0) {
424430
ElMessage({
425431
type: 'success',
@@ -433,7 +439,7 @@
433439
})
434440
}
435441
}
436-
442+
437443
// 关闭重置密码对话框
438444
const closeResetPwdDialog = () => {
439445
resetPwdInfo.value.password = ''
@@ -450,12 +456,6 @@
450456
})
451457
}
452458
453-
const authOptions = ref([])
454-
const setOptions = (authData) => {
455-
authOptions.value = []
456-
setAuthorityOptions(authData, authOptions.value)
457-
}
458-
459459
const deleteUserFunc = async (row) => {
460460
ElMessageBox.confirm('确定要删除吗?', '提示', {
461461
confirmButtonText: '确定',

0 commit comments

Comments
 (0)