Commit 771c80789dc92d5eac8d5d88c6113db81edb3457
1 parent
04e38ae6
1.处理计算方案自定义参数
2.补充工艺参数的英文翻译
Showing
3 changed files
with
31 additions
and
11 deletions
src/components/Common/CommonElementEvent.js
| @@ -394,7 +394,7 @@ export default (ChildComponent) => { | @@ -394,7 +394,7 @@ export default (ChildComponent) => { | ||
| 394 | 394 | ||
| 395 | /* 自定义参数 */ | 395 | /* 自定义参数 */ |
| 396 | let selfParamConfig = commonUtils.isNotEmptyArr(formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizevariable')) ? | 396 | let selfParamConfig = commonUtils.isNotEmptyArr(formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizevariable')) ? |
| 397 | - formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizeparam')[0] : {}; | 397 | + formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizevariable')[0] : {}; |
| 398 | let selfParamColumn = []; | 398 | let selfParamColumn = []; |
| 399 | if(commonUtils.isNotEmptyArr(selfParamConfig)) { | 399 | if(commonUtils.isNotEmptyArr(selfParamConfig)) { |
| 400 | selfParamColumn = commonFunc.getHeaderConfig(selfParamConfig); | 400 | selfParamColumn = commonFunc.getHeaderConfig(selfParamConfig); |
src/components/Common/commonBusiness.js
| @@ -1834,17 +1834,18 @@ export function validatePramsNotEmpty(props) { | @@ -1834,17 +1834,18 @@ export function validatePramsNotEmpty(props) { | ||
| 1834 | 1834 | ||
| 1835 | const errorMessage = commonFunc.showLocalMessage(props, 'errorMessage', '错误提示'); | 1835 | const errorMessage = commonFunc.showLocalMessage(props, 'errorMessage', '错误提示'); |
| 1836 | 1836 | ||
| 1837 | + const line = commonFunc.showLocalMessage(props, 'line', '的【第${iOrder}行】的'); | ||
| 1837 | 1838 | ||
| 1838 | const allTableConfig = commonFunc.getAllTableConfig(props); | 1839 | const allTableConfig = commonFunc.getAllTableConfig(props); |
| 1839 | const bParamsMustConfigList = []; | 1840 | const bParamsMustConfigList = []; |
| 1840 | Object.keys(allTableConfig).forEach(tableName => { | 1841 | Object.keys(allTableConfig).forEach(tableName => { |
| 1841 | const tableConfig = allTableConfig[tableName] || {}; | 1842 | const tableConfig = allTableConfig[tableName] || {}; |
| 1842 | - const { gdsconfigformslave = [], sChinese } = tableConfig; | 1843 | + const { gdsconfigformslave = [], sChinese, showName } = tableConfig; |
| 1843 | const bMustConfig = gdsconfigformslave.find(item => item.sControlName === 'paramsNotEmpty'); | 1844 | const bMustConfig = gdsconfigformslave.find(item => item.sControlName === 'paramsNotEmpty'); |
| 1844 | if (bMustConfig) { | 1845 | if (bMustConfig) { |
| 1845 | const { sDefault } = bMustConfig; | 1846 | const { sDefault } = bMustConfig; |
| 1846 | if (sDefault) { | 1847 | if (sDefault) { |
| 1847 | - bParamsMustConfigList.push([tableName, sChinese, sDefault.split(',')]); | 1848 | + bParamsMustConfigList.push([tableName, sChinese, sDefault.split(','), showName]); |
| 1848 | } | 1849 | } |
| 1849 | } | 1850 | } |
| 1850 | }) | 1851 | }) |
| @@ -1861,7 +1862,7 @@ export function validatePramsNotEmpty(props) { | @@ -1861,7 +1862,7 @@ export function validatePramsNotEmpty(props) { | ||
| 1861 | 1862 | ||
| 1862 | try { | 1863 | try { |
| 1863 | for (let i = 0; i < bParamsMustConfigList.length; i++) { | 1864 | for (let i = 0; i < bParamsMustConfigList.length; i++) { |
| 1864 | - const [tableName, sChinese, sParamsNamesList] = bParamsMustConfigList[i]; | 1865 | + const [tableName, sChinese, sParamsNamesList, showName] = bParamsMustConfigList[i]; |
| 1865 | const tableData = props[`${tableName}Data`] || []; | 1866 | const tableData = props[`${tableName}Data`] || []; |
| 1866 | let sProductName = ''; | 1867 | let sProductName = ''; |
| 1867 | let sMainPre = ''; | 1868 | let sMainPre = ''; |
| @@ -1930,7 +1931,10 @@ export function validatePramsNotEmpty(props) { | @@ -1930,7 +1931,10 @@ export function validatePramsNotEmpty(props) { | ||
| 1930 | iIndex = iIndex + 1; | 1931 | iIndex = iIndex + 1; |
| 1931 | } | 1932 | } |
| 1932 | 1933 | ||
| 1933 | - const sChineseTableName = sChinese.charAt(sChinese.length - 1) === '表' ? sChinese : `${sChinese}表`; | 1934 | + let sChineseTableName = sChinese.charAt(sChinese.length - 1) === '表' ? sChinese : `${sChinese}表`; |
| 1935 | + if(props?.app?.userinfo?.sLanguage === 'sEnglish') { | ||
| 1936 | + sChineseTableName = showName; | ||
| 1937 | + } | ||
| 1934 | if (commonUtils.isNotEmptyStr(rowData.sControlId) ) { | 1938 | if (commonUtils.isNotEmptyStr(rowData.sControlId) ) { |
| 1935 | const { slaveData, slave0Child1Data, controlData: controlDataOld } = props; | 1939 | const { slaveData, slave0Child1Data, controlData: controlDataOld } = props; |
| 1936 | const controlData = slave0Child1Data ? slave0Child1Data : controlDataOld; | 1940 | const controlData = slave0Child1Data ? slave0Child1Data : controlDataOld; |
| @@ -1948,9 +1952,17 @@ export function validatePramsNotEmpty(props) { | @@ -1948,9 +1952,17 @@ export function validatePramsNotEmpty(props) { | ||
| 1948 | } | 1952 | } |
| 1949 | if (!commonUtils.isEmpty(sTip)) { | 1953 | if (!commonUtils.isEmpty(sTip)) { |
| 1950 | if (commonUtils.isNotEmptyStr(sProductName) && iLocationIndex > -1) { | 1954 | if (commonUtils.isNotEmptyStr(sProductName) && iLocationIndex > -1) { |
| 1951 | - sTipAll = `${sTipAll}${sMainPre}【${sProductName}的 ${sChineseTableName}】的【第${iLocationIndex + 1}行】的 ${sTip}xpm`; | 1955 | + let sLine = `的【第${iLocationIndex + 1}行】的`; |
| 1956 | + if(props?.app?.userinfo?.sLanguage === 'sEnglish') { | ||
| 1957 | + sLine = line + iLocationIndex + 1; | ||
| 1958 | + } | ||
| 1959 | + sTipAll = `${sTipAll}${sMainPre}【${sProductName}的 ${sChineseTableName}】${sLine} ${sTip}xpm`; | ||
| 1952 | } else { | 1960 | } else { |
| 1953 | - sTipAll = `${sTipAll}【${sChineseTableName}】的【第${iOrder}行】的 ${sTip}xpm` | 1961 | + let sLine = `的【第${iOrder}行】的`; |
| 1962 | + if(props?.app?.userinfo?.sLanguage === 'sEnglish') { | ||
| 1963 | + sLine = line + iOrder; | ||
| 1964 | + } | ||
| 1965 | + sTipAll = `${sTipAll}【${sChineseTableName}】${sLine}${sTip}xpm` | ||
| 1954 | } | 1966 | } |
| 1955 | } | 1967 | } |
| 1956 | } | 1968 | } |
src/components/CommonElementEvent/SisformulaInfo.js
| @@ -65,10 +65,18 @@ class SisformulaInfoComponent extends Component { | @@ -65,10 +65,18 @@ class SisformulaInfoComponent extends Component { | ||
| 65 | let sParam = ''; | 65 | let sParam = ''; |
| 66 | /* 找到该字段所在行 */ | 66 | /* 找到该字段所在行 */ |
| 67 | const iIndex = tableData.findIndex(item => item.sId === record.sId); | 67 | const iIndex = tableData.findIndex(item => item.sId === record.sId); |
| 68 | - if (iIndex > -1) { | ||
| 69 | - sParam = `${firstChar}${iIndex}_${showConfig.sName}`; | ||
| 70 | - } else { | ||
| 71 | - sParam = showConfig.sName; | 68 | + if(showConfig.sName=== 'sName') { |
| 69 | + if (iIndex > -1) { | ||
| 70 | + sParam = record[showConfig.sName]; | ||
| 71 | + } else { | ||
| 72 | + sParam = showConfig.sName; | ||
| 73 | + } | ||
| 74 | + }else { | ||
| 75 | + if (iIndex > -1) { | ||
| 76 | + sParam = `${firstChar}${iIndex}_${showConfig.sName}`; | ||
| 77 | + } else { | ||
| 78 | + sParam = showConfig.sName; | ||
| 79 | + } | ||
| 72 | } | 80 | } |
| 73 | const value = `@${sParam}`; | 81 | const value = `@${sParam}`; |
| 74 | const masterData = { ...masterDataOld }; | 82 | const masterData = { ...masterDataOld }; |