diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue
index 03c6a12..7f31fc7 100644
--- a/src/components/Breadcrumb/index.vue
+++ b/src/components/Breadcrumb/index.vue
@@ -2,8 +2,8 @@
- {{ $t('menu.'+item.meta.title) }}
- {{ $t('menu.'+item.meta.title) }}
+ {{ getMenuName(item.meta.title) }}
+ {{ getMenuName(item.meta.title) }}
diff --git a/src/lang/en.js b/src/lang/en.js
index 095af12..82265ef 100644
--- a/src/lang/en.js
+++ b/src/lang/en.js
@@ -85,7 +85,7 @@ export default {
name: 'name',
namePlaceholder: 'namePlaceholder',
status: 'status',
- statusAll: 'statusAll',
+ statusAll: 'All',
statusVisible: 'visible',
statusHide: 'hide',
diff --git a/src/lang/zh.js b/src/lang/zh.js
index 9282471..fd4bcd1 100644
--- a/src/lang/zh.js
+++ b/src/lang/zh.js
@@ -107,8 +107,6 @@ export default {
addMenu: '添加菜单',
modifyMenu: '修改菜单',
- addMent: '添加菜单',
- addMent: '添加菜单',
root: '主类目',
diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue
index e13ebbb..fd3cc0e 100644
--- a/src/layout/components/Sidebar/SidebarItem.vue
+++ b/src/layout/components/Sidebar/SidebarItem.vue
@@ -3,14 +3,14 @@
-
+
-
+
- {{ $t('menu.'+tag.title) }}
+ {{ getMenuName(tag.title) }}
diff --git a/src/main.js b/src/main.js
index 39bc9b9..073c4bf 100644
--- a/src/main.js
+++ b/src/main.js
@@ -26,6 +26,7 @@ import {
selectDictLabels,
handleTree
} from '@/utils/ruoyi'
+import { getMenuName } from '@/utils/menu'
// 分页组件
import Pagination from '@/components/Pagination'
// 自定义表格工具组件
@@ -53,6 +54,7 @@ Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.download = download
Vue.prototype.handleTree = handleTree
+Vue.prototype.getMenuName = getMenuName
// 全局组件挂载
Vue.component('DictTag', DictTag)
diff --git a/src/utils/menu.js b/src/utils/menu.js
new file mode 100644
index 0000000..360eae4
--- /dev/null
+++ b/src/utils/menu.js
@@ -0,0 +1,44 @@
+// 菜单语言适配
+let menuObj = {
+ 个人中心: 'PersonalCenter',
+ 工作台: 'Workbench',
+
+ 试验管理: 'TrialManage',
+
+ 表单管理: 'FormManage',
+ 非试验表单: 'NonTrialForm',
+ 麻精药表单: 'DrugForm',
+
+ 资源库管理: 'ResourceManage',
+ 试剂管理: 'ReagentManage',
+ 供试品管理: 'SpecimenManage',
+ 给药制剂管理: 'DosageManage',
+ 麻精药管理: 'DrugManage',
+ 钥匙管理: 'KeyManage',
+ 仪器管理: 'InstrumentManage',
+
+ 档案管理: 'ArchiveManage',
+ 试验档案管理: 'TrialArchiveManage',
+ 非试验档案管理: 'NonTrialArchiveManage',
+ 麻精药配置档案管理: 'DrugConfigArchiveManage',
+ 供试品档案管理: 'SpecimenArchiveManage',
+ 给药制剂档案管理: 'DosageArchiveManage',
+ 麻精药档案管理: 'DrugArchiveManage',
+ 试剂档案管理: 'ReagentArchiveManage',
+ 档案记录: 'ArchiveRecord',
+
+ 系统管理: 'SystemManage',
+ 菜单管理: 'MenuManage',
+ 角色管理: 'RoleManage',
+ 用户管理: 'UserManage',
+ '部门/学科管理': 'DeptManage',
+ 模板管理: 'TemplateManage',
+ 字典管理: 'DictManage',
+ 日志管理: 'LogManage'
+}
+export function getMenuName(menuName) {
+ if (!this.$i18n.locale || this.$i18n.locale === 'zh_CN') {
+ return menuName
+ }
+ return menuObj[menuName]
+}