diff --git a/src/pages/.bk.development.env b/src/pages/.bk.development.env index b97e97cec..1c5b15b14 100644 --- a/src/pages/.bk.development.env +++ b/src/pages/.bk.development.env @@ -15,3 +15,7 @@ BK_STATIC_URL = '' BK_AJAX_BASE_URL = '' BK_CSRF_COOKIE_NAME = '' + +BK_COMPONENT_API_URL = '' + +BK_DOMAIN = '' \ No newline at end of file diff --git a/src/pages/.bk.production.env b/src/pages/.bk.production.env index 8bb66147c..5fab2a832 100644 --- a/src/pages/.bk.production.env +++ b/src/pages/.bk.production.env @@ -9,3 +9,7 @@ BK_STATIC_URL = '{{ BK_STATIC_URL }}' BK_AJAX_BASE_URL = '{{ AJAX_BASE_URL }}' BK_CSRF_COOKIE_NAME = '{{ CSRF_COOKIE_NAME }}' + +BK_COMPONENT_API_URL = '{{ BK_COMPONENT_API_URL }}' + +BK_DOMAIN = '{{ BK_DOMAIN }}' diff --git a/src/pages/index.html b/src/pages/index.html index 338b7684f..4b738a04c 100644 --- a/src/pages/index.html +++ b/src/pages/index.html @@ -16,6 +16,8 @@ // 静态资源路径 window.BK_STATIC_URL = '<%= process.env.BK_STATIC_URL %>'; window.CSRF_COOKIE_NAME = '<%= process.env.BK_CSRF_COOKIE_NAME %>'; + window.BK_COMPONENT_API_URL = '<%= process.env.BK_COMPONENT_API_URL %>'; + window.BK_DOMAIN = '<%= process.env.BK_DOMAIN %>'; diff --git a/src/pages/package.json b/src/pages/package.json index fb006948c..0bb70cb48 100644 --- a/src/pages/package.json +++ b/src/pages/package.json @@ -46,6 +46,7 @@ "sortablejs": "^1.15.0", "vite-plugin-monaco-editor": "^1.1.0", "vue": "^3.2.41", + "vue-i18n": "^9.9.0", "vue-router": "^4.1.6" }, "devDependencies": { diff --git a/src/pages/src/app.vue b/src/pages/src/app.vue index 93c166539..178f6d933 100644 --- a/src/pages/src/app.vue +++ b/src/pages/src/app.vue @@ -7,6 +7,7 @@ import { import HeaderBox from './views/Header.vue'; import { currentUser } from '@/http/api'; +import { t } from '@/language/index'; import { useUser } from '@/store/user'; // 加载完用户数据才会展示页面 @@ -20,7 +21,7 @@ currentUser() isLoading.value = false; }) .catch(() => { - Message('获取用户信息失败,请检查后再试'); + Message(t('获取用户信息失败,请检查后再试')); isLoading.value = false; }); diff --git a/src/pages/src/components/ChangePassword.vue b/src/pages/src/components/ChangePassword.vue index d52c4f9d6..4a800b6de 100644 --- a/src/pages/src/components/ChangePassword.vue +++ b/src/pages/src/components/ChangePassword.vue @@ -11,22 +11,26 @@ > - - + + - - + + - - -

两次输入的密码不一致,请重新输入

+ + +

{{ $t('两次输入的密码不一致,请重新输入') }}

@@ -36,7 +40,9 @@ import { Message } from 'bkui-vue'; import { reactive, ref, watch } from 'vue'; +import { logout } from '@/common/auth'; import { putPersonalCenterUserPassword } from '@/http/personalCenterFiles'; +import { t } from '@/language/index'; const emit = defineEmits(['closed']); const props = defineProps({ @@ -81,7 +87,8 @@ const confirm = async () => { new_password: formData.newPassword, }); emit('closed'); - Message({ theme: 'success', message: '修改密码成功' }); + Message({ theme: 'success', message: t('修改密码成功') }); + logout(); } catch (e) { console.warn(e); } finally { diff --git a/src/pages/src/components/Empty.vue b/src/pages/src/components/Empty.vue index 3482002c2..f1a71958d 100644 --- a/src/pages/src/components/Empty.vue +++ b/src/pages/src/components/Empty.vue @@ -1,24 +1,24 @@ diff --git a/src/pages/src/components/ResetPassword.vue b/src/pages/src/components/ResetPassword.vue index 59fd7057f..afbf896b5 100644 --- a/src/pages/src/components/ResetPassword.vue +++ b/src/pages/src/components/ResetPassword.vue @@ -14,10 +14,10 @@ ref="formRef" :model="formData" :rules="rules"> - +
- - 随机生成 + + {{ $t('随机生成') }}
@@ -30,6 +30,7 @@ import { reactive, ref, watch } from 'vue'; import useValidate from '@/hooks/use-validate'; import { putUsersPassword, randomPasswords } from '@/http/dataSourceFiles'; +import { t } from '@/language/index'; const validate = useValidate(); const emit = defineEmits(['closed', 'changePassword']); @@ -78,7 +79,7 @@ const confirm = async () => { password: formData.password, }); emit('changePassword'); - Message({ theme: 'success', message: '重置密码成功' }); + Message({ theme: 'success', message: t('重置密码成功') }); } catch (e) { isLoading.value = false; } finally { diff --git a/src/pages/src/components/custom-fields/view.vue b/src/pages/src/components/custom-fields/view.vue index 79d10bde9..8cbea188f 100644 --- a/src/pages/src/components/custom-fields/view.vue +++ b/src/pages/src/components/custom-fields/view.vue @@ -4,7 +4,7 @@ class="details-content-item" v-for="(item, index) in extras" :key="index"> - {{ item.display_name }}: + {{ item.display_name }}: {{ customFieldsMap(item) }} diff --git a/src/pages/src/components/field-mapping/FieldMapping.vue b/src/pages/src/components/field-mapping/FieldMapping.vue index eaec9f146..9fb108802 100644 --- a/src/pages/src/components/field-mapping/FieldMapping.vue +++ b/src/pages/src/components/field-mapping/FieldMapping.vue @@ -2,9 +2,9 @@
- - - + + +
@@ -90,7 +90,7 @@
- 新增字段映射 + {{ $t('新增字段映射') }}
@@ -98,6 +98,8 @@ diff --git a/src/pages/src/components/notify-editor/NotifyEditor.less b/src/pages/src/components/notify-editor/NotifyEditor.less index bb0bda9a7..d12881b71 100644 --- a/src/pages/src/components/notify-editor/NotifyEditor.less +++ b/src/pages/src/components/notify-editor/NotifyEditor.less @@ -2,6 +2,7 @@ .password-header { display: flex; line-height: 50px; + justify-content: space-between; .bk-checkbox-group { display: flex; @@ -23,15 +24,8 @@ } } - .checkbox-zh { - width: 85% !important; - } - - .checkbox-en { - width: 75% !important; - } - .edit-info { + margin-right: 20px; color: #3A84FF; :hover { @@ -45,6 +39,7 @@ .password-header { display: flex; border-bottom: 1px solid #dcdee5; + justify-content: space-between; .active-tab { border-bottom: 2px solid #3A84FF; diff --git a/src/pages/src/components/notify-editor/NotifyEditorTemplate.vue b/src/pages/src/components/notify-editor/NotifyEditorTemplate.vue index 657913b0f..876d1a5e7 100644 --- a/src/pages/src/components/notify-editor/NotifyEditorTemplate.vue +++ b/src/pages/src/components/notify-editor/NotifyEditorTemplate.vue @@ -8,21 +8,21 @@ data-test-id="list_emailInfo">