Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions web/src/view/superAdmin/user/user.vue
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
</div>
</template>
</el-dialog>

<el-drawer
v-model="addUserDialog"
:size="appStore.drawerSize"
Expand Down Expand Up @@ -356,6 +356,12 @@
}
)

const authOptions = ref([])
const setOptions = (authData) => {
authOptions.value = []
setAuthorityOptions(authData, authOptions.value)
}

const initPage = async () => {
getTableData()
const res = await getAuthorityList()
Expand All @@ -373,7 +379,7 @@
nickName: '',
password: ''
})

// 生成随机密码
const generateRandomPassword = () => {
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*'
Expand All @@ -395,7 +401,7 @@
})
})
}

// 打开重置密码对话框
const resetPasswordFunc = (row) => {
resetPwdInfo.value.ID = row.ID
Expand All @@ -404,7 +410,7 @@
resetPwdInfo.value.password = ''
resetPwdDialog.value = true
}

// 确认重置密码
const confirmResetPassword = async () => {
if (!resetPwdInfo.value.password) {
Expand All @@ -414,12 +420,12 @@
})
return
}

const res = await resetPassword({
ID: resetPwdInfo.value.ID,
password: resetPwdInfo.value.password
})

if (res.code === 0) {
ElMessage({
type: 'success',
Expand All @@ -433,7 +439,7 @@
})
}
}

// 关闭重置密码对话框
const closeResetPwdDialog = () => {
resetPwdInfo.value.password = ''
Expand All @@ -450,12 +456,6 @@
})
}

const authOptions = ref([])
const setOptions = (authData) => {
authOptions.value = []
setAuthorityOptions(authData, authOptions.value)
}

const deleteUserFunc = async (row) => {
ElMessageBox.confirm('确定要删除吗?', '提示', {
confirmButtonText: '确定',
Expand Down