From 4d04fb397bf82ed53a885cc23d9e4a7ebae730fa Mon Sep 17 00:00:00 2001 From: zhangzhen <525765282@qq.com> Date: Fri, 19 Sep 2025 11:08:05 +0800 Subject: [PATCH] 处理英文版本快捷方式跳转问题; --- src/mes/productionExec/quickSwitchTabComponent/index.js | 50 +++++++++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/src/mes/productionExec/quickSwitchTabComponent/index.js b/src/mes/productionExec/quickSwitchTabComponent/index.js index 64cf822..930bd90 100644 --- a/src/mes/productionExec/quickSwitchTabComponent/index.js +++ b/src/mes/productionExec/quickSwitchTabComponent/index.js @@ -72,28 +72,31 @@ const QuickSwitchTabComponent = baseProps => { "", "12710101117087404588200" ]; + + // 定义多语言映射 + const translations = { + sEnglish: { + "生产执行": "Production Execution", + "质量巡检": "Quality Inspection", + "拼版图": "Assembly Drawing", + "产品图": "Product Drawing", + "报工任务": "Work Reporting ïTask", + "班组报工": "Team Production Reporting" + }, + sBig5: { + "生产执行": "生產執行", + "质量巡检": "質量巡檢", + "拼版图": "拼版圖", + "产品图": "產品圖", + "报工任务": "報工任務", + "班组报工": "班組報工", + } + }; + function translateList(language) { // 原始中文列表 const list = ["生产执行", "质量巡检", "拼版图", "产品图", "报工任务"]; - // 定义多语言映射 - const translations = { - sEnglish: { - "生产执行": "Production Execution", - "质量巡检": "Quality Inspection", - "拼版图": "Assembly Drawing", - "产品图": "Product Drawing", - "报工任务": "Work Reporting Task" - }, - sBig5: { - "生产执行": "生產執行", - "质量巡检": "質量巡檢", - "拼版图": "拼版圖", - "产品图": "產品圖", - "报工任务": "報工任務" - } - }; - // 根据语言设置进行转换 if (translations[language]) { return list.map(item => translations[language][item] || item); @@ -132,8 +135,8 @@ const QuickSwitchTabComponent = baseProps => { return list; } const sLanguage = props.app.userinfo.sLanguage || 'sChinese'; - list = translateList(sLanguage); - const tipList = translateTipList(sLanguage); + list = translateList(sLanguage); + const tipList = translateTipList(sLanguage); const no = commonFunc.showLocalMessage(props, 'No', '暂无'); return (