From c0a874e8192b9e4dbcdea1987887d2e0d8bde29b Mon Sep 17 00:00:00 2001 From: pengm <674192343@qq.com> Date: Sun, 28 Sep 2025 10:41:50 +0800 Subject: [PATCH] 1.完善各类翻译 --- src/components/Common/CommonComponent/index.js | 24 +++++++++++++++++------- src/components/Common/CommonTable/index.js | 4 ++-- src/mes/common/commonModelComponent/index.js | 4 ++-- src/mes/productionExec/productionExecMain/index.js | 30 +++++++++++++++++++++--------- src/mes/productionExec/productionExecMain/index.less | 5 +++-- 5 files changed, 45 insertions(+), 22 deletions(-) diff --git a/src/components/Common/CommonComponent/index.js b/src/components/Common/CommonComponent/index.js index acdb1f1..a5183db 100644 --- a/src/components/Common/CommonComponent/index.js +++ b/src/components/Common/CommonComponent/index.js @@ -749,10 +749,11 @@ export default class CommonComponent extends Component { } }; getSelectTableOption = () => { - const { selectTableData } = this.state; + const { selectTableData, selectTableIndex = 0 } = this.state; const { showConfig, app } = this.props; const { userinfo } = app; let { sTableTitleSql } = showConfig; + console.log('222', sTableTitleSql); /* 根据用户配置语言 设置表格标题 */ if (commonUtils.isJSON(sTableTitleSql) && sTableTitleSql.includes('Chinese')) { sTableTitleSql = this.getLocalizedString(sTableTitleSql, userinfo.sLanguage); @@ -771,7 +772,7 @@ export default class CommonComponent extends Component { const totalStringLen = titleStr.length; const otherStrLen = titleStr.replace(/[^\x00-\xff]/g, '').length; // eslint-disable-line const chineseStrLen = totalStringLen - otherStrLen; - const defaultWidth = (chineseStrLen * 20) + (otherStrLen * 12); + const defaultWidth = (chineseStrLen * 12) + (otherStrLen * 8); const maxStrLen = selectTableData.reduce((res, pre) => { let tempValue = pre[value] !== undefined ? pre[value] : ''; if (tempValue === '') { @@ -781,7 +782,7 @@ export default class CommonComponent extends Component { const totalStringLen = tempValue.length; const otherStrLen = tempValue.replace(/[^\x00-\xff]/g, '').length; // eslint-disable-line const chineseStrLen = totalStringLen - otherStrLen; - const tempWidth = (chineseStrLen * 20) + (otherStrLen * 12); + const tempWidth = (chineseStrLen * 12) + (otherStrLen * 8); return Math.max(tempWidth, res); }, defaultWidth); width = Math.min(maxStrLen + 8, 300); @@ -812,16 +813,25 @@ export default class CommonComponent extends Component { return (