From da5a20a781a7654e37b7ee252abd9e781789f790 Mon Sep 17 00:00:00 2001 From: pengm <674192343@qq.com> Date: Tue, 19 Aug 2025 13:11:20 +0800 Subject: [PATCH] 1.完善MES英文翻译 --- src/mes/common/buttonComponent/index.js | 16 ++++++++++------ src/mes/common/commonModelComponent/index.js | 16 ++++++++++------ src/mes/login/index.js | 4 ++-- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/mes/common/buttonComponent/index.js b/src/mes/common/buttonComponent/index.js index ef71f35..725fb5e 100644 --- a/src/mes/common/buttonComponent/index.js +++ b/src/mes/common/buttonComponent/index.js @@ -274,25 +274,29 @@ const ButtonComponent = props => { } else if (e.name === "其它机台日报") { count = table3; } - const workFirst = commonFunc.showLocalMessage(props, 'workFirst!', '请先上班后再操作'); + const workFirst = commonFunc.showLocalMessage(props, 'workFirst', '请先上班后再操作'); + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示'); + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认'); + const NotAllowedBoards = commonFunc.showLocalMessage(props, 'NotAllowedBoards', '当前工序不允许拆合板!'); + return (
{ if (bStartWorkLimit) { Modal.warning({ - title: "温馨提示:", + title: FriendlyReminder, content:
{workFirst}
, - okText: "确认" + okText: BtnSure }); return; } if (bChaihebanLimit) { Modal.warning({ - title: "温馨提示:", - content:
当前工序不允许拆合板!
, - okText: "确认" + title: FriendlyReminder, + content:
{NotAllowedBoards}
, + okText: BtnSure }); return; } diff --git a/src/mes/common/commonModelComponent/index.js b/src/mes/common/commonModelComponent/index.js index e4126d2..72d742d 100644 --- a/src/mes/common/commonModelComponent/index.js +++ b/src/mes/common/commonModelComponent/index.js @@ -1726,16 +1726,20 @@ const CommonTableComponent = props => { const handleTableBtnClick = async item => { const { record, tableData } = item; const { iStar, bOKStartWorking } = record; - + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示'); + const selectStatus = commonFunc.showLocalMessage(props, 'selectStatus', '请选择要变更的状态'); + const finishConstruction = commonFunc.showLocalMessage(props, 'finishConstruction', '完工'); + const pause = commonFunc.showLocalMessage(props, 'pause', '暂停'); + const productionCanotResumed = commonFunc.showLocalMessage(props, 'productionCanotResumed', '存在开工任务,无法恢复生产'); if (iStar === 1) { // 如果只剩一条数据,询问是暂停还是完工 if (tableData.length === 1) { const result = await new Promise(resolve => { Modal.confirm({ - title: "温馨提示:", - content:
请选择要变更的状态
, - okText: "完工", - cancelText: "暂停", + title: FriendlyReminder, + content:
{selectStatus}
, + okText: finishConstruction, + cancelText: pause, onOk() { resolve(true); }, @@ -1756,7 +1760,7 @@ const CommonTableComponent = props => { } else if (iStar === 2 || iStar === 3 || iStar === 4) { // 暂停中,走开工、完工接口 if (bOKStartWorking === 1) { - return message.error("存在开工任务,无法恢复生产", 3); + return message.error(productionCanotResumed, 3); } const dataReturn = await props.handleStartWork(item); const { code, msg } = dataReturn; diff --git a/src/mes/login/index.js b/src/mes/login/index.js index f484ad0..ad57eab 100644 --- a/src/mes/login/index.js +++ b/src/mes/login/index.js @@ -142,8 +142,8 @@ const useLoginEvent = props => { // 新增方法:根据sName过滤configs const getConfigByName = (name, configs, sLanguage) => { const configObj = configs.find(item => item.sName === name); - const showName = sLanguage === 'sChinese' ? configObj.sChinese : sLanguage ==='sEnglish' ? configObj.sEnglish : - sLanguage === 'sBig5' ? configObj.sBig5 : configObj.sChinese; + const showName = sLanguage === 'sChinese' ? configObj?.sChinese : sLanguage ==='sEnglish' ? configObj?.sEnglish : + sLanguage === 'sBig5' ? configObj?.sBig5 : configObj?.sChinese; return showName; }; const sLanguage = commonUtils.isNotEmptyArr(companys) ? companys[0].sLanguage : 'sEnglish'; -- libgit2 0.22.2