Commit da5a20a781a7654e37b7ee252abd9e781789f790

Authored by Min
1 parent a41bfe08

1.完善MES英文翻译

src/mes/common/buttonComponent/index.js
... ... @@ -274,25 +274,29 @@ const ButtonComponent = props => {
274 274 } else if (e.name === "其它机台日报") {
275 275 count = table3;
276 276 }
277   - const workFirst = commonFunc.showLocalMessage(props, 'workFirst!', '请先上班后再操作');
  277 + const workFirst = commonFunc.showLocalMessage(props, 'workFirst', '请先上班后再操作');
  278 + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示');
  279 + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认');
  280 + const NotAllowedBoards = commonFunc.showLocalMessage(props, 'NotAllowedBoards', '当前工序不允许拆合板!');
  281 +
278 282 return (
279 283 <div
280 284 key={e.id}
281 285 onClick={() => {
282 286 if (bStartWorkLimit) {
283 287 Modal.warning({
284   - title: "温馨提示:",
  288 + title: FriendlyReminder,
285 289 content: <div>{workFirst}</div>,
286   - okText: "确认"
  290 + okText: BtnSure
287 291 });
288 292 return;
289 293 }
290 294  
291 295 if (bChaihebanLimit) {
292 296 Modal.warning({
293   - title: "温馨提示:",
294   - content: <div>当前工序不允许拆合板!</div>,
295   - okText: "确认"
  297 + title: FriendlyReminder,
  298 + content: <div>{NotAllowedBoards}</div>,
  299 + okText: BtnSure
296 300 });
297 301 return;
298 302 }
... ...
src/mes/common/commonModelComponent/index.js
... ... @@ -1726,16 +1726,20 @@ const CommonTableComponent = props =&gt; {
1726 1726 const handleTableBtnClick = async item => {
1727 1727 const { record, tableData } = item;
1728 1728 const { iStar, bOKStartWorking } = record;
1729   -
  1729 + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示');
  1730 + const selectStatus = commonFunc.showLocalMessage(props, 'selectStatus', '请选择要变更的状态');
  1731 + const finishConstruction = commonFunc.showLocalMessage(props, 'finishConstruction', '完工');
  1732 + const pause = commonFunc.showLocalMessage(props, 'pause', '暂停');
  1733 + const productionCanotResumed = commonFunc.showLocalMessage(props, 'productionCanotResumed', '存在开工任务,无法恢复生产');
1730 1734 if (iStar === 1) {
1731 1735 // 如果只剩一条数据,询问是暂停还是完工
1732 1736 if (tableData.length === 1) {
1733 1737 const result = await new Promise(resolve => {
1734 1738 Modal.confirm({
1735   - title: "温馨提示:",
1736   - content: <div>请选择要变更的状态</div>,
1737   - okText: "完工",
1738   - cancelText: "暂停",
  1739 + title: FriendlyReminder,
  1740 + content: <div>{selectStatus}</div>,
  1741 + okText: finishConstruction,
  1742 + cancelText: pause,
1739 1743 onOk() {
1740 1744 resolve(true);
1741 1745 },
... ... @@ -1756,7 +1760,7 @@ const CommonTableComponent = props =&gt; {
1756 1760 } else if (iStar === 2 || iStar === 3 || iStar === 4) {
1757 1761 // 暂停中,走开工、完工接口
1758 1762 if (bOKStartWorking === 1) {
1759   - return message.error("存在开工任务,无法恢复生产", 3);
  1763 + return message.error(productionCanotResumed, 3);
1760 1764 }
1761 1765 const dataReturn = await props.handleStartWork(item);
1762 1766 const { code, msg } = dataReturn;
... ...
src/mes/login/index.js
... ... @@ -142,8 +142,8 @@ const useLoginEvent = props =&gt; {
142 142 // 新增方法:根据sName过滤configs
143 143 const getConfigByName = (name, configs, sLanguage) => {
144 144 const configObj = configs.find(item => item.sName === name);
145   - const showName = sLanguage === 'sChinese' ? configObj.sChinese : sLanguage ==='sEnglish' ? configObj.sEnglish :
146   - sLanguage === 'sBig5' ? configObj.sBig5 : configObj.sChinese;
  145 + const showName = sLanguage === 'sChinese' ? configObj?.sChinese : sLanguage ==='sEnglish' ? configObj?.sEnglish :
  146 + sLanguage === 'sBig5' ? configObj?.sBig5 : configObj?.sChinese;
147 147 return showName;
148 148 };
149 149 const sLanguage = commonUtils.isNotEmptyArr(companys) ? companys[0].sLanguage : 'sEnglish';
... ...