用户/个人
parent
dade4f045e
commit
043b0fc50f
|
@ -71,19 +71,111 @@ export default {
|
||||||
const userId = this.$route.params && this.$route.params.userId;
|
const userId = this.$route.params && this.$route.params.userId;
|
||||||
if (userId) {
|
if (userId) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
getAuthRole(userId).then((response) => {
|
let response = {
|
||||||
this.form = response.data.user;
|
"code": 200,
|
||||||
this.roles = response.data.roles;
|
"msg": "操作成功",
|
||||||
this.total = this.roles.length;
|
"data": {
|
||||||
this.$nextTick(() => {
|
"user": {
|
||||||
this.roles.forEach((row) => {
|
"createBy": 1,
|
||||||
if (row.flag) {
|
"createTime": "2023-09-29 11:47:27",
|
||||||
this.$refs.table.toggleRowSelection(row);
|
"updateBy": null,
|
||||||
|
"updateTime": null,
|
||||||
|
"userId": 2,
|
||||||
|
"deptId": 105,
|
||||||
|
"userName": "muyu",
|
||||||
|
"nickName": "牧雨",
|
||||||
|
"email": "muyu@qq.com",
|
||||||
|
"phonenumber": "15666666666",
|
||||||
|
"sex": "0",
|
||||||
|
"avatar": "",
|
||||||
|
"password": "$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2",
|
||||||
|
"status": "0",
|
||||||
|
"delFlag": "0",
|
||||||
|
"loginIp": "127.0.0.1",
|
||||||
|
"loginDate": "2023-09-29T11:47:27.000+08:00",
|
||||||
|
"dept": {
|
||||||
|
"createBy": null,
|
||||||
|
"createTime": null,
|
||||||
|
"updateBy": null,
|
||||||
|
"updateTime": null,
|
||||||
|
"deptId": 105,
|
||||||
|
"parentId": 101,
|
||||||
|
"ancestors": "0,100,101",
|
||||||
|
"deptName": "测试部门",
|
||||||
|
"orderNum": 3,
|
||||||
|
"leader": "muyu",
|
||||||
|
"phone": null,
|
||||||
|
"email": null,
|
||||||
|
"status": "0",
|
||||||
|
"delFlag": null,
|
||||||
|
"parentName": null,
|
||||||
|
"children": []
|
||||||
|
},
|
||||||
|
"roles": [
|
||||||
|
{
|
||||||
|
"createBy": null,
|
||||||
|
"createTime": null,
|
||||||
|
"updateBy": null,
|
||||||
|
"updateTime": null,
|
||||||
|
"roleId": 2,
|
||||||
|
"roleName": "普通角色",
|
||||||
|
"roleKey": "common",
|
||||||
|
"roleSort": 2,
|
||||||
|
"dataScope": "2",
|
||||||
|
"menuCheckStrictly": false,
|
||||||
|
"deptCheckStrictly": false,
|
||||||
|
"status": "0",
|
||||||
|
"delFlag": null,
|
||||||
|
"flag": false,
|
||||||
|
"menuIds": null,
|
||||||
|
"deptIds": null,
|
||||||
|
"permissions": null,
|
||||||
|
"remark": null,
|
||||||
|
"admin": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"roleIds": null,
|
||||||
|
"postIds": null,
|
||||||
|
"roleId": null,
|
||||||
|
"remark": "测试员",
|
||||||
|
"admin": false
|
||||||
|
},
|
||||||
|
"roles": [
|
||||||
|
{
|
||||||
|
"createBy": null,
|
||||||
|
"createTime": "2023-09-29 11:47:27",
|
||||||
|
"updateBy": null,
|
||||||
|
"updateTime": null,
|
||||||
|
"roleId": 2,
|
||||||
|
"roleName": "普通角色",
|
||||||
|
"roleKey": "common",
|
||||||
|
"roleSort": 2,
|
||||||
|
"dataScope": "2",
|
||||||
|
"menuCheckStrictly": true,
|
||||||
|
"deptCheckStrictly": true,
|
||||||
|
"status": "0",
|
||||||
|
"delFlag": "0",
|
||||||
|
"flag": true,
|
||||||
|
"menuIds": null,
|
||||||
|
"deptIds": null,
|
||||||
|
"permissions": null,
|
||||||
|
"remark": "普通角色",
|
||||||
|
"admin": false
|
||||||
}
|
}
|
||||||
});
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.form = response.data.user;
|
||||||
|
this.roles = response.data.roles;
|
||||||
|
this.total = this.roles.length;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.roles.forEach((row) => {
|
||||||
|
if (row.flag) {
|
||||||
|
this.$refs.table.toggleRowSelection(row);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.loading = false;
|
|
||||||
});
|
});
|
||||||
|
this.loading = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -101,12 +193,8 @@ export default {
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
const userId = this.form.userId;
|
this.$modal.msgSuccess("授权成功");
|
||||||
const roleIds = this.roleIds.join(",");
|
this.close();
|
||||||
updateAuthRole({userId: userId, roleIds: roleIds}).then((response) => {
|
|
||||||
this.$modal.msgSuccess("授权成功");
|
|
||||||
this.close();
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
/** 关闭按钮 */
|
/** 关闭按钮 */
|
||||||
close() {
|
close() {
|
||||||
|
|
|
@ -726,28 +726,264 @@ export default {
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
getUser().then(response => {
|
let response = {
|
||||||
this.postOptions = response.data.posts;
|
"code": 200,
|
||||||
this.roleOptions = response.data.roles;
|
"msg": "操作成功",
|
||||||
this.open = true;
|
"data": {
|
||||||
this.title = "添加用户";
|
"roles": [
|
||||||
this.form.password = this.initPassword;
|
{
|
||||||
});
|
"createBy": null,
|
||||||
|
"createTime": "2023-09-29 11:47:27",
|
||||||
|
"updateBy": null,
|
||||||
|
"updateTime": null,
|
||||||
|
"roleId": 2,
|
||||||
|
"roleName": "普通角色",
|
||||||
|
"roleKey": "common",
|
||||||
|
"roleSort": 2,
|
||||||
|
"dataScope": "2",
|
||||||
|
"menuCheckStrictly": true,
|
||||||
|
"deptCheckStrictly": true,
|
||||||
|
"status": "0",
|
||||||
|
"delFlag": "0",
|
||||||
|
"flag": false,
|
||||||
|
"menuIds": null,
|
||||||
|
"deptIds": null,
|
||||||
|
"permissions": null,
|
||||||
|
"remark": "普通角色",
|
||||||
|
"admin": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"posts": [
|
||||||
|
{
|
||||||
|
"createBy": 1,
|
||||||
|
"createTime": "2023-09-29 11:47:27",
|
||||||
|
"updateBy": null,
|
||||||
|
"updateTime": null,
|
||||||
|
"postId": 1,
|
||||||
|
"postCode": "ceo",
|
||||||
|
"postName": "董事长",
|
||||||
|
"postSort": 1,
|
||||||
|
"status": "0",
|
||||||
|
"flag": false,
|
||||||
|
"remark": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"createBy": 1,
|
||||||
|
"createTime": "2023-09-29 11:47:27",
|
||||||
|
"updateBy": null,
|
||||||
|
"updateTime": null,
|
||||||
|
"postId": 2,
|
||||||
|
"postCode": "se",
|
||||||
|
"postName": "项目经理",
|
||||||
|
"postSort": 2,
|
||||||
|
"status": "0",
|
||||||
|
"flag": false,
|
||||||
|
"remark": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"createBy": 1,
|
||||||
|
"createTime": "2023-09-29 11:47:27",
|
||||||
|
"updateBy": null,
|
||||||
|
"updateTime": null,
|
||||||
|
"postId": 3,
|
||||||
|
"postCode": "hr",
|
||||||
|
"postName": "人力资源",
|
||||||
|
"postSort": 3,
|
||||||
|
"status": "0",
|
||||||
|
"flag": false,
|
||||||
|
"remark": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"createBy": 1,
|
||||||
|
"createTime": "2023-09-29 11:47:27",
|
||||||
|
"updateBy": null,
|
||||||
|
"updateTime": null,
|
||||||
|
"postId": 4,
|
||||||
|
"postCode": "user",
|
||||||
|
"postName": "普通员工",
|
||||||
|
"postSort": 4,
|
||||||
|
"status": "0",
|
||||||
|
"flag": false,
|
||||||
|
"remark": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sysUser": null,
|
||||||
|
"postIds": null,
|
||||||
|
"roleIds": null
|
||||||
|
}
|
||||||
|
};
|
||||||
|
this.postOptions = response.data.posts;
|
||||||
|
this.roleOptions = response.data.roles;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加用户";
|
||||||
|
this.form.password = this.initPassword;
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const userId = row.userId || this.ids;
|
let response = {
|
||||||
getUser(userId).then(response => {
|
"code": 200,
|
||||||
this.form = response.data.sysUser;
|
"msg": "操作成功",
|
||||||
this.postOptions = response.data.posts;
|
"data": {
|
||||||
this.roleOptions = response.data.roles;
|
"roles": [
|
||||||
this.$set(this.form, "postIds", response.data.postIds);
|
{
|
||||||
this.$set(this.form, "roleIds", response.data.roleIds);
|
"createBy": null,
|
||||||
this.open = true;
|
"createTime": "2023-09-29 11:47:27",
|
||||||
this.title = "修改用户";
|
"updateBy": null,
|
||||||
this.form.password = "";
|
"updateTime": null,
|
||||||
});
|
"roleId": 2,
|
||||||
|
"roleName": "普通角色",
|
||||||
|
"roleKey": "common",
|
||||||
|
"roleSort": 2,
|
||||||
|
"dataScope": "2",
|
||||||
|
"menuCheckStrictly": true,
|
||||||
|
"deptCheckStrictly": true,
|
||||||
|
"status": "0",
|
||||||
|
"delFlag": "0",
|
||||||
|
"flag": false,
|
||||||
|
"menuIds": null,
|
||||||
|
"deptIds": null,
|
||||||
|
"permissions": null,
|
||||||
|
"remark": "普通角色",
|
||||||
|
"admin": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"posts": [
|
||||||
|
{
|
||||||
|
"createBy": 1,
|
||||||
|
"createTime": "2023-09-29 11:47:27",
|
||||||
|
"updateBy": null,
|
||||||
|
"updateTime": null,
|
||||||
|
"postId": 1,
|
||||||
|
"postCode": "ceo",
|
||||||
|
"postName": "董事长",
|
||||||
|
"postSort": 1,
|
||||||
|
"status": "0",
|
||||||
|
"flag": false,
|
||||||
|
"remark": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"createBy": 1,
|
||||||
|
"createTime": "2023-09-29 11:47:27",
|
||||||
|
"updateBy": null,
|
||||||
|
"updateTime": null,
|
||||||
|
"postId": 2,
|
||||||
|
"postCode": "se",
|
||||||
|
"postName": "项目经理",
|
||||||
|
"postSort": 2,
|
||||||
|
"status": "0",
|
||||||
|
"flag": false,
|
||||||
|
"remark": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"createBy": 1,
|
||||||
|
"createTime": "2023-09-29 11:47:27",
|
||||||
|
"updateBy": null,
|
||||||
|
"updateTime": null,
|
||||||
|
"postId": 3,
|
||||||
|
"postCode": "hr",
|
||||||
|
"postName": "人力资源",
|
||||||
|
"postSort": 3,
|
||||||
|
"status": "0",
|
||||||
|
"flag": false,
|
||||||
|
"remark": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"createBy": 1,
|
||||||
|
"createTime": "2023-09-29 11:47:27",
|
||||||
|
"updateBy": null,
|
||||||
|
"updateTime": null,
|
||||||
|
"postId": 4,
|
||||||
|
"postCode": "user",
|
||||||
|
"postName": "普通员工",
|
||||||
|
"postSort": 4,
|
||||||
|
"status": "0",
|
||||||
|
"flag": false,
|
||||||
|
"remark": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sysUser": {
|
||||||
|
"createBy": 1,
|
||||||
|
"createTime": "2023-09-29 11:47:27",
|
||||||
|
"updateBy": null,
|
||||||
|
"updateTime": null,
|
||||||
|
"userId": 2,
|
||||||
|
"deptId": 105,
|
||||||
|
"userName": "muyu",
|
||||||
|
"nickName": "muyu",
|
||||||
|
"email": "muyu@qq.com",
|
||||||
|
"phonenumber": "15666666666",
|
||||||
|
"sex": "0",
|
||||||
|
"avatar": "",
|
||||||
|
"password": "$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2",
|
||||||
|
"status": "0",
|
||||||
|
"delFlag": "0",
|
||||||
|
"loginIp": "127.0.0.1",
|
||||||
|
"loginDate": "2023-09-29T11:47:27.000+08:00",
|
||||||
|
"dept": {
|
||||||
|
"createBy": null,
|
||||||
|
"createTime": null,
|
||||||
|
"updateBy": null,
|
||||||
|
"updateTime": null,
|
||||||
|
"deptId": 105,
|
||||||
|
"parentId": 101,
|
||||||
|
"ancestors": "0,100,101",
|
||||||
|
"deptName": "测试部门",
|
||||||
|
"orderNum": 3,
|
||||||
|
"leader": "锐腾",
|
||||||
|
"phone": null,
|
||||||
|
"email": null,
|
||||||
|
"status": "0",
|
||||||
|
"delFlag": null,
|
||||||
|
"parentName": null,
|
||||||
|
"children": []
|
||||||
|
},
|
||||||
|
"roles": [
|
||||||
|
{
|
||||||
|
"createBy": null,
|
||||||
|
"createTime": null,
|
||||||
|
"updateBy": null,
|
||||||
|
"updateTime": null,
|
||||||
|
"roleId": 2,
|
||||||
|
"roleName": "普通角色",
|
||||||
|
"roleKey": "common",
|
||||||
|
"roleSort": 2,
|
||||||
|
"dataScope": "2",
|
||||||
|
"menuCheckStrictly": false,
|
||||||
|
"deptCheckStrictly": false,
|
||||||
|
"status": "0",
|
||||||
|
"delFlag": null,
|
||||||
|
"flag": false,
|
||||||
|
"menuIds": null,
|
||||||
|
"deptIds": null,
|
||||||
|
"permissions": null,
|
||||||
|
"remark": null,
|
||||||
|
"admin": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"roleIds": null,
|
||||||
|
"postIds": null,
|
||||||
|
"roleId": null,
|
||||||
|
"remark": "测试员",
|
||||||
|
"admin": false
|
||||||
|
},
|
||||||
|
"postIds": [
|
||||||
|
2,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"roleIds": [
|
||||||
|
2
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.form = response.data.sysUser;
|
||||||
|
this.postOptions = response.data.posts;
|
||||||
|
this.roleOptions = response.data.roles;
|
||||||
|
this.$set(this.form, "postIds", response.data.postIds);
|
||||||
|
this.$set(this.form, "roleIds", response.data.roleIds);
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改用户";
|
||||||
|
this.form.password = "";
|
||||||
},
|
},
|
||||||
/** 重置密码按钮操作 */
|
/** 重置密码按钮操作 */
|
||||||
handleResetPwd(row) {
|
handleResetPwd(row) {
|
||||||
|
@ -772,18 +1008,11 @@ export default {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.userId != undefined) {
|
if (this.form.userId != undefined) {
|
||||||
updateUser(this.form).then(response => {
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
addUser(this.form).then(response => {
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
this.open = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -791,18 +1020,12 @@ export default {
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const userIds = row.userId || this.ids;
|
const userIds = row.userId || this.ids;
|
||||||
this.$modal.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?').then(function () {
|
this.$modal.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?').then(function () {
|
||||||
return delUser(userIds);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {
|
})
|
||||||
});
|
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('system/user/export', {
|
this.$modal.msgSuccess("导入成功");
|
||||||
...this.queryParams
|
|
||||||
}, `user_${new Date().getTime()}.xlsx`)
|
|
||||||
},
|
},
|
||||||
/** 导入按钮操作 */
|
/** 导入按钮操作 */
|
||||||
handleImport() {
|
handleImport() {
|
||||||
|
@ -811,7 +1034,7 @@ export default {
|
||||||
},
|
},
|
||||||
/** 下载模板操作 */
|
/** 下载模板操作 */
|
||||||
importTemplate() {
|
importTemplate() {
|
||||||
this.download('system/user/importTemplate', {}, `user_template_${new Date().getTime()}.xlsx`)
|
this.$modal.msgSuccess("下载成功");
|
||||||
},
|
},
|
||||||
// 文件上传中处理
|
// 文件上传中处理
|
||||||
handleFileUploadProgress(event, file, fileList) {
|
handleFileUploadProgress(event, file, fileList) {
|
||||||
|
@ -819,15 +1042,12 @@ export default {
|
||||||
},
|
},
|
||||||
// 文件上传成功处理
|
// 文件上传成功处理
|
||||||
handleFileSuccess(response, file, fileList) {
|
handleFileSuccess(response, file, fileList) {
|
||||||
this.upload.open = false;
|
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>导入成功</div>", "导入结果", {dangerouslyUseHTMLString: true});
|
||||||
this.upload.isUploading = false;
|
|
||||||
this.$refs.upload.clearFiles();
|
|
||||||
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.data.msg + "</div>", "导入结果", {dangerouslyUseHTMLString: true});
|
|
||||||
this.getList();
|
|
||||||
},
|
},
|
||||||
// 提交上传文件
|
// 提交上传文件
|
||||||
submitFileForm() {
|
submitFileForm() {
|
||||||
this.$refs.upload.submit();
|
this.upload.open = false;
|
||||||
|
this.$modal.msgSuccess("导入成功");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -86,11 +86,91 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getUser() {
|
getUser() {
|
||||||
getUserProfile().then(response => {
|
let response = {
|
||||||
this.user = response.data.sysUser;
|
"code": 200,
|
||||||
this.roleGroup = response.data.roleGroup;
|
"msg": "操作成功",
|
||||||
this.postGroup = response.data.postGroup;
|
"data": {
|
||||||
});
|
"sysUser": {
|
||||||
|
"createBy": 1,
|
||||||
|
"createTime": "2023-09-29 11:47:27",
|
||||||
|
"updateBy": null,
|
||||||
|
"updateTime": null,
|
||||||
|
"params": {
|
||||||
|
"@type": "java.util.HashMap"
|
||||||
|
},
|
||||||
|
"userId": 1,
|
||||||
|
"deptId": 103,
|
||||||
|
"userName": "admin",
|
||||||
|
"nickName": "牧鱼",
|
||||||
|
"email": "muyu@163.com",
|
||||||
|
"phonenumber": "15888888888",
|
||||||
|
"sex": "1",
|
||||||
|
"avatar": "",
|
||||||
|
"password": "$2a$10$JLwI8tUw7QMF1PbVlwWXbu86vvVEFz0ntbrSXxZXuA71dHlnSSeJi",
|
||||||
|
"status": "0",
|
||||||
|
"delFlag": "0",
|
||||||
|
"loginIp": "114.95.174.13",
|
||||||
|
"loginDate": "2024-04-11T18:35:00.000+08:00",
|
||||||
|
"dept": {
|
||||||
|
"createBy": null,
|
||||||
|
"createTime": null,
|
||||||
|
"updateBy": null,
|
||||||
|
"updateTime": null,
|
||||||
|
"params": {
|
||||||
|
"@type": "java.util.HashMap"
|
||||||
|
},
|
||||||
|
"deptId": 103,
|
||||||
|
"parentId": 101,
|
||||||
|
"ancestors": "0,100,101",
|
||||||
|
"deptName": "研发部门",
|
||||||
|
"orderNum": 1,
|
||||||
|
"leader": "牧鱼",
|
||||||
|
"phone": null,
|
||||||
|
"email": null,
|
||||||
|
"status": "0",
|
||||||
|
"delFlag": null,
|
||||||
|
"parentName": null,
|
||||||
|
"children": []
|
||||||
|
},
|
||||||
|
"roles": [
|
||||||
|
{
|
||||||
|
"createBy": null,
|
||||||
|
"createTime": null,
|
||||||
|
"updateBy": null,
|
||||||
|
"updateTime": null,
|
||||||
|
"params": {
|
||||||
|
"@type": "java.util.HashMap"
|
||||||
|
},
|
||||||
|
"roleId": 1,
|
||||||
|
"roleName": "超级管理员",
|
||||||
|
"roleKey": "admin",
|
||||||
|
"roleSort": 1,
|
||||||
|
"dataScope": "1",
|
||||||
|
"menuCheckStrictly": false,
|
||||||
|
"deptCheckStrictly": false,
|
||||||
|
"status": "0",
|
||||||
|
"delFlag": null,
|
||||||
|
"flag": false,
|
||||||
|
"menuIds": null,
|
||||||
|
"deptIds": null,
|
||||||
|
"permissions": null,
|
||||||
|
"remark": null,
|
||||||
|
"admin": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"roleIds": null,
|
||||||
|
"postIds": null,
|
||||||
|
"roleId": null,
|
||||||
|
"remark": "管理员",
|
||||||
|
"admin": true
|
||||||
|
},
|
||||||
|
"roleGroup": "超级管理员",
|
||||||
|
"postGroup": "董事长"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.user = response.data.sysUser;
|
||||||
|
this.roleGroup = response.data.roleGroup;
|
||||||
|
this.postGroup = response.data.postGroup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -54,9 +54,7 @@ export default {
|
||||||
submit() {
|
submit() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -133,15 +133,9 @@ export default {
|
||||||
// 上传图片
|
// 上传图片
|
||||||
uploadImg() {
|
uploadImg() {
|
||||||
this.$refs.cropper.getCropBlob(data => {
|
this.$refs.cropper.getCropBlob(data => {
|
||||||
let formData = new FormData();
|
this.$modal.msgSuccess("修改成功");
|
||||||
formData.append("avatarfile", data);
|
this.visible = false;
|
||||||
uploadAvatar(formData).then(response => {
|
this.open = false;
|
||||||
this.open = false;
|
|
||||||
this.options.img = process.env.VUE_APP_BASE_API + response.data.imgUrl;
|
|
||||||
store.commit('SET_AVATAR', this.options.img);
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.visible = false;
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 实时预览
|
// 实时预览
|
||||||
|
|
|
@ -60,11 +60,7 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
submit() {
|
submit() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
this.$modal.msgSuccess("修改成功");
|
||||||
updateUserProfile(this.user).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
|
|
Loading…
Reference in New Issue