diff --git a/src/api/auth.js b/src/api/auth.js index d8b010fd..3e789d2a 100644 --- a/src/api/auth.js +++ b/src/api/auth.js @@ -31,3 +31,38 @@ export function logoutAdminUser () { } }) } + +export function getAuthTime (data) { + return request({ + url: 'auth/get/time', + method: 'post', + data: { + method: 'get.auth.time', + platform: 'admin', + ...data + } + }) +} + +export function getAuthNearTime (data) { + return request({ + url: 'auth/get/nearTime', + method: 'post', + data: { + method: 'get.auth.nearTime', + platform: 'admin', + ...data + } + }) +} + +export function getAuthTimeByUpload (data) { + return request({ + url: 'auth/get/timeByUpload', + method: 'post', + headers: { + 'Content-Type': 'multipart/form-data' + }, + data + }) +} diff --git a/src/api/system-administration/user.js b/src/api/system-administration/user.js index 855fcb6e..e5d10881 100644 --- a/src/api/system-administration/user.js +++ b/src/api/system-administration/user.js @@ -97,3 +97,15 @@ export function resetUserPwd (data) { } }) } + +export function updateUserPwd (data) { + return request({ + url: BASE + 'update_pwd', + method: 'put', + data: { + method: 'system_settings_user_management_user_update_pwd', + platform: 'background', + ...data + } + }) +} diff --git a/src/layout/header-aside/components/header-user/index.vue b/src/layout/header-aside/components/header-user/index.vue index 6fdf37ee..75cb8f76 100644 --- a/src/layout/header-aside/components/header-user/index.vue +++ b/src/layout/header-aside/components/header-user/index.vue @@ -1,31 +1,295 @@ - {{info.name ? $t('page.layout.user.greeting', { name: info.name }) : $t('page.layout.user.not_logged_in')}} + + {{ info.name ? $t('page.layout.user.greeting', { name: info.name }) : $t('page.layout.user.not_logged_in') }} + - - + + {{ $t('page.layout.user.api_debug') }} + + + {{ $t('page.layout.user.change_password') }} + + + {{ $t('page.layout.user.reload_menu') }} + + + {{ $t('page.layout.user.product_authorization') }} + + + {{ $t('page.layout.user.logout') }} + + + + + + + + + + + + + + + {{ $t('page.layout.user.cancel') }} + + {{ $t('page.layout.user.confirm') }} + + + + + + + + {{ authTime || '-' }} + + + + + + {{ $t('page.layout.user.drag_upload_hint') }}{{ $t('page.layout.user.click_upload') }} + + {{ $t('page.layout.user.upload_file_tip') }} + + + + diff --git a/src/locales/en.json b/src/locales/en.json index 13dd698c..036e8420 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -2685,7 +2685,36 @@ "user": { "greeting": "Hello {name}", "not_logged_in": "Not logged in", - "logout": "Logout" + "logout": "Logout", + "api_debug": "API Debug", + "change_password": "Change Password", + "reload_menu": "Reload Menu", + "product_authorization": "Product Authorization", + "original_password": "Old Password", + "new_password": "New Password", + "confirm_password": "Confirm Password", + "placeholder_original_password": "Please enter old password", + "placeholder_new_password": "Please enter new password", + "placeholder_confirm_password": "Please confirm new password", + "old_password_required": "Please enter old password", + "new_password_required": "Please enter new password", + "confirm_password_required": "Please confirm new password", + "length_6_to_64": "Length should be 6 to 64 characters", + "password_same_error": "Old password cannot be the same as new password", + "password_not_match": "The two new passwords do not match", + "password_change_success": "Password changed successfully. Please log in again", + "menu_permission_reloaded": "Menu permissions reloaded", + "authorization_validity_period": "Authorization Validity", + "drag_upload_hint": "Drop the license file here, or ", + "click_upload": "click to upload", + "upload_file_tip": "Only .license authorization files are allowed", + "please_upload_license": "Please upload a license file", + "authorization_update_success": "Authorization validity updated: {time}", + "authorization_expired_message": "Product authorization time: {time}. Authorization has expired and APIs will be unavailable. Please verify the license again.", + "authorization_near_message": "Product authorization is about to expire. APIs will be unavailable after expiration. {message}", + "prompt": "Prompt", + "cancel": "Cancel", + "confirm": "Confirm" }, "fullscreen": { "enter": "Fullscreen", diff --git a/src/locales/zh-chs.json b/src/locales/zh-chs.json index 52ad9f57..7ecf17d1 100644 --- a/src/locales/zh-chs.json +++ b/src/locales/zh-chs.json @@ -2685,7 +2685,36 @@ "user": { "greeting": "你好 {name}", "not_logged_in": "未登录", - "logout": "注销" + "logout": "注销", + "api_debug": "API调试", + "change_password": "修改密码", + "reload_menu": "重新加载菜单", + "product_authorization": "产品授权", + "original_password": "原密码", + "new_password": "新密码", + "confirm_password": "确认密码", + "placeholder_original_password": "请输入原密码", + "placeholder_new_password": "请输入新密码", + "placeholder_confirm_password": "请输入确认密码", + "old_password_required": "请输入原密码", + "new_password_required": "请输入新密码", + "confirm_password_required": "请输入确认密码", + "length_6_to_64": "长度在 6 到 64 个字符", + "password_same_error": "原密码不能与新密码相同", + "password_not_match": "两次输入的新密码不一致", + "password_change_success": "密码修改成功,请重新登录", + "menu_permission_reloaded": "菜单权限已重新载入", + "authorization_validity_period": "授权有效期", + "drag_upload_hint": "将 license 文件拖到此处,或", + "click_upload": "点击上传", + "upload_file_tip": "只能上传 .license 授权文件", + "please_upload_license": "请上传 license 文件", + "authorization_update_success": "授权有效期更新成功:{time}", + "authorization_expired_message": "产品授权时间:{time},授权已过期,接口将无法使用。请重新验证授权序列号!", + "authorization_near_message": "产品授权即将到期,授权过期时,数据接口将无法使用。{message}", + "prompt": "提示", + "cancel": "取消", + "confirm": "确定" }, "fullscreen": { "enter": "全屏",