|
|
|
|
@ -9,6 +9,7 @@ import {
|
|
|
|
|
AdminUpdateAction,
|
|
|
|
|
AdminDeleteAction,
|
|
|
|
|
AdminListAction,
|
|
|
|
|
AdminResetPasswordAction,
|
|
|
|
|
AdminAuthGroupSelectAction,
|
|
|
|
|
$image,
|
|
|
|
|
$response, $base64, UploadImageAction
|
|
|
|
|
@ -190,6 +191,34 @@ ${copy_data.value.initial_password === 1 ? '请务必' : '建议'}在登录后
|
|
|
|
|
window.$message().success('内容已复制')
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const resetPasswordClick = () => {
|
|
|
|
|
window.$box.confirm(
|
|
|
|
|
'是否确认重置该管理员的密码?',
|
|
|
|
|
'提示',
|
|
|
|
|
{
|
|
|
|
|
confirmButtonText: '确认',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning',
|
|
|
|
|
}
|
|
|
|
|
).then(() => {
|
|
|
|
|
AdminResetPassword()
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const AdminResetPassword = async () => {
|
|
|
|
|
const response = await AdminResetPasswordAction({
|
|
|
|
|
id: edit_data.value.id
|
|
|
|
|
})
|
|
|
|
|
$response(response, () => {
|
|
|
|
|
copy_data.value = JSON.parse(JSON.stringify({
|
|
|
|
|
...edit_data.value,
|
|
|
|
|
password: response.data.password
|
|
|
|
|
}))
|
|
|
|
|
copy_show.value = true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
@ -368,6 +397,7 @@ ${copy_data.value.initial_password === 1 ? '请务必' : '建议'}在登录后
|
|
|
|
|
<el-button @click="editClick(0)" type="primary">新建</el-button>
|
|
|
|
|
<el-button :disabled="edit_data.id === 0" @click="editClick(1)" type="success">编辑</el-button>
|
|
|
|
|
<el-button :disabled="edit_data.id === 0" @click="deleteClick()" type="danger">删除</el-button>
|
|
|
|
|
<el-button :disabled="edit_data.id === 0" @click="resetPasswordClick()" type="warning">重置密码</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<el-table row-class-name="cursor-pointer" mt-2 border :data="admin_list" highlight-current-row
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|