From 1a39c1d3f0c34c514c8a1a72787a9ae58dad5d64 Mon Sep 17 00:00:00 2001 From: PZ688 Date: Fri, 28 Feb 2025 17:54:01 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=E8=B4=A6=E5=8F=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/user/component/changePassword.vue | 21 +- .../views/system/user/component/editUser.vue | 196 +++++++++--------- .../views/system/user/component/orgTree.vue | 4 +- .../system/user/component/userCenter.vue | 118 ++++++----- Web/src/views/system/user/index.vue | 156 ++++++++------ 5 files changed, 275 insertions(+), 220 deletions(-) diff --git a/Web/src/views/system/user/component/changePassword.vue b/Web/src/views/system/user/component/changePassword.vue index 9618c5f8..3a5df03e 100644 --- a/Web/src/views/system/user/component/changePassword.vue +++ b/Web/src/views/system/user/component/changePassword.vue @@ -4,27 +4,27 @@
- 密码安全策略:必须包含大小写字母、数字和特殊字符的组合,长度在6-16之间。 + {{ t('message.list.passwordPolicy') }}
- + - + - + @@ -32,8 +32,8 @@ @@ -48,6 +48,9 @@ import { sm2 } from 'sm-crypto-v2'; import { clearAccessTokens, getAPI } from '/@/utils/axios-utils'; import { SysUserApi } from '/@/api-services/api'; import { ChangePwdInput } from '/@/api-services/models'; +import { useI18n } from 'vue-i18n'; + +const { t } = useI18n(); const ruleFormRef = ref(); const state = reactive({ @@ -79,7 +82,7 @@ const submit = () => { cpwd.passwordNew = sm2.doEncrypt(state.ruleForm.passwordNew, publicKey, 1); await getAPI(SysUserApi).apiSysUserChangePwdPost(cpwd); - ElMessage.success('密码已修改,请重新登录系统!'); + ElMessage.success(t('message.list.passwordChangedNeedRelogin')); state.isShowDialog = false; clearAccessTokens(); }); @@ -88,7 +91,7 @@ const submit = () => { // 密码验证 const validatePassword = (_rule: any, value: any, callback: any) => { if (state.passwordNew2 != state.ruleForm.passwordNew) { - callback(new Error('两次密码不一致!')); + callback(new Error(t('message.list.passwordNotMatch'))); } else { callback(); } diff --git a/Web/src/views/system/user/component/editUser.vue b/Web/src/views/system/user/component/editUser.vue index 1256bab8..98d3e334 100644 --- a/Web/src/views/system/user/component/editUser.vue +++ b/Web/src/views/system/user/component/editUser.vue @@ -8,59 +8,59 @@ - + - - + + - - + + - - + + - - + + - - - - - + + + + + - - + + - - + + - - + + -
机构组织
+
{{ $t('message.list.orgStructure') }}
- - + +