Commit 118e7eaf authored by lvweichao's avatar lvweichao

fix: user info modal value

parent 64bceca9
......@@ -84,7 +84,7 @@ export default {
},
watch: {
data(val) {
this.userInfo = val;
this.userInfo = JSON.parse(JSON.stringify(val));
this.userInfo.roles = val.roles.map(ele => ele.role_id);
this.userInfo.user_status = val.user_status.toString();
this.userInfo.is_sensitive_authority = val.is_sensitive_authority.toString();
......
......@@ -87,12 +87,19 @@ export default {
}
},
watch: {
data(val) {
this.userInfo = val;
this.userInfo.roles = val.roles.map(ele => ele.role_id);
},
visable(val) {
this.modalVisable = val;
if (val) {
this.userInfo = {
user_name: '',
user_email: '',
is_sensitive_authority: '0',
user_mobile: '',
roles: [],
user_status: '1',
organization: '',
};
}
}
},
beforeMount(){
......
......@@ -303,8 +303,8 @@ export default {
},
async disableUser(row) {
const { user_id, reason } = row;
const { code } = await reqEditUser({ user_status: 2, user_id });
const { user_id } = row;
const { code, reason } = await reqEditUser({ user_status: 2, user_id });
if (code === 0) {
ElMessage.success("禁用成功!");
this.getUserList();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment