Commit 70c28e128c37cad2fb9668a94ed8f4f6e26a75c5
1 parent
2c4e2de6
1.完善系统英文翻译
Showing
6 changed files
with
48 additions
and
17 deletions
src/components/Common/AffixMenu.js
| @@ -349,7 +349,12 @@ class AffixMenuComponent extends Component { | @@ -349,7 +349,12 @@ class AffixMenuComponent extends Component { | ||
| 349 | const columniFitWidth = commonFunc.showMessage(app.commonConst, 'columniFitWidth');/* 宽度 */ | 349 | const columniFitWidth = commonFunc.showMessage(app.commonConst, 'columniFitWidth');/* 宽度 */ |
| 350 | const columnbVisible = commonFunc.showMessage(app.commonConst, 'columnbVisible');/* 是否显示 */ | 350 | const columnbVisible = commonFunc.showMessage(app.commonConst, 'columnbVisible');/* 是否显示 */ |
| 351 | const columnsName = commonFunc.showMessage(app.commonConst, 'columnsName');/* 字段名 */ | 351 | const columnsName = commonFunc.showMessage(app.commonConst, 'columnsName');/* 字段名 */ |
| 352 | + const columnsReadOnly = commonFunc.showMessage(app.commonConst, 'columnsReadOnly') || '是否只读';/* 是否自读 */ | ||
| 353 | + const columnsFontColor = commonFunc.showMessage(app.commonConst, 'columnsFontColor') || '字体颜色';/* 字体颜色 */ | ||
| 352 | const isDefault = commonFunc.showMessage(app.commonConst, 'isDefault');/* 是否设置默认 */ | 354 | const isDefault = commonFunc.showMessage(app.commonConst, 'isDefault');/* 是否设置默认 */ |
| 355 | + const BtnSure = commonFunc.showMessage(app.commonConst, 'BtnSure') || '确认';/* 按钮确认 */ | ||
| 356 | + const BtnCancel = commonFunc.showMessage(app.commonConst, 'BtnCancel') || '取消';/* 按钮取消 */ | ||
| 357 | + const selectAll = commonFunc.showMessage(app.commonConst, 'selectAll') || '全选';/* 全选 */ | ||
| 353 | // eslint-disable-next-line no-unused-vars | 358 | // eslint-disable-next-line no-unused-vars |
| 354 | Object.keys(modalData).forEach((child, i) => { | 359 | Object.keys(modalData).forEach((child, i) => { |
| 355 | const splitArr = commonUtils.isNotEmptyObject(child) && commonUtils.isNotEmptyArr(child.split('_')) ? child.split('_') : []; | 360 | const splitArr = commonUtils.isNotEmptyObject(child) && commonUtils.isNotEmptyArr(child.split('_')) ? child.split('_') : []; |
| @@ -404,11 +409,11 @@ class AffixMenuComponent extends Component { | @@ -404,11 +409,11 @@ class AffixMenuComponent extends Component { | ||
| 404 | visible += 1; | 409 | visible += 1; |
| 405 | } | 410 | } |
| 406 | } | 411 | } |
| 407 | - checkAll = <span>全选 <Checkbox indeterminate={visible !== len && visible} defaultChecked={visible === len} onChange={e => this.onCheckAll(e, child, count, configId)} /></span>; | 412 | + checkAll = <span>{selectAll} <Checkbox indeterminate={visible !== len && visible} defaultChecked={visible === len} onChange={e => this.onCheckAll(e, child, count, configId)} /></span>; |
| 408 | } | 413 | } |
| 409 | if (this.props.app.userinfo.sType === 'sysadmin' || true) { /* 管理员设置列是否可修改 */ | 414 | if (this.props.app.userinfo.sType === 'sysadmin' || true) { /* 管理员设置列是否可修改 */ |
| 410 | columns.push({ | 415 | columns.push({ |
| 411 | - title: '是否只读', | 416 | + title: columnsReadOnly, |
| 412 | dataIndex: 'bReadonly', | 417 | dataIndex: 'bReadonly', |
| 413 | render: (text, record) => this.renderColumns(text, 'bReadonly', configId, record), | 418 | render: (text, record) => this.renderColumns(text, 'bReadonly', configId, record), |
| 414 | width: 80, | 419 | width: 80, |
| @@ -416,7 +421,7 @@ class AffixMenuComponent extends Component { | @@ -416,7 +421,7 @@ class AffixMenuComponent extends Component { | ||
| 416 | } | 421 | } |
| 417 | if (this.props.app.userinfo.sType === 'sysadmin' || true) { /* 管理员设置列颜色 */ | 422 | if (this.props.app.userinfo.sType === 'sysadmin' || true) { /* 管理员设置列颜色 */ |
| 418 | columns.push({ | 423 | columns.push({ |
| 419 | - title: '字体颜色', | 424 | + title: columnsFontColor, |
| 420 | dataIndex: 'sFontColor', | 425 | dataIndex: 'sFontColor', |
| 421 | render: (text, record) => this.renderColumns(text, 'sFontColor', configId, record), | 426 | render: (text, record) => this.renderColumns(text, 'sFontColor', configId, record), |
| 422 | width: 80, | 427 | width: 80, |
| @@ -484,6 +489,8 @@ class AffixMenuComponent extends Component { | @@ -484,6 +489,8 @@ class AffixMenuComponent extends Component { | ||
| 484 | onCancel={this.handlePpopUpPaneCancel.bind(this)} | 489 | onCancel={this.handlePpopUpPaneCancel.bind(this)} |
| 485 | onOk={this.handleOk.bind(this)} | 490 | onOk={this.handleOk.bind(this)} |
| 486 | width={1000} | 491 | width={1000} |
| 492 | + okText={BtnSure} | ||
| 493 | + cancelText={BtnCancel} | ||
| 487 | > | 494 | > |
| 488 | <div className={styles.modalsContent}> | 495 | <div className={styles.modalsContent}> |
| 489 | { | 496 | { |
src/components/Common/CommonBase.js
| @@ -981,6 +981,9 @@ export default (ChildComponent) => { | @@ -981,6 +981,9 @@ export default (ChildComponent) => { | ||
| 981 | * 原代码: | 981 | * 原代码: |
| 982 | */ | 982 | */ |
| 983 | let billNum = ''; | 983 | let billNum = ''; |
| 984 | + let footTotalStr = ''; | ||
| 985 | + const footTotal =commonFunc.showMessage(this.props.app.commonConst, 'footTotal') || | ||
| 986 | + '当前显示 共${billNum}个单据 共${total}条记录'; | ||
| 984 | if (dataReturn.dataset.billNum) { | 987 | if (dataReturn.dataset.billNum) { |
| 985 | billNum = `共${dataReturn.dataset.billNum}个单据 `; | 988 | billNum = `共${dataReturn.dataset.billNum}个单据 `; |
| 986 | } | 989 | } |
| @@ -993,8 +996,9 @@ export default (ChildComponent) => { | @@ -993,8 +996,9 @@ export default (ChildComponent) => { | ||
| 993 | current: dataReturn.dataset.currentPageNo, | 996 | current: dataReturn.dataset.currentPageNo, |
| 994 | pageSize: pageSize, | 997 | pageSize: pageSize, |
| 995 | showTotal: (total) => { | 998 | showTotal: (total) => { |
| 999 | + footTotalStr = footTotal.replace('${billNum}', dataReturn.dataset.billNum).replace('${total}', total); | ||
| 996 | return ( | 1000 | return ( |
| 997 | - <span style={{fontWeight: 'bold'}}>{`当前显示 ${billNum}共${total}条记录`}</span> | 1001 | + <span style={{fontWeight: 'bold'}}>{footTotalStr}</span> |
| 998 | ); | 1002 | ); |
| 999 | }, | 1003 | }, |
| 1000 | }; | 1004 | }; |
src/components/Common/CommonTable/index.js
| @@ -2858,6 +2858,7 @@ class CommonTableRc extends React.Component { | @@ -2858,6 +2858,7 @@ class CommonTableRc extends React.Component { | ||
| 2858 | let sAlumitePopup = false; /* 选择电化铝 */ | 2858 | let sAlumitePopup = false; /* 选择电化铝 */ |
| 2859 | let bCopyMore = false; /* 复制多行 */ | 2859 | let bCopyMore = false; /* 复制多行 */ |
| 2860 | let bReplace = false; /* 替换数据 */ | 2860 | let bReplace = false; /* 替换数据 */ |
| 2861 | + const setOperation = commonFunc.showMessage(props.app.commonConst, 'operation') || '操作'; | ||
| 2861 | const bShowTreeAdd = props.tableProps.bShowTreeAdd && this.findIsExistByControlName(props, 'BtnAdd'); /* 添加树节点 */ | 2862 | const bShowTreeAdd = props.tableProps.bShowTreeAdd && this.findIsExistByControlName(props, 'BtnAdd'); /* 添加树节点 */ |
| 2862 | const bShowTreeAddChild = props.tableProps.bShowTreeAddChild && this.findIsExistByControlName(props, 'BtnAddChildNode'); /* 添加树节点 */ | 2863 | const bShowTreeAddChild = props.tableProps.bShowTreeAddChild && this.findIsExistByControlName(props, 'BtnAddChildNode'); /* 添加树节点 */ |
| 2863 | const bShowTreeDel = props.tableProps.bShowTreeDel && this.findIsExistByControlName(props, 'BtnDel'); /* 添加树节点 */ | 2864 | const bShowTreeDel = props.tableProps.bShowTreeDel && this.findIsExistByControlName(props, 'BtnDel'); /* 添加树节点 */ |
| @@ -3185,7 +3186,7 @@ class CommonTableRc extends React.Component { | @@ -3185,7 +3186,7 @@ class CommonTableRc extends React.Component { | ||
| 3185 | style={{ | 3186 | style={{ |
| 3186 | width: '100%', height: '100%', display: 'flex', justifyContent: 'left', textDecoration: 'none', | 3187 | width: '100%', height: '100%', display: 'flex', justifyContent: 'left', textDecoration: 'none', |
| 3187 | }} | 3188 | }} |
| 3188 | - >操作 {uploadIcon ? <Upload {...divProps} disabled={!this.props.enabled}> | 3189 | + >{setOperation} {uploadIcon ? <Upload {...divProps} disabled={!this.props.enabled}> |
| 3189 | <a {...uploadProps} | 3190 | <a {...uploadProps} |
| 3190 | contenteditable="true" | 3191 | contenteditable="true" |
| 3191 | ref={(ref) => {this.uploadRef1 = ref;}} | 3192 | ref={(ref) => {this.uploadRef1 = ref;}} |
| @@ -4344,6 +4345,8 @@ class CommonTableRc extends React.Component { | @@ -4344,6 +4345,8 @@ class CommonTableRc extends React.Component { | ||
| 4344 | const { tableColumn, totalData, totalData1 } = this.state; | 4345 | const { tableColumn, totalData, totalData1 } = this.state; |
| 4345 | const { dNetMoney, dNetPrice } = this.props.app.decimals; | 4346 | const { dNetMoney, dNetPrice } = this.props.app.decimals; |
| 4346 | const sModelsType = commonUtils.isNotEmptyObject(this.props) && commonUtils.isNotEmptyObject(this.props.app) ? this.props.app.currentPane.sModelsType : ''; | 4347 | const sModelsType = commonUtils.isNotEmptyObject(this.props) && commonUtils.isNotEmptyObject(this.props.app) ? this.props.app.currentPane.sModelsType : ''; |
| 4348 | + const sumset = commonFunc.showMessage(this.props.app.commonConst, 'sumSet') || '合计'; | ||
| 4349 | + | ||
| 4347 | let colSpan = 0; | 4350 | let colSpan = 0; |
| 4348 | if ((!totalData.length && !totalData1.length) || this.props.footer !== undefined) { | 4351 | if ((!totalData.length && !totalData1.length) || this.props.footer !== undefined) { |
| 4349 | return (<></>); | 4352 | return (<></>); |
| @@ -4363,7 +4366,7 @@ class CommonTableRc extends React.Component { | @@ -4363,7 +4366,7 @@ class CommonTableRc extends React.Component { | ||
| 4363 | let summaryCellTotal = ''; | 4366 | let summaryCellTotal = ''; |
| 4364 | summaryCellTotal = ( | 4367 | summaryCellTotal = ( |
| 4365 | <Table.Summary.Cell key={0} colSpan={colSpan ? colSpan: 1} index={0}> | 4368 | <Table.Summary.Cell key={0} colSpan={colSpan ? colSpan: 1} index={0}> |
| 4366 | - <span className={styles.summaryCellTotal}>合计</span> | 4369 | + <span className={styles.summaryCellTotal}>{sumset}</span> |
| 4367 | </Table.Summary.Cell> | 4370 | </Table.Summary.Cell> |
| 4368 | ); | 4371 | ); |
| 4369 | // if(this.props.slaveInfo) { | 4372 | // if(this.props.slaveInfo) { |
src/components/Common/PersonCenter/PersonCenter.js
| @@ -115,8 +115,9 @@ class PersonCenter extends Component { | @@ -115,8 +115,9 @@ class PersonCenter extends Component { | ||
| 115 | }; | 115 | }; |
| 116 | dispatch({ type: 'app/addPane', payload: { pane } }); | 116 | dispatch({ type: 'app/addPane', payload: { pane } }); |
| 117 | } else if (e.key === 'clearOption') { | 117 | } else if (e.key === 'clearOption') { |
| 118 | + const recordDeletion = commonFunc.showMessage(this.props.app.commonConst, 'recordDeletion') || '记录删除';/* 人脸采集 */ | ||
| 118 | sessionStorage.clear(); | 119 | sessionStorage.clear(); |
| 119 | - this.clearSocket({ optName: '记录删除' }); | 120 | + this.clearSocket({ optName: recordDeletion }); |
| 120 | commonUtils.clearStoreDropDownData(); | 121 | commonUtils.clearStoreDropDownData(); |
| 121 | } else if (e.key === 'about') { | 122 | } else if (e.key === 'about') { |
| 122 | this.handleShowAbout(); | 123 | this.handleShowAbout(); |
| @@ -858,7 +859,8 @@ const PersonCenterOnlineUser = Form.create({ | @@ -858,7 +859,8 @@ const PersonCenterOnlineUser = Form.create({ | ||
| 858 | onlineUserState = {}, | 859 | onlineUserState = {}, |
| 859 | onExitTbRow, | 860 | onExitTbRow, |
| 860 | } = props; | 861 | } = props; |
| 861 | - const OnlineUserName = '在线用户'; | 862 | + const OnlineUsers = commonFunc.showMessage(props.app.commonConst, 'OnlineUsers');/* 在线用户 */ |
| 863 | + const OnlineUserName = { OnlineUsers }; | ||
| 862 | // const ModifyPassword = commonFunc.showMessage(app.commonConst, 'ModifyPassword');/* 修改密码 */ | 864 | // const ModifyPassword = commonFunc.showMessage(app.commonConst, 'ModifyPassword');/* 修改密码 */ |
| 863 | const onlineUserDataNew = commonUtils.isNotEmptyObject(onlineUserData) ? onlineUserData : {}; | 865 | const onlineUserDataNew = commonUtils.isNotEmptyObject(onlineUserData) ? onlineUserData : {}; |
| 864 | const onlineUserConfig = { | 866 | const onlineUserConfig = { |
src/components/FaceDetect/index.js
| @@ -6,6 +6,7 @@ import { Progress, message } from 'antd-v4'; | @@ -6,6 +6,7 @@ import { Progress, message } from 'antd-v4'; | ||
| 6 | import * as commonServices from "../../services/services"; | 6 | import * as commonServices from "../../services/services"; |
| 7 | import config from '@/utils/config'; | 7 | import config from '@/utils/config'; |
| 8 | import './index.less'; | 8 | import './index.less'; |
| 9 | +import * as commonFunc from "../Common/commonFunc"; | ||
| 9 | 10 | ||
| 10 | let token = '92d3bf5f3edcb55c731acb11b7f28202'; // 测试的删除token | 11 | let token = '92d3bf5f3edcb55c731acb11b7f28202'; // 测试的删除token |
| 11 | 12 | ||
| @@ -407,7 +408,8 @@ class FaceDetect extends Component { | @@ -407,7 +408,8 @@ class FaceDetect extends Component { | ||
| 407 | 408 | ||
| 408 | render() { | 409 | render() { |
| 409 | const enable = ((this.props.enabled && this.user_id !== '' )|| this.props.actionType === 'identifyFace'); | 410 | const enable = ((this.props.enabled && this.user_id !== '' )|| this.props.actionType === 'identifyFace'); |
| 410 | - return ( | 411 | + const faceCollection = commonFunc.showMessage(this.props.app.commonConst, 'faceCollection') || '人脸采集';/* 人脸采集 */ |
| 412 | + return ( | ||
| 411 | <> | 413 | <> |
| 412 | <div className="face-recognition-container"> | 414 | <div className="face-recognition-container"> |
| 413 | <div className="face-recognition"> | 415 | <div className="face-recognition"> |
| @@ -420,21 +422,28 @@ class FaceDetect extends Component { | @@ -420,21 +422,28 @@ class FaceDetect extends Component { | ||
| 420 | </div> | 422 | </div> |
| 421 | <div className="tips"> | 423 | <div className="tips"> |
| 422 | <span>{this.state.statusContent}</span> | 424 | <span>{this.state.statusContent}</span> |
| 423 | - { | ||
| 424 | - (this.state.currentPercent > 0) && <Progress type="circle" percent={this.state.currentPercent} status={this.state.percentStatus} width={20} strokeWidth={10} format={() => ''}/> | ||
| 425 | - } | 425 | + {this.state.currentPercent > 0 && ( |
| 426 | + <Progress | ||
| 427 | + type="circle" | ||
| 428 | + percent={this.state.currentPercent} | ||
| 429 | + status={this.state.percentStatus} | ||
| 430 | + width={20} | ||
| 431 | + strokeWidth={10} | ||
| 432 | + format={() => ""} | ||
| 433 | + /> | ||
| 434 | + )} | ||
| 426 | </div> | 435 | </div> |
| 427 | <video id="video" autoPlay="autoplay"></video> | 436 | <video id="video" autoPlay="autoplay"></video> |
| 428 | - { this.state.thumbImg !== '' && <img src={this.state.thumbImg} className={"thumb-img"} alt=""/>} | 437 | + {this.state.thumbImg !== "" && <img src={this.state.thumbImg} className={"thumb-img"} alt="" />} |
| 429 | <div className="canvas-wrapper"> | 438 | <div className="canvas-wrapper"> |
| 430 | <canvas id="canvas" width="268" height="214"></canvas> | 439 | <canvas id="canvas" width="268" height="214"></canvas> |
| 431 | </div> | 440 | </div> |
| 432 | - <div className={`action ${enable ? '' : 'action_disabled'}`}> | 441 | + <div className={`action ${enable ? "" : "action_disabled"}`}> |
| 433 | <div onClick={() => this.handleEvent(enable)} className="action-item"> | 442 | <div onClick={() => this.handleEvent(enable)} className="action-item"> |
| 434 | <span className="action-item-icon"> | 443 | <span className="action-item-icon"> |
| 435 | <VideoCameraOutlined /> | 444 | <VideoCameraOutlined /> |
| 436 | </span> | 445 | </span> |
| 437 | - <span>人脸采集</span> | 446 | + <span>{faceCollection}</span> |
| 438 | </div> | 447 | </div> |
| 439 | </div> | 448 | </div> |
| 440 | </div> | 449 | </div> |
| @@ -447,7 +456,7 @@ class FaceDetect extends Component { | @@ -447,7 +456,7 @@ class FaceDetect extends Component { | ||
| 447 | {/* <Button onClick={this.getFaceList}>用户列表</Button>*/} | 456 | {/* <Button onClick={this.getFaceList}>用户列表</Button>*/} |
| 448 | {/*</div>*/} | 457 | {/*</div>*/} |
| 449 | </> | 458 | </> |
| 450 | - ) | 459 | + ); |
| 451 | } | 460 | } |
| 452 | } | 461 | } |
| 453 | 462 |
src/routes/tab/tab.js
| @@ -75,6 +75,7 @@ import CommonNewListBill from "@/routes/common/commonNewListBill"; /* é€šç”¨å•æ | @@ -75,6 +75,7 @@ import CommonNewListBill from "@/routes/common/commonNewListBill"; /* é€šç”¨å•æ | ||
| 75 | import CommonGroupBill from "@/routes/common/commonGroupBill"; /* é€šç”¨å•æ®é¡µ */ | 75 | import CommonGroupBill from "@/routes/common/commonGroupBill"; /* é€šç”¨å•æ®é¡µ */ |
| 76 | import PrintPdf from "../printPdf/printPdf"; /* å•预览 */ | 76 | import PrintPdf from "../printPdf/printPdf"; /* å•预览 */ |
| 77 | import Feedback from '../feedback/feedback'; | 77 | import Feedback from '../feedback/feedback'; |
| 78 | +import * as commonFunc from "@/components/Common/commonFunc"; | ||
| 78 | /* 计算方案s */ | 79 | /* 计算方案s */ |
| 79 | const { confirm } = Modal; | 80 | const { confirm } = Modal; |
| 80 | const { TabPane } = Tabs; | 81 | const { TabPane } = Tabs; |
| @@ -269,9 +270,12 @@ function Tab({ dispatch, app }) { | @@ -269,9 +270,12 @@ function Tab({ dispatch, app }) { | ||
| 269 | } | 270 | } |
| 270 | } | 271 | } |
| 271 | if (app.diffMap && removePane[0] && app.diffMap.get(removePane[0].key)) { | 272 | if (app.diffMap && removePane[0] && app.diffMap.get(removePane[0].key)) { |
| 273 | + const contentStr = commonFunc.showMessage(app.commonConst, 'isLeave') || '内容未ä¿å˜ï¼Œæ˜¯å¦ç¦»å¼€ï¼Ÿ';/* 内容未ä¿å˜ï¼Œæ˜¯å¦ç¦»å¼€ï¼Ÿ */ | ||
| 274 | + const BtnSure = commonFunc.showMessage(app.commonConst, 'BtnSure') || '确认';/* 按钮确认 */ | ||
| 275 | + const BtnCancel = commonFunc.showMessage(app.commonConst, 'BtnCancel') || 'å–æ¶ˆ';/* æŒ‰é’®å–æ¶ˆ */ | ||
| 272 | confirm({ | 276 | confirm({ |
| 273 | icon: <ExclamationCircleOutlined />, | 277 | icon: <ExclamationCircleOutlined />, |
| 274 | - content: "内容未ä¿å˜ï¼Œæ˜¯å¦ç¦»å¼€ï¼Ÿ", | 278 | + content: contentStr, |
| 275 | onOk() { | 279 | onOk() { |
| 276 | removeData.forEach(i => { | 280 | removeData.forEach(i => { |
| 277 | clearWebSocketMsg(i); | 281 | clearWebSocketMsg(i); |
| @@ -281,6 +285,8 @@ function Tab({ dispatch, app }) { | @@ -281,6 +285,8 @@ function Tab({ dispatch, app }) { | ||
| 281 | onCancel() { | 285 | onCancel() { |
| 282 | console.log("å–æ¶ˆå…³é—"); | 286 | console.log("å–æ¶ˆå…³é—"); |
| 283 | }, | 287 | }, |
| 288 | + okText:BtnSure, | ||
| 289 | + cancelText:BtnCancel | ||
| 284 | }); | 290 | }); |
| 285 | } else { | 291 | } else { |
| 286 | removeData.forEach(i => { | 292 | removeData.forEach(i => { |