diff --git a/backend/src/main/java/io/metersphere/controller/UserController.java b/backend/src/main/java/io/metersphere/controller/UserController.java
index 5c360df25a..55324f028e 100644
--- a/backend/src/main/java/io/metersphere/controller/UserController.java
+++ b/backend/src/main/java/io/metersphere/controller/UserController.java
@@ -125,10 +125,9 @@ public class UserController {
@PostMapping("/update/current")
public UserDTO updateCurrentUser(@RequestBody User user) {
- UserDTO userDTO = userService.getUserDTO(user.getId());
- BeanUtils.copyProperties(user, userDTO);
- SessionUtils.putUser(SessionUser.fromUser(userDTO));
userService.updateUser(user);
+ UserDTO userDTO = userService.getUserDTO(user.getId());
+ SessionUtils.putUser(SessionUser.fromUser(userDTO));
return SessionUtils.getUser();
}
diff --git a/frontend/src/business/App.vue b/frontend/src/business/App.vue
index 94e874b616..2864957589 100644
--- a/frontend/src/business/App.vue
+++ b/frontend/src/business/App.vue
@@ -7,7 +7,15 @@
-
+
+
+
+
+
+
+
+
+
@@ -20,6 +28,8 @@
import MsTopMenus from "./components/common/head/HeaderTopMenus";
import MsView from "./components/common/router/View";
import MsUser from "./components/common/head/HeaderUser";
+ import MsHeaderOrgWs from "./components/common/head/HeaderOrgWs";
+ import MsLanguageSwitch from "./components/common/head/LanguageSwitch";
export default {
name: 'app',
@@ -40,7 +50,7 @@
window.location.href = "/login"
});
},
- components: {MsUser, MsView, MsTopMenus},
+ components: {MsLanguageSwitch, MsUser, MsView, MsTopMenus, MsHeaderOrgWs},
methods: {}
}
diff --git a/frontend/src/business/components/common/head/HeaderOrgWs.vue b/frontend/src/business/components/common/head/HeaderOrgWs.vue
new file mode 100644
index 0000000000..e3386aaf63
--- /dev/null
+++ b/frontend/src/business/components/common/head/HeaderOrgWs.vue
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+
diff --git a/frontend/src/business/components/common/head/HeaderUser.vue b/frontend/src/business/components/common/head/HeaderUser.vue
index 2fa6b44723..9eb7096b2b 100644
--- a/frontend/src/business/components/common/head/HeaderUser.vue
+++ b/frontend/src/business/components/common/head/HeaderUser.vue
@@ -1,79 +1,23 @@
-
-
-
-
-
-
-
- {{currentUser.name}}
-
-
-
- {{$t('commons.personal_information')}}
- {{$t('commons.exit_system')}}
-
-
-
-
-
+
+
+ {{currentUser.name}}
+
+
+
+ {{$t('commons.personal_information')}}
+ {{$t('commons.exit_system')}}
+
+
+
+
+
diff --git a/frontend/src/common/css/menu-header.css b/frontend/src/common/css/menu-header.css
index c054b76307..7277b56b88 100644
--- a/frontend/src/common/css/menu-header.css
+++ b/frontend/src/common/css/menu-header.css
@@ -32,3 +32,7 @@
.header-top-menus.el-menu--horizontal > li.is-active {
background: #595591 !important;
}
+
+.el-menu.el-menu--horizontal {
+ border-bottom: none;
+ }
diff --git a/frontend/src/common/js/constants.js b/frontend/src/common/js/constants.js
index fb2807a1a6..56d4dbd7df 100644
--- a/frontend/src/common/js/constants.js
+++ b/frontend/src/common/js/constants.js
@@ -13,3 +13,7 @@ export const REFRESH_SESSION_USER_URL = 'user/refresh';
export const WORKSPACE = 'workspace';
export const ORGANIZATION = 'organization';
export const DEFAULT = 'default';
+
+export const ZH_CN = 'zh_CN';
+export const ZH_TW = 'zh_TW';
+export const EN_US = 'en_US';
diff --git a/frontend/src/login/Login.vue b/frontend/src/login/Login.vue
index 83c8b81998..2200679edc 100644
--- a/frontend/src/login/Login.vue
+++ b/frontend/src/login/Login.vue
@@ -104,8 +104,13 @@
submit(form) {
this.$refs[form].validate((valid) => {
if (valid) {
- this.$post("signin", this.form, (response) => {
+ this.$post("signin", this.form, response => {
saveLocalStorage(response);
+ let language = response.data.language;
+ if (!language) {
+ language = 'zh_CN';
+ }
+ this.$setLang(language);
window.location.href = "/"
});
} else {