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