File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
web/src/view/superAdmin/user Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change 174174 </div >
175175 </template >
176176 </el-dialog >
177-
177+
178178 <el-drawer
179179 v-model =" addUserDialog"
180180 :size =" appStore.drawerSize"
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 ()
373379 nickName: ' ' ,
374380 password: ' '
375381 })
376-
382+
377383 // 生成随机密码
378384 const generateRandomPassword = () => {
379385 const chars = ' ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*'
395401 })
396402 })
397403 }
398-
404+
399405 // 打开重置密码对话框
400406 const resetPasswordFunc = (row ) => {
401407 resetPwdInfo .value .ID = row .ID
404410 resetPwdInfo .value .password = ' '
405411 resetPwdDialog .value = true
406412 }
407-
413+
408414 // 确认重置密码
409415 const confirmResetPassword = async () => {
410416 if (! resetPwdInfo .value .password ) {
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' ,
433439 })
434440 }
435441 }
436-
442+
437443 // 关闭重置密码对话框
438444 const closeResetPwdDialog = () => {
439445 resetPwdInfo .value .password = ' '
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: ' 确定' ,
You can’t perform that action at this time.
0 commit comments