diff --git a/src/mes/common/buttonComponent/index.js b/src/mes/common/buttonComponent/index.js index 86a9acc..a6373a2 100644 --- a/src/mes/common/buttonComponent/index.js +++ b/src/mes/common/buttonComponent/index.js @@ -278,7 +278,7 @@ const ButtonComponent = props => { } }); - console.log(',enulist', menuList); + diff --git a/src/mes/productionExec/quickSwitchTabComponent/index.js b/src/mes/productionExec/quickSwitchTabComponent/index.js index 8f79b6c..64cf822 100644 --- a/src/mes/productionExec/quickSwitchTabComponent/index.js +++ b/src/mes/productionExec/quickSwitchTabComponent/index.js @@ -101,21 +101,54 @@ const QuickSwitchTabComponent = baseProps => { // 默认返回原始列表 return list; } + + function translateTipList(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); + } + // 默认返回原始列表 + return list; + } const sLanguage = props.app.userinfo.sLanguage || 'sChinese'; - list = translateList(sLanguage); + list = translateList(sLanguage); + const tipList = translateTipList(sLanguage); const no = commonFunc.showLocalMessage(props, 'No', '暂无'); return ( -
+
{list.map((title, index) => { const currentId = listId[index]; const currentMesPane = commonUtils.convertStrToObj( localStorage.xlybusinesscurrentMesPane ); const { sModelsId } = currentMesPane; + const tip = tipList[index]; return (
{ if (currentId) { props.onChangeRouter({ diff --git a/src/mes/productionExec/quickSwitchTabComponent/index.less b/src/mes/productionExec/quickSwitchTabComponent/index.less index 363391b..7b6c430 100644 --- a/src/mes/productionExec/quickSwitchTabComponent/index.less +++ b/src/mes/productionExec/quickSwitchTabComponent/index.less @@ -33,4 +33,38 @@ background: #D2E5FF; color: #1890FF; } -} \ No newline at end of file +} + +.quickSwitchTabEngComponent{ + z-index: 20; + position: absolute; + top: 0; + right: -10px; + .size(60px, auto); + .flex(); + flex-direction: column; + gap: 10px; + + >div { + .size(100%, 92px); + .flex(center, center); + overflow: hidden; + padding: 0 5px 0 9px; + font-size: 12px; + font-weight: bold; + line-height: 22px; + background: #FFFFFF; + box-shadow: -4px 4px 4px 0px rgba(0, 0, 0, 0.1); + border-radius: 10px 0px 0px 10px; + cursor: default; + + &:hover { + color: #1890FF; + } + } + + .active { + background: #D2E5FF; + color: #1890FF; + } +}