Commit 6c93d08684a56f610c718ecad89bfcb94e900158

Authored by Min
1 parent 27de5670

1.表单,表格悬浮增加英文-中文提示

src/components/Common/CommonComponent/index.js
@@ -1933,6 +1933,7 @@ export default class CommonComponent extends Component { @@ -1933,6 +1933,7 @@ export default class CommonComponent extends Component {
1933 1933
1934 /* 获取formitemprops对象(主) */ 1934 /* 获取formitemprops对象(主) */
1935 getOutFormItemPropsMaster = () => { 1935 getOutFormItemPropsMaster = () => {
  1936 + const bEnglish = this.props.app?.userinfo?.sLanguage === 'sEnglish';
1936 /* 返回值声明 */ 1937 /* 返回值声明 */
1937 let obj = {}; 1938 let obj = {};
1938 if (this.firstDataIndex === 'i' 1939 if (this.firstDataIndex === 'i'
@@ -1946,7 +1947,13 @@ export default class CommonComponent extends Component { @@ -1946,7 +1947,13 @@ export default class CommonComponent extends Component {
1946 文本输入框(文本s), 1947 文本输入框(文本s),
1947 地址联动框(联动下拉类型c) */ 1948 地址联动框(联动下拉类型c) */
1948 obj = { 1949 obj = {
1949 - label: this.props.showConfig.showName, /* 标签 */ 1950 + label: (
  1951 + <span
  1952 + title={bEnglish ? `${this.props.showConfig?.showName}-${this.props.showConfig?.sChinese}` : this.props.showConfig?.showName}
  1953 + >
  1954 + {this.props.showConfig?.showName}
  1955 + </span>
  1956 + ),
1950 className: styles.formItemMargin, /* 样式名称 */ 1957 className: styles.formItemMargin, /* 样式名称 */
1951 ...this.formItemLayout, /* 主要是rowspan和colspan */ 1958 ...this.formItemLayout, /* 主要是rowspan和colspan */
1952 }; 1959 };
@@ -1973,6 +1980,7 @@ export default class CommonComponent extends Component { @@ -1973,6 +1980,7 @@ export default class CommonComponent extends Component {
1973 /* 获取formitemprops对象(单条从表数据) */ 1980 /* 获取formitemprops对象(单条从表数据) */
1974 getOutFormItemPropsViewSlave = () => { 1981 getOutFormItemPropsViewSlave = () => {
1975 /* 返回值声明 */ 1982 /* 返回值声明 */
  1983 + const bEnglish = this.props.app?.userinfo?.sLanguage === 'sEnglish';
1976 let obj = {}; 1984 let obj = {};
1977 let titleStyle = {}; 1985 let titleStyle = {};
1978 const showNameNew = this.props.showConfig.showName?.replace(/[\/\)\()]/g, ''); 1986 const showNameNew = this.props.showConfig.showName?.replace(/[\/\)\()]/g, '');
@@ -2005,7 +2013,7 @@ export default class CommonComponent extends Component { @@ -2005,7 +2013,7 @@ export default class CommonComponent extends Component {
2005 文本输入框(文本s), 2013 文本输入框(文本s),
2006 地址联动框(联动下拉类型c) */ 2014 地址联动框(联动下拉类型c) */
2007 obj = { 2015 obj = {
2008 - label: <span style={titleStyle}>{this.props.showConfig.showName}</span>, /* 标签 */ 2016 + label: <span title={bEnglish ? `${this.props.showConfig?.showName}-${this.props.showConfig?.sChinese}` : this.props.showConfig?.showName} style={titleStyle}>{this.props.showConfig.showName}</span>, /* 标签 */
2009 className: `${styles.formItemMargin} ${extraClassName}`, /* 样式名称 */ 2017 className: `${styles.formItemMargin} ${extraClassName}`, /* 样式名称 */
2010 ...this.formItemLayout, /* 主要是rowspan和colspan */ 2018 ...this.formItemLayout, /* 主要是rowspan和colspan */
2011 }; 2019 };
src/components/Common/CommonTable/index.js
@@ -4481,7 +4481,7 @@ class CommonTableRc extends React.Component { @@ -4481,7 +4481,7 @@ class CommonTableRc extends React.Component {
4481 )) 4481 ))
4482 ) { 4482 ) {
4483 res = ( 4483 res = (
4484 - <div className="th-div" style={styleObj}> 4484 + <div className="th-div" style={styleObj} title={`${column.chineseTitle}`}>
4485 {checkBoxAll} 4485 {checkBoxAll}
4486 {expandedAllIcon} 4486 {expandedAllIcon}
4487 {!column.dataIndex?.startsWith("b") ? ( 4487 {!column.dataIndex?.startsWith("b") ? (
@@ -4575,6 +4575,7 @@ class CommonTableRc extends React.Component { @@ -4575,6 +4575,7 @@ class CommonTableRc extends React.Component {
4575 className={`th-div ${ 4575 className={`th-div ${
4576 column.bXunjianCheck ? styles.thXunjian : "" 4576 column.bXunjianCheck ? styles.thXunjian : ""
4577 }`} 4577 }`}
  4578 + title={`${column.chineseTitle}`}
4578 style={styleObj} 4579 style={styleObj}
4579 > 4580 >
4580 {checkBoxAll} 4581 {checkBoxAll}
src/components/Common/commonFunc.js
@@ -94,6 +94,7 @@ export function getHeaderConfig(config) { @@ -94,6 +94,7 @@ export function getHeaderConfig(config) {
94 if (child.sName !== '' && child.bVisible && child.showName !== '') { 94 if (child.sName !== '' && child.bVisible && child.showName !== '') {
95 column.push({ 95 column.push({
96 title: child.showName, 96 title: child.showName,
  97 + chineseTitle: child.sChinese,
97 dataIndex: child.sName.trim(), 98 dataIndex: child.sName.trim(),
98 width: child.iFitWidth, 99 width: child.iFitWidth,
99 bFind: child.bFind, 100 bFind: child.bFind,