mirror of
https://github.com/dataease/dataease.git
synced 2026-05-24 06:18:10 +08:00
feat: 修改用户密码
This commit is contained in:
@@ -4,7 +4,7 @@ const pathMap = {
|
||||
deletePath: '/api/user/delete/',
|
||||
createPath: '/api/user/create',
|
||||
updatePath: '/api/user/update',
|
||||
editPasswordPath: '/api/user/updatePwd',
|
||||
editPasswordPath: '/api/user/adminUpdatePwd',
|
||||
editStatusPath: '/api/user/updateStatus'
|
||||
}
|
||||
export function userLists(page, size, data) {
|
||||
|
||||
@@ -390,6 +390,30 @@ export default {
|
||||
invalid: '无效',
|
||||
expired: '已过期'
|
||||
},
|
||||
member: {
|
||||
create: '添加成员',
|
||||
modify: '修改成员',
|
||||
delete_confirm: '这个用户确定要删除吗?',
|
||||
please_choose_member: '请选择成员',
|
||||
search_by_name: '根据名称搜索',
|
||||
modify_personal_info: '修改个人信息',
|
||||
edit_password: '修改密码',
|
||||
edit_information: '编辑信息',
|
||||
input_name: '请输入名称',
|
||||
input_email: '请输入邮箱',
|
||||
special_characters_are_not_supported: '不支持特殊字符',
|
||||
mobile_number_format_is_incorrect: '手机号码格式不正确',
|
||||
email_format_is_incorrect: '邮箱格式不正确',
|
||||
password_format_is_incorrect: '有效密码:8-30位,英文大小写字母+数字+特殊字符(可选)',
|
||||
old_password: '旧密码',
|
||||
new_password: '新密码',
|
||||
repeat_password: '确认密码',
|
||||
inconsistent_passwords: '两次输入的密码不一致',
|
||||
remove_member: '确定要移除该成员吗',
|
||||
org_remove_member: '将该用户从组织中移除,将同时移除该组织下所有工作空间的权限,确定要移除该成员吗?',
|
||||
input_id_or_email: '请输入用户 ID, 或者 用户邮箱',
|
||||
no_such_user: '无此用户信息, 请输入正确的用户 ID 或者 用户邮箱!'
|
||||
},
|
||||
user: {
|
||||
create: '创建用户',
|
||||
modify: '修改用户',
|
||||
|
||||
@@ -44,7 +44,7 @@ router.beforeEach(async(to, from, next) => {
|
||||
})
|
||||
} else if (store.getters.loadMenus) {
|
||||
// 修改成false,防止死循环
|
||||
store.dispatch('updateLoadMenus')
|
||||
store.dispatch('user/updateLoadMenus')
|
||||
loadMenus(next, to)
|
||||
} else {
|
||||
next()
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<ms-table-operator :permission="permission" @editClick="edit(scope.row)" @deleteClick="del(scope.row)">
|
||||
<template v-slot:behind>
|
||||
<ms-table-operator-button
|
||||
v-if="scope.row.isLocalUser"
|
||||
v-permission="permission.editPwd"
|
||||
:tip="$t('member.edit_password')"
|
||||
icon="el-icon-s-tools"
|
||||
type="success"
|
||||
@@ -143,15 +143,14 @@
|
||||
:model="ruleForm"
|
||||
label-position="right"
|
||||
label-width="120px"
|
||||
size="small"
|
||||
:rules="rule"
|
||||
class="demo-ruleForm"
|
||||
>
|
||||
<el-form-item :label="$t('member.new_password')" prop="newpassword">
|
||||
<el-input v-model="ruleForm.newpassword" type="password" autocomplete="off" show-password />
|
||||
<el-input v-model="ruleForm.newPassword" type="password" autocomplete="off" show-password />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="ruleForm.id" autocomplete="off" :disabled="true" style="display:none" />
|
||||
<el-input v-model="ruleForm.userId" autocomplete="off" :disabled="true" style="display:none" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -260,7 +259,7 @@ export default {
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
newpassword: [
|
||||
newPassword: [
|
||||
{ required: true, message: this.$t('user.input_password'), trigger: 'blur' },
|
||||
{
|
||||
required: true,
|
||||
@@ -279,7 +278,8 @@ export default {
|
||||
permission: {
|
||||
add: ['user:add'],
|
||||
edit: ['user:edit'],
|
||||
del: ['user:del']
|
||||
del: ['user:del'],
|
||||
editPwd: ['user:editPwd']
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -307,7 +307,8 @@ export default {
|
||||
},
|
||||
editPassword(row) {
|
||||
this.editPasswordVisible = true
|
||||
this.ruleForm = Object.assign({}, row)
|
||||
const tempForm = Object.assign({}, row)
|
||||
this.ruleForm = { userId: tempForm.userId }
|
||||
listenGoBack(this.handleClose)
|
||||
},
|
||||
del(row) {
|
||||
|
||||
Reference in New Issue
Block a user