From 0e4bf461a422be2220b0ed98b623850d31678b58 Mon Sep 17 00:00:00 2001 From: pengm <674192343@qq.com> Date: Tue, 17 Jun 2025 10:12:10 +0800 Subject: [PATCH] 1.完善在线用户表格,人脸采集的英文,繁体翻译 --- src/components/Common/CommonTable/index.js | 2 +- src/components/Common/PersonCenter/PersonCenter.js | 62 ++++++++++++++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 49 insertions(+), 15 deletions(-) diff --git a/src/components/Common/CommonTable/index.js b/src/components/Common/CommonTable/index.js index 598bd7b..1dbc0ad 100644 --- a/src/components/Common/CommonTable/index.js +++ b/src/components/Common/CommonTable/index.js @@ -3227,7 +3227,7 @@ class CommonTableRc extends React.Component { this.props.enabled ? : } - : 操作 { headPopup ? {!props.bLimitOperate && ( props.enabled || this.findIsUpdByControlName(this.props, 'BtnHeadPopup')) ? : } : '' } ), + : {setOperation} { headPopup ? {!props.bLimitOperate && ( props.enabled || this.findIsUpdByControlName(this.props, 'BtnHeadPopup')) ? : } : '' } ), width: operateWidth + 'px', // fixed: commonUtils.isNotEmptyObject(this.props.tableProps.AutoTableHeight) ? 'right' : false, fixed: 'right', diff --git a/src/components/Common/PersonCenter/PersonCenter.js b/src/components/Common/PersonCenter/PersonCenter.js index 613beb0..627826c 100644 --- a/src/components/Common/PersonCenter/PersonCenter.js +++ b/src/components/Common/PersonCenter/PersonCenter.js @@ -356,7 +356,7 @@ class PersonCenter extends Component { const ExitLogin = commonFunc.showMessage(props.app.commonConst, 'ExitLogin');/* 退出 */ const sysadmin = commonFunc.showMessage(props.app.commonConst, 'sysadmin');/* 超级管理员 */ const General = commonFunc.showMessage(props.app.commonConst, 'General');/* 普通用户 */ - const OnlineUserName = '在线用户'; + const OnlineUserName = commonFunc.showMessage(props.app.commonConst, 'OnlineUsers') || '在线用户';/* 在线用户 */ const sLookAll = commonUtils.isNotEmptyObject(commonFunc.showMessage(props.app.commonConst, 'sLookAll')) ? commonFunc.showMessage(props.app.commonConst, 'sLookAll') : ''; @@ -826,11 +826,12 @@ const PersonCenterAddFace = Form.create({ handleModalClose, addFaceVisible, } = props; + const GetFace = commonFunc.showMessage(props.app.commonConst, 'GetFace');/* 在线用户 */ return (
{ { + const { sLanguage } = userinfo || {}; + let showName = column.sChinese; // 默认中文 + + if (sLanguage === 'sEnglish' && column.sEnglishName) { + showName = column.sEnglishName; + } else if (sLanguage === 'sBig5' && column.sBig5Name) { + showName = column.sBig5Name; + } + + return { + ...column, + showName + }; + }); /* eslint-disable array-callback-return,no-undef,no-unused-vars */ - onlineUserConfig.gdsconfigformslave = gdsconfigformslave; + onlineUserConfig.gdsconfigformslave = gdsconfigformslaveNew; + const headerColumn = commonFunc.getHeaderConfig(onlineUserConfig); + const { sLanguage } = userinfo || {}; const { sType } = props.app?.userinfo || {}; + // 根据用户语言处理表头显示名称 + headerColumn.forEach(column => { + if (sLanguage === 'sEnglish' && column.sEnglishName) { + column.showName = column.sEnglishName; // 使用英文显示名称 + }else if (sLanguage === 'sBig5' && column.sBig5Name) { + column.showName = column.sBig5Name; // 使用繁体显示名称 + } + }); + + const onlineUserProps = { ...commonBusiness.getTableTypes('onlineUser', props), formId: commonUtils.createSid(), @@ -900,7 +934,7 @@ const PersonCenterOnlineUser = Form.create({ }; const tableHeight = 500; - const title = `${OnlineUserName}${commonUtils.isNotEmptyObject(onlineUserDataNew) ? `【 站点数:${onlineUserDataNew.consumerCount}\xa0\xa0\xa0\xa0\xa0软件到期时间:${onlineUserDataNew.afterTime}` : ''} 】`; + const title = `${OnlineUserName}${commonUtils.isNotEmptyObject(onlineUserDataNew) ? `【 ${Website}:${onlineUserDataNew.consumerCount}\xa0\xa0\xa0\xa0\xa0${ExpirationDate}:${onlineUserDataNew.afterTime}` : ''} 】`; return (
{ -- libgit2 0.22.2