Commit 29b143197bfe897a5b8f4421d66ae8a1056117ae
Merge branch 'main' of http://git.xlyprint.cn/zhangz/xlyUmi into main
Showing
3 changed files
with
51 additions
and
17 deletions
src/components/Common/CommonBillEvent.js
| ... | ... | @@ -764,8 +764,8 @@ export default (ChildComponent) => { |
| 764 | 764 | |
| 765 | 765 | /** 获取主表、从表、审核表数据 */ |
| 766 | 766 | handleGetData = async (masterConfig, slaveConfig, checkConfig, bEditClick) => { |
| 767 | - const { currentId } = this.props; /* 当前页签数据 */ | |
| 768 | - const sId = currentId !== undefined ? currentId : ''; | |
| 767 | + const { currentId, masterData = {} } = this.props; /* 当前页签数据 */ | |
| 768 | + const sId = currentId || masterData.sId || ''; | |
| 769 | 769 | this.props.handleGetDataOne({ name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, slaveConfig }); |
| 770 | 770 | // commonUtils.setStoreDropDownData(sModelsId, 'slave', 'sProductId', []); |
| 771 | 771 | // commonUtils.setStoreDropDownData(sModelsId, 'slave', 'sProductNo', []); | ... | ... |
src/components/Common/CommonTable/index.js
| ... | ... | @@ -3227,7 +3227,7 @@ class CommonTableRc extends React.Component { |
| 3227 | 3227 | this.props.enabled ? <UploadOutlined /> : <UploadOutlined style={{color:'rgb(189, 189, 189)'}} /> |
| 3228 | 3228 | } |
| 3229 | 3229 | </a> |
| 3230 | - </Upload></span> : <span> 操作 { headPopup ? <a {...headProps} onClick={!this.props.bLimitOperate && (props.enabled || this.findIsUpdByControlName(this.props, 'BtnHeadPopup')) ? this.popupModalTbRow : null}>{!props.bLimitOperate && ( props.enabled || this.findIsUpdByControlName(this.props, 'BtnHeadPopup')) ? <SvgIcon iconClass="plus" fill="#1296db" size="14" alt="添加" offsetY="2"></SvgIcon> : <SvgIcon iconClass="plus" fill="rgb(189, 189, 189)" size="14" alt="添加" offsetY="2"></SvgIcon>}</a> : '' } </span>), | |
| 3230 | + </Upload></span> : <span> {setOperation} { headPopup ? <a {...headProps} onClick={!this.props.bLimitOperate && (props.enabled || this.findIsUpdByControlName(this.props, 'BtnHeadPopup')) ? this.popupModalTbRow : null}>{!props.bLimitOperate && ( props.enabled || this.findIsUpdByControlName(this.props, 'BtnHeadPopup')) ? <SvgIcon iconClass="plus" fill="#1296db" size="14" alt="添加" offsetY="2"></SvgIcon> : <SvgIcon iconClass="plus" fill="rgb(189, 189, 189)" size="14" alt="添加" offsetY="2"></SvgIcon>}</a> : '' } </span>), | |
| 3231 | 3231 | width: operateWidth + 'px', |
| 3232 | 3232 | // fixed: commonUtils.isNotEmptyObject(this.props.tableProps.AutoTableHeight) ? 'right' : false, |
| 3233 | 3233 | fixed: 'right', | ... | ... |
src/components/Common/PersonCenter/PersonCenter.js
| ... | ... | @@ -356,7 +356,7 @@ class PersonCenter extends Component { |
| 356 | 356 | const ExitLogin = commonFunc.showMessage(props.app.commonConst, 'ExitLogin');/* 退出 */ |
| 357 | 357 | const sysadmin = commonFunc.showMessage(props.app.commonConst, 'sysadmin');/* 超级管理员 */ |
| 358 | 358 | const General = commonFunc.showMessage(props.app.commonConst, 'General');/* 普通用户 */ |
| 359 | - const OnlineUserName = '在线用户'; | |
| 359 | + const OnlineUserName = commonFunc.showMessage(props.app.commonConst, 'OnlineUsers') || '在线用户';/* 在线用户 */ | |
| 360 | 360 | const sLookAll = commonUtils.isNotEmptyObject(commonFunc.showMessage(props.app.commonConst, 'sLookAll')) ? |
| 361 | 361 | commonFunc.showMessage(props.app.commonConst, 'sLookAll') : ''; |
| 362 | 362 | |
| ... | ... | @@ -826,11 +826,12 @@ const PersonCenterAddFace = Form.create({ |
| 826 | 826 | handleModalClose, |
| 827 | 827 | addFaceVisible, |
| 828 | 828 | } = props; |
| 829 | + const GetFace = commonFunc.showMessage(props.app.commonConst, 'GetFace');/* 在线用户 */ | |
| 829 | 830 | return ( |
| 830 | 831 | <div> |
| 831 | 832 | { |
| 832 | 833 | <AntdDraggableModal |
| 833 | - title="人脸采集" | |
| 834 | + title={GetFace} | |
| 834 | 835 | width={400} |
| 835 | 836 | visible={addFaceVisible} |
| 836 | 837 | onCancel={handleCancel} |
| ... | ... | @@ -858,9 +859,15 @@ const PersonCenterOnlineUser = Form.create({ |
| 858 | 859 | onSaveState, |
| 859 | 860 | onlineUserState = {}, |
| 860 | 861 | onExitTbRow, |
| 862 | + app, | |
| 861 | 863 | } = props; |
| 864 | + const { userinfo } = app; | |
| 862 | 865 | const OnlineUsers = commonFunc.showMessage(props.app.commonConst, 'OnlineUsers');/* 在线用户 */ |
| 863 | - const OnlineUserName = { OnlineUsers }; | |
| 866 | + | |
| 867 | + const Website = commonFunc.showMessage(props.app.commonConst, 'Website');/* 站点数 */ | |
| 868 | + const ExpirationDate = commonFunc.showMessage(props.app.commonConst, 'ExpirationDate');/* ExpirationDate */ | |
| 869 | + | |
| 870 | + const OnlineUserName = OnlineUsers; | |
| 864 | 871 | // const ModifyPassword = commonFunc.showMessage(app.commonConst, 'ModifyPassword');/* 修改密码 */ |
| 865 | 872 | const onlineUserDataNew = commonUtils.isNotEmptyObject(onlineUserData) ? onlineUserData : {}; |
| 866 | 873 | const onlineUserConfig = { |
| ... | ... | @@ -870,21 +877,48 @@ const PersonCenterOnlineUser = Form.create({ |
| 870 | 877 | }; |
| 871 | 878 | /* eslint-disable */ |
| 872 | 879 | const gdsconfigformslave = [ |
| 873 | - { sId: commonUtils.createSid(), sName: 'sId', showName: '主键', bVisible: false, iFitWidth: 0 }, | |
| 874 | - { sId: commonUtils.createSid(), sName: 'iRowNum', showName: '行号', bVisible: true, iFitWidth: 60, bNotSort: true }, | |
| 875 | - { sId: commonUtils.createSid(), sName: 'sUserNo', showName: '用户号', bVisible: true, iFitWidth: 100, bFind: true }, | |
| 876 | - { sId: commonUtils.createSid(), sName: 'sUserName', showName: '用户名', bVisible: true, iFitWidth: 100, bFind: true }, | |
| 877 | - { sId: commonUtils.createSid(), sName: 'sEmployeeNo', showName: '员工编号', bVisible: true, iFitWidth: 100, bFind: true }, | |
| 878 | - { sId: commonUtils.createSid(), sName: 'sDepartName', showName: '部门', bVisible: true, iFitWidth: 100 }, | |
| 879 | - { sId: commonUtils.createSid(), sName: 'sUserType', showName: '用户类型', bVisible: true, iFitWidth: 100 }, | |
| 880 | - { sId: commonUtils.createSid(), sName: 'sUserLoginTypeName', showName: '登陆类型', bVisible: true, iFitWidth: 100 }, | |
| 881 | - { sId: commonUtils.createSid(), sName: 'tLoginDate', showName: '登陆时间', bVisible: true, iFitWidth: 150 }, | |
| 880 | + { sId: commonUtils.createSid(), sName: 'sId', showName: '主键', sChinese: '主键', sEnglishName: 'Primary Key', sBig5Name: '主鍵', bVisible: false, iFitWidth: 0 }, | |
| 881 | + { sId: commonUtils.createSid(), sName: 'iRowNum', showName: '行号',sChinese: '行号', sEnglishName: 'Row Number', sBig5Name: '行号', bVisible: true, iFitWidth: 60, bNotSort: true }, | |
| 882 | + { sId: commonUtils.createSid(), sName: 'sUserNo', showName: '用户号', sChinese: '用户号', sEnglishName: 'User ID', sBig5Name: '用戶号', bVisible: true, iFitWidth: 100, bFind: true }, | |
| 883 | + { sId: commonUtils.createSid(), sName: 'sUserName', showName: '用户名',sChinese: '用户名', sEnglishName: 'User Name',sBig5Name: '用戶名', bVisible: true, iFitWidth: 100, bFind: true }, | |
| 884 | + { sId: commonUtils.createSid(), sName: 'sEmployeeNo', showName: '员工编号', sChinese: '员工编号', sEnglishName: 'Employee ID', sBig5Name: '員工編號', bVisible: true, iFitWidth: 100, bFind: true }, | |
| 885 | + { sId: commonUtils.createSid(), sName: 'sDepartName', showName: '部门', sChinese: '部门', sEnglishName: 'Department',sBig5Name: '部門', bVisible: true, iFitWidth: 100 }, | |
| 886 | + { sId: commonUtils.createSid(), sName: 'sUserType', showName: '用户类型',sChinese: '用户类型', sEnglishName: 'User Type', sBig5Name: '用戶類型', bVisible: true, iFitWidth: 100 }, | |
| 887 | + { sId: commonUtils.createSid(), sName: 'sUserLoginTypeName', showName: '登陆类型', sChinese: '登陆类型', sEnglishName: 'Login Type',sBig5Name: '登陸類型', bVisible: true, iFitWidth: 100 }, | |
| 888 | + { sId: commonUtils.createSid(), sName: 'tLoginDate', showName: '登陆时间',sChinese: '登陆时间', sEnglishName: 'Login Time', sBig5Name: '登陸時間', bVisible: true, iFitWidth: 150 }, | |
| 882 | 889 | ]; |
| 890 | + const gdsconfigformslaveNew = gdsconfigformslave.map(column => { | |
| 891 | + const { sLanguage } = userinfo || {}; | |
| 892 | + let showName = column.sChinese; // 默认中文 | |
| 893 | + | |
| 894 | + if (sLanguage === 'sEnglish' && column.sEnglishName) { | |
| 895 | + showName = column.sEnglishName; | |
| 896 | + } else if (sLanguage === 'sBig5' && column.sBig5Name) { | |
| 897 | + showName = column.sBig5Name; | |
| 898 | + } | |
| 899 | + | |
| 900 | + return { | |
| 901 | + ...column, | |
| 902 | + showName | |
| 903 | + }; | |
| 904 | + }); | |
| 883 | 905 | /* eslint-disable array-callback-return,no-undef,no-unused-vars */ |
| 884 | - onlineUserConfig.gdsconfigformslave = gdsconfigformslave; | |
| 906 | + onlineUserConfig.gdsconfigformslave = gdsconfigformslaveNew; | |
| 907 | + | |
| 885 | 908 | const headerColumn = commonFunc.getHeaderConfig(onlineUserConfig); |
| 886 | 909 | |
| 910 | + const { sLanguage } = userinfo || {}; | |
| 887 | 911 | const { sType } = props.app?.userinfo || {}; |
| 912 | + // 根据用户语言处理表头显示名称 | |
| 913 | + headerColumn.forEach(column => { | |
| 914 | + if (sLanguage === 'sEnglish' && column.sEnglishName) { | |
| 915 | + column.showName = column.sEnglishName; // 使用英文显示名称 | |
| 916 | + }else if (sLanguage === 'sBig5' && column.sBig5Name) { | |
| 917 | + column.showName = column.sBig5Name; // 使用繁体显示名称 | |
| 918 | + } | |
| 919 | + }); | |
| 920 | + | |
| 921 | + | |
| 888 | 922 | const onlineUserProps = { |
| 889 | 923 | ...commonBusiness.getTableTypes('onlineUser', props), |
| 890 | 924 | formId: commonUtils.createSid(), |
| ... | ... | @@ -900,7 +934,7 @@ const PersonCenterOnlineUser = Form.create({ |
| 900 | 934 | }; |
| 901 | 935 | |
| 902 | 936 | const tableHeight = 500; |
| 903 | - const title = `${OnlineUserName}${commonUtils.isNotEmptyObject(onlineUserDataNew) ? `【 站点数:${onlineUserDataNew.consumerCount}\xa0\xa0\xa0\xa0\xa0软件到期时间:${onlineUserDataNew.afterTime}` : ''} 】`; | |
| 937 | + const title = `${OnlineUserName}${commonUtils.isNotEmptyObject(onlineUserDataNew) ? `【 ${Website}:${onlineUserDataNew.consumerCount}\xa0\xa0\xa0\xa0\xa0${ExpirationDate}:${onlineUserDataNew.afterTime}` : ''} 】`; | |
| 904 | 938 | return ( |
| 905 | 939 | <div> |
| 906 | 940 | { | ... | ... |