diff --git a/backend/src/main/java/io/metersphere/controller/UserController.java b/backend/src/main/java/io/metersphere/controller/UserController.java index a6ba0788f4..97ea6aa166 100644 --- a/backend/src/main/java/io/metersphere/controller/UserController.java +++ b/backend/src/main/java/io/metersphere/controller/UserController.java @@ -13,7 +13,9 @@ import io.metersphere.controller.request.organization.QueryOrgMemberRequest; import io.metersphere.dto.UserDTO; import io.metersphere.dto.UserRoleDTO; import io.metersphere.service.UserService; +import io.metersphere.user.SessionUser; import io.metersphere.user.SessionUtils; +import org.springframework.beans.BeanUtils; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.util.List; @@ -51,6 +53,17 @@ public class UserController { userService.updateUser(user); } + /** + * 修改登录用户信息 + */ + @PostMapping("/update/currentuser") + public UserDTO updateCurrentUser(@RequestBody User user) { + SessionUser sessionUser = SessionUtils.getUser(); + BeanUtils.copyProperties(user, sessionUser); + userService.updateUser(user); + return SessionUtils.getUser(); + } + @GetMapping("/role/list/{userId}") public List getUserRolesList(@PathVariable(value = "userId") String userId) { return userService.getUserRolesList(userId); diff --git a/frontend/src/performance/components/router/router.js b/frontend/src/performance/components/router/router.js index 80d57dee8b..259d936a3f 100644 --- a/frontend/src/performance/components/router/router.js +++ b/frontend/src/performance/components/router/router.js @@ -12,6 +12,7 @@ import Member from "../settings/Member"; import TestResourcePool from "../settings/TestResourcePool"; import MsProject from "../project/MsProject"; import OrganizationWorkspace from "../settings/OrganizationWorkspace"; +import PersonSetting from "../settings/PersonSetting"; Vue.use(VueRouter); @@ -58,6 +59,10 @@ const router = new VueRouter({ path: 'organizationworkspace', component: OrganizationWorkspace, }, + { + path: 'personsetting', + component: PersonSetting + }, { path: 'member', component: Member diff --git a/frontend/src/performance/components/settings/PersonSetting.vue b/frontend/src/performance/components/settings/PersonSetting.vue new file mode 100644 index 0000000000..6115744b3c --- /dev/null +++ b/frontend/src/performance/components/settings/PersonSetting.vue @@ -0,0 +1,143 @@ + + + + + diff --git a/frontend/src/performance/components/settings/SettingMenu.vue b/frontend/src/performance/components/settings/SettingMenu.vue index ba126256a9..b390c93bca 100644 --- a/frontend/src/performance/components/settings/SettingMenu.vue +++ b/frontend/src/performance/components/settings/SettingMenu.vue @@ -33,7 +33,7 @@ 个人 - 个人设置 + 个人设置