diff --git a/healthlink-his-ui/src/i18n/index.js b/healthlink-his-ui/src/i18n/index.js index 9e40a45b6..e0b490659 100644 --- a/healthlink-his-ui/src/i18n/index.js +++ b/healthlink-his-ui/src/i18n/index.js @@ -10,20 +10,16 @@ const messages = { // Lazy load locale messages const loadLocaleMessages = async () => { - const localeFiles = import.meta.glob('./locales/*.json', { eager: true }) + const localeFiles = import.meta.glob('./locales/{zhCN,enUS,viVN}.json', { eager: true }) + const localeMap = { + 'zhCN': 'zh-CN', + 'enUS': 'en', + 'viVN': 'vi' + } for (const path in localeFiles) { const localeName = path.match(/\.\/locales\/(.+)\.json$/)?.[1] - if (!localeName) continue - - let isoCode - if (localeName === 'zhCN') isoCode = 'zh-CN' - else if (localeName === 'enUS') isoCode = 'en' - else if (localeName === 'viVN') isoCode = 'vi' - else { - isoCode = localeName.replace(/([A-Z])/g, '-$1').toLowerCase() - } - - if (!messages[isoCode]) messages[isoCode] = {} + const isoCode = localeMap[localeName] + if (!isoCode) continue messages[isoCode] = { ...messages[isoCode], ...localeFiles[path].default } } } diff --git a/healthlink-his-ui/src/store/index.js b/healthlink-his-ui/src/store/index.js index f10f38950..2e68d2072 100755 --- a/healthlink-his-ui/src/store/index.js +++ b/healthlink-his-ui/src/store/index.js @@ -1,3 +1,4 @@ +import { createPinia } from 'pinia' const store = createPinia() export default store \ No newline at end of file diff --git a/healthlink-his-ui/src/views/basicmanage/bedspace/index.vue b/healthlink-his-ui/src/views/basicmanage/bedspace/index.vue index b603732de..c40441bd1 100755 --- a/healthlink-his-ui/src/views/basicmanage/bedspace/index.vue +++ b/healthlink-his-ui/src/views/basicmanage/bedspace/index.vue @@ -3,13 +3,13 @@ @@ -18,34 +18,34 @@ :model="queryParams" label-width="80px" > - + - + @@ -56,13 +56,13 @@ icon="Search" @click="handleQuery" > - 搜索 + {{ $t('common.search') }} - 重置 + {{ $t('common.reset') }} @@ -74,32 +74,32 @@ > @@ -108,13 +108,13 @@ :type="row.bedType === 2 ? 'danger' : row.bedType === 3 ? 'warning' : 'info'" size="small" > - {{ { 1: '普通', 2: 'ICU', 3: '急诊' }[row.bedType] || '普通' }} + {{ { 1: $t('basic.bedspace.typeNormal'), 2: 'ICU', 3: $t('basic.bedspace.typeEmergency') }[row.bedType] || $t('basic.bedspace.typeNormal') }} @@ -128,7 +128,7 @@ @@ -139,7 +139,7 @@ icon="Edit" @click="handleEdit(row)" > - 编辑 + {{ $t('common.edit') }} - 占用 + {{ $t('basic.bedspace.statusOccupied') }} - 清洁 + {{ $t('basic.bedspace.statusClean') }} - 空闲 + {{ $t('basic.bedspace.statusFree') }} - 维修 + {{ $t('basic.bedspace.statusRepair') }} - 删除 + {{ $t('common.delete') }} @@ -205,50 +205,50 @@ label-width="80px" > - + - + - + - + - + diff --git a/healthlink-his-ui/src/views/basicmanage/customer/index.vue b/healthlink-his-ui/src/views/basicmanage/customer/index.vue index cd49fb19a..c6a146ff4 100755 --- a/healthlink-his-ui/src/views/basicmanage/customer/index.vue +++ b/healthlink-his-ui/src/views/basicmanage/customer/index.vue @@ -2,16 +2,16 @@
- + @@ -22,14 +22,14 @@ icon="Search" @click="handleQuery" > - 搜索 + {{ $t('common.search') }} - 新增 + {{ $t('common.add') }} @@ -40,29 +40,29 @@ > @@ -88,13 +88,15 @@ diff --git a/healthlink-his-ui/src/views/basicmanage/fee/index.vue b/healthlink-his-ui/src/views/basicmanage/fee/index.vue index 3ebeb4a80..e46a43b76 100755 --- a/healthlink-his-ui/src/views/basicmanage/fee/index.vue +++ b/healthlink-his-ui/src/views/basicmanage/fee/index.vue @@ -186,20 +186,22 @@
- diff --git a/healthlink-his-ui/src/views/maintainSystem/checkprojectSettings/components/PackageSettings.vue b/healthlink-his-ui/src/views/maintainSystem/checkprojectSettings/components/PackageSettings.vue index 4384bae4a..bc9b4cc9e 100755 --- a/healthlink-his-ui/src/views/maintainSystem/checkprojectSettings/components/PackageSettings.vue +++ b/healthlink-his-ui/src/views/maintainSystem/checkprojectSettings/components/PackageSettings.vue @@ -6,7 +6,7 @@ type="primary" @click="handlePackageManagement" > - 套餐管理 + {{ $t('maintain.checkProject.packageSettings.btn.packageManagement') }} - 刷新 + {{ $t('maintain.checkProject.packageSettings.btn.refresh') }} - 保存 + {{ $t('maintain.checkProject.packageSettings.btn.save') }}

- 基本信息 + {{ $t('maintain.checkProject.packageSettings.section.basicInfo') }}

@@ -69,12 +69,12 @@ :lg="6" > @@ -124,12 +124,12 @@ :lg="6" > @@ -148,12 +148,12 @@ :lg="6" > @@ -165,10 +165,10 @@ :md="8" :lg="6" > - + @@ -188,11 +188,11 @@ :md="8" :lg="6" > - +