Commit ca2c115497c7bb45566a47667d254465a16614d0
1 parent
e5fd2b6f
1.完善MES按钮类,弹窗类英文翻译
Showing
17 changed files
with
73 additions
and
48 deletions
src/components/Common/CommonBillEvent.js
| @@ -5038,6 +5038,7 @@ export default (ChildComponent) => { | @@ -5038,6 +5038,7 @@ export default (ChildComponent) => { | ||
| 5038 | this.handleGetData(masterConfig, slaveConfig, checkConfig); | 5038 | this.handleGetData(masterConfig, slaveConfig, checkConfig); |
| 5039 | } else if(name && name.includes('BtnTempSql')) { /* 通过BtnTempSql按钮 自定义调用Sql 并将数据回填到界面上 */ | 5039 | } else if(name && name.includes('BtnTempSql')) { /* 通过BtnTempSql按钮 自定义调用Sql 并将数据回填到界面上 */ |
| 5040 | const { masterConfig, slaveConfig, sModelsId, token } = this.props; | 5040 | const { masterConfig, slaveConfig, sModelsId, token } = this.props; |
| 5041 | + const sOperaSuccess = commonFunc.showLocalMessage(props, 'sOperaSuccess', '操作成功'); | ||
| 5041 | let { masterData,slaveData } = this.props; | 5042 | let { masterData,slaveData } = this.props; |
| 5042 | const slave0Data = []; | 5043 | const slave0Data = []; |
| 5043 | const slave1Data = []; | 5044 | const slave1Data = []; |
| @@ -5211,7 +5212,7 @@ export default (ChildComponent) => { | @@ -5211,7 +5212,7 @@ export default (ChildComponent) => { | ||
| 5211 | const dataReturn = (await commonServices.postValueService(this.props.app.token, value, url)).data; | 5212 | const dataReturn = (await commonServices.postValueService(this.props.app.token, value, url)).data; |
| 5212 | if (dataReturn.code === 1) { | 5213 | if (dataReturn.code === 1) { |
| 5213 | /* 数据操作 数据回传页面 */ | 5214 | /* 数据操作 数据回传页面 */ |
| 5214 | - message.success('操作成功!'); | 5215 | + message.success(sOperaSuccess); |
| 5215 | const returnData = dataReturn.dataset.rows[0]; | 5216 | const returnData = dataReturn.dataset.rows[0]; |
| 5216 | if (commonUtils.isNotEmptyArr(slaveNameList) && commonUtils.isNotEmptyObject(returnData)) { | 5217 | if (commonUtils.isNotEmptyArr(slaveNameList) && commonUtils.isNotEmptyObject(returnData)) { |
| 5217 | slaveNameList.forEach((name, index) => { | 5218 | slaveNameList.forEach((name, index) => { |
src/components/Common/CommonComponent/index.js
| @@ -2,6 +2,7 @@ import moment from 'moment'; | @@ -2,6 +2,7 @@ import moment from 'moment'; | ||
| 2 | import React, { Component, createRef } from 'react'; | 2 | import React, { Component, createRef } from 'react'; |
| 3 | import reactComponentDebounce from '@/components/Common/ReactDebounce'; | 3 | import reactComponentDebounce from '@/components/Common/ReactDebounce'; |
| 4 | import '@ant-design/compatible/assets/index.css'; | 4 | import '@ant-design/compatible/assets/index.css'; |
| 5 | +import * as commonFunc from '@/components/Common/commonFunc'; | ||
| 5 | import { | 6 | import { |
| 6 | InputNumber, | 7 | InputNumber, |
| 7 | Checkbox, | 8 | Checkbox, |
| @@ -558,6 +559,7 @@ export default class CommonComponent extends Component { | @@ -558,6 +559,7 @@ export default class CommonComponent extends Component { | ||
| 558 | } | 559 | } |
| 559 | /** 获取selectprops对象 */ | 560 | /** 获取selectprops对象 */ |
| 560 | getSelectProps = () => { | 561 | getSelectProps = () => { |
| 562 | + const noData = commonFunc.showLocalMessage(this.props, 'noData', '暂无数据'); | ||
| 561 | /* 返回值声明 */ | 563 | /* 返回值声明 */ |
| 562 | const obj = { | 564 | const obj = { |
| 563 | showSearch: true, /* 是否有查找功能 */ | 565 | showSearch: true, /* 是否有查找功能 */ |
| @@ -567,7 +569,7 @@ export default class CommonComponent extends Component { | @@ -567,7 +569,7 @@ export default class CommonComponent extends Component { | ||
| 567 | onDropdownVisibleChange: this.onDropdownVisibleChange, | 569 | onDropdownVisibleChange: this.onDropdownVisibleChange, |
| 568 | onPopupScroll: this.handlePopupScroll, | 570 | onPopupScroll: this.handlePopupScroll, |
| 569 | onSearch: this.handleSearch, | 571 | onSearch: this.handleSearch, |
| 570 | - notFoundContent: this.state.spinState ? <Spin /> : '暂无数据', | 572 | + notFoundContent: this.state.spinState ? <Spin /> : noData, |
| 571 | // getPopupContainer: this.props.name === 'slave' || this.props.name === 'searchColumnShow' ? this.getPopupContainer : null,/*解决下拉框不随浏览器滚动问题 */ | 573 | // getPopupContainer: this.props.name === 'slave' || this.props.name === 'searchColumnShow' ? this.getPopupContainer : null,/*解决下拉框不随浏览器滚动问题 */ |
| 572 | onFocus: this.onFocus, | 574 | onFocus: this.onFocus, |
| 573 | onBlur: this.onBlur, | 575 | onBlur: this.onBlur, |
| @@ -825,6 +827,7 @@ export default class CommonComponent extends Component { | @@ -825,6 +827,7 @@ export default class CommonComponent extends Component { | ||
| 825 | /** 获取complete对象 */ | 827 | /** 获取complete对象 */ |
| 826 | getCompleteProps = () => { | 828 | getCompleteProps = () => { |
| 827 | /* 返回值声明 */ | 829 | /* 返回值声明 */ |
| 830 | + const noData = commonFunc.showLocalMessage(this.props, 'noData', '暂无数据'); | ||
| 828 | const obj = { | 831 | const obj = { |
| 829 | // disabled: !this.state.enabled /* 修改的时候传过来的数据 */ | 832 | // disabled: !this.state.enabled /* 修改的时候传过来的数据 */ |
| 830 | onChange: this.handleCompleteInputEvent, /* 选择触发事件 */ | 833 | onChange: this.handleCompleteInputEvent, /* 选择触发事件 */ |
| @@ -857,7 +860,7 @@ export default class CommonComponent extends Component { | @@ -857,7 +860,7 @@ export default class CommonComponent extends Component { | ||
| 857 | /* 区分Oee设置字体与其他系统设置字体 */ | 860 | /* 区分Oee设置字体与其他系统设置字体 */ |
| 858 | dropdownClassName: commonUtils.isNotEmptyObject(location.pathname) && location.pathname.toLowerCase().indexOf('oee') > -1 ? (location.pathname.toLowerCase().indexOf('loginoee') > -1 ? 'loginOeeDropDown' : 'oeeDropDown') : '', | 861 | dropdownClassName: commonUtils.isNotEmptyObject(location.pathname) && location.pathname.toLowerCase().indexOf('oee') > -1 ? (location.pathname.toLowerCase().indexOf('loginoee') > -1 ? 'loginOeeDropDown' : 'oeeDropDown') : '', |
| 859 | onSearch: this.handleSearch, | 862 | onSearch: this.handleSearch, |
| 860 | - notFoundContent: this.state.spinState ? <Spin /> : '暂无数据', | 863 | + notFoundContent: this.state.spinState ? <Spin /> : noData, |
| 861 | onFocus: this.onFocus, | 864 | onFocus: this.onFocus, |
| 862 | onBlur: this.onBlur, | 865 | onBlur: this.onBlur, |
| 863 | }; | 866 | }; |
| @@ -1406,7 +1409,7 @@ export default class CommonComponent extends Component { | @@ -1406,7 +1409,7 @@ export default class CommonComponent extends Component { | ||
| 1406 | obj.title = obj.value; | 1409 | obj.title = obj.value; |
| 1407 | } | 1410 | } |
| 1408 | obj.placeholder = this.props.showConfig.placeholder; | 1411 | obj.placeholder = this.props.showConfig.placeholder; |
| 1409 | - | 1412 | + |
| 1410 | if (this.props.name === "tableS0" && this.props.showConfig.sName === "sStatus") { | 1413 | if (this.props.name === "tableS0" && this.props.showConfig.sName === "sStatus") { |
| 1411 | if (this.state.dataValue === "已提交") { | 1414 | if (this.state.dataValue === "已提交") { |
| 1412 | obj.className = "sStatusSubmit"; | 1415 | obj.className = "sStatusSubmit"; |
| @@ -2716,7 +2719,7 @@ export default class CommonComponent extends Component { | @@ -2716,7 +2719,7 @@ export default class CommonComponent extends Component { | ||
| 2716 | 2719 | ||
| 2717 | // 登记取样特殊处理 | 2720 | // 登记取样特殊处理 |
| 2718 | if(slaveConfig.sId=='12710101117346647176280'){ | 2721 | if(slaveConfig.sId=='12710101117346647176280'){ |
| 2719 | - | 2722 | + |
| 2720 | if(innerInputProps.id.includes('bReturn')){ | 2723 | if(innerInputProps.id.includes('bReturn')){ |
| 2721 | window.$xlyStorage = this.props.dataValue; | 2724 | window.$xlyStorage = this.props.dataValue; |
| 2722 | } | 2725 | } |
| @@ -2725,7 +2728,7 @@ export default class CommonComponent extends Component { | @@ -2725,7 +2728,7 @@ export default class CommonComponent extends Component { | ||
| 2725 | 2728 | ||
| 2726 | this.myRef.current.querySelector('input').addEventListener('keydown',(event)=>{ | 2729 | this.myRef.current.querySelector('input').addEventListener('keydown',(event)=>{ |
| 2727 | if (event.code === 'NumpadEnter' || event.code === 'Enter') { // 或者使用 event.keyCode === 13 | 2730 | if (event.code === 'NumpadEnter' || event.code === 'Enter') { // 或者使用 event.keyCode === 13 |
| 2728 | - | 2731 | + |
| 2729 | event.preventDefault(); // 阻止默认行为 | 2732 | event.preventDefault(); // 阻止默认行为 |
| 2730 | // console.log(this.value) | 2733 | // console.log(this.value) |
| 2731 | // const inputValue = this.value; | 2734 | // const inputValue = this.value; |
| @@ -2767,7 +2770,7 @@ export default class CommonComponent extends Component { | @@ -2767,7 +2770,7 @@ export default class CommonComponent extends Component { | ||
| 2767 | }) | 2770 | }) |
| 2768 | 2771 | ||
| 2769 | 2772 | ||
| 2770 | - | 2773 | + |
| 2771 | // debugger | 2774 | // debugger |
| 2772 | // innerInputProps.onPressEnter = (event2)=>{ | 2775 | // innerInputProps.onPressEnter = (event2)=>{ |
| 2773 | // setTimeout(()=>{ | 2776 | // setTimeout(()=>{ |
| @@ -3065,7 +3068,7 @@ export default class CommonComponent extends Component { | @@ -3065,7 +3068,7 @@ export default class CommonComponent extends Component { | ||
| 3065 | const fieldDecoratorProps = this.getFieldDecoratorProps(); | 3068 | const fieldDecoratorProps = this.getFieldDecoratorProps(); |
| 3066 | /* 通用组件(主表存在getFieldDecorator表单验证,而从表则不需要) */ | 3069 | /* 通用组件(主表存在getFieldDecorator表单验证,而从表则不需要) */ |
| 3067 | 3070 | ||
| 3068 | - | 3071 | + |
| 3069 | // 班组报工,产量上报信息,label文字颜色特殊处理 | 3072 | // 班组报工,产量上报信息,label文字颜色特殊处理 |
| 3070 | if(slaveConfig.sId=='17087428780006438414984564455000'){ | 3073 | if(slaveConfig.sId=='17087428780006438414984564455000'){ |
| 3071 | // 计件 | 3074 | // 计件 |
src/components/Common/CommonListSelect/index.js
| @@ -276,11 +276,12 @@ const CommonListComponent = Form.create({ | @@ -276,11 +276,12 @@ const CommonListComponent = Form.create({ | ||
| 276 | const bPadPop = | 276 | const bPadPop = |
| 277 | props.sModelsId === "12710101117211852461310" || | 277 | props.sModelsId === "12710101117211852461310" || |
| 278 | props.sModelsId === "12710101117218031681520"; | 278 | props.sModelsId === "12710101117218031681520"; |
| 279 | - | 279 | + |
| 280 | if (bPadPop) { | 280 | if (bPadPop) { |
| 281 | tableProps.fixedHeight = "325px"; | 281 | tableProps.fixedHeight = "325px"; |
| 282 | } | 282 | } |
| 283 | - | 283 | + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认'); |
| 284 | + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); | ||
| 284 | return ( | 285 | return ( |
| 285 | <Form > | 286 | <Form > |
| 286 | <Layout> | 287 | <Layout> |
| @@ -326,8 +327,8 @@ const CommonListComponent = Form.create({ | @@ -326,8 +327,8 @@ const CommonListComponent = Form.create({ | ||
| 326 | } | 327 | } |
| 327 | </div> | 328 | </div> |
| 328 | <div style={{ textAlign: 'right', marginRight: '9px', marginBottom: '9px' }}> | 329 | <div style={{ textAlign: 'right', marginRight: '9px', marginBottom: '9px' }}> |
| 329 | - <Button key="back" style={{ marginRight: '8px' }} size='large' onClick={props.onCancel}>取消</Button> | ||
| 330 | - <Button type="primary" size='large' onClick={props.onSelect}>确认</Button> | 330 | + <Button key="back" style={{ marginRight: '8px' }} size='large' onClick={props.onCancel}>{BtnCancel}</Button> |
| 331 | + <Button type="primary" size='large' onClick={props.onSelect}>{BtnSure}</Button> | ||
| 331 | </div> | 332 | </div> |
| 332 | </div> : '' | 333 | </div> : '' |
| 333 | } | 334 | } |
src/components/Common/CommonListSelectTree/index.js
| @@ -450,6 +450,8 @@ const CommonListComponent = Form.create({ | @@ -450,6 +450,8 @@ const CommonListComponent = Form.create({ | ||
| 450 | } | 450 | } |
| 451 | } | 451 | } |
| 452 | }; | 452 | }; |
| 453 | + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); | ||
| 454 | + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认'); | ||
| 453 | return ( | 455 | return ( |
| 454 | <div className="modalChooseProcessContent"> | 456 | <div className="modalChooseProcessContent"> |
| 455 | <Form > | 457 | <Form > |
| @@ -505,8 +507,8 @@ const CommonListComponent = Form.create({ | @@ -505,8 +507,8 @@ const CommonListComponent = Form.create({ | ||
| 505 | width: '50%', textAlign: 'right', marginRight: '9px', marginBottom: '9px', | 507 | width: '50%', textAlign: 'right', marginRight: '9px', marginBottom: '9px', |
| 506 | }} | 508 | }} |
| 507 | > | 509 | > |
| 508 | - <Button key="back" style={{ marginRight: '8px' }} onClick={props.onCancel}>取消</Button> | ||
| 509 | - <Button type="primary" onClick={props.onSelect}>确认</Button> | 510 | + <Button key="back" style={{ marginRight: '8px' }} onClick={props.onCancel}>{BtnCancel}</Button> |
| 511 | + <Button type="primary" onClick={props.onSelect}>{BtnSure}</Button> | ||
| 510 | </div> | 512 | </div> |
| 511 | </div> | 513 | </div> |
| 512 | </Layout> | 514 | </Layout> |
src/components/Common/CommonListTreeSelect/index.js
| @@ -564,7 +564,8 @@ const CommonListComponent = Form.create({ | @@ -564,7 +564,8 @@ const CommonListComponent = Form.create({ | ||
| 564 | } | 564 | } |
| 565 | } | 565 | } |
| 566 | }; | 566 | }; |
| 567 | - | 567 | + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认'); |
| 568 | + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); | ||
| 568 | return ( | 569 | return ( |
| 569 | <Form > | 570 | <Form > |
| 570 | <Layout> | 571 | <Layout> |
| @@ -609,8 +610,8 @@ const CommonListComponent = Form.create({ | @@ -609,8 +610,8 @@ const CommonListComponent = Form.create({ | ||
| 609 | } | 610 | } |
| 610 | </div> | 611 | </div> |
| 611 | <div style={{ textAlign: 'right', marginRight: '9px', marginBottom: '9px' }}> | 612 | <div style={{ textAlign: 'right', marginRight: '9px', marginBottom: '9px' }}> |
| 612 | - <Button key="back" style={{ marginRight: '8px' }} onClick={props.onCancel}>取消</Button> | ||
| 613 | - <Button type="primary" onClick={props.onSelect}>确认</Button> | 613 | + <Button key="back" style={{ marginRight: '8px' }} onClick={props.onCancel}>{BtnCancel}</Button> |
| 614 | + <Button type="primary" onClick={props.onSelect}>{BtnSure}</Button> | ||
| 614 | </div> | 615 | </div> |
| 615 | </div> : '' | 616 | </div> : '' |
| 616 | } | 617 | } |
src/components/Common/CommonTable/index.js
| @@ -12004,10 +12004,11 @@ const useCommonTableEvent = props => { | @@ -12004,10 +12004,11 @@ const useCommonTableEvent = props => { | ||
| 12004 | if (props.onGetTotalDiv) { | 12004 | if (props.onGetTotalDiv) { |
| 12005 | addState.getTotalDiv = props.onGetTotalDiv; | 12005 | addState.getTotalDiv = props.onGetTotalDiv; |
| 12006 | } | 12006 | } |
| 12007 | - | 12007 | + const sDetailTitle = commonFunc.showLocalMessage(props, 'sDetailTitle', '详细'); |
| 12008 | + const BtnClose = commonFunc.showLocalMessage(props, 'BtnClose', '关闭'); | ||
| 12008 | const handleShowSimpleModal = htmlString => { | 12009 | const handleShowSimpleModal = htmlString => { |
| 12009 | Modal.info({ | 12010 | Modal.info({ |
| 12010 | - title: <span style={{ color: "#1890FF" }}>详细</span>, | 12011 | + title: <span style={{ color: "#1890FF" }}>{sDetailTitle}</span>, |
| 12011 | width: "70%", | 12012 | width: "70%", |
| 12012 | content: ( | 12013 | content: ( |
| 12013 | <div | 12014 | <div |
| @@ -12022,7 +12023,7 @@ const useCommonTableEvent = props => { | @@ -12022,7 +12023,7 @@ const useCommonTableEvent = props => { | ||
| 12022 | dangerouslySetInnerHTML={{ __html: htmlString }} | 12023 | dangerouslySetInnerHTML={{ __html: htmlString }} |
| 12023 | /> | 12024 | /> |
| 12024 | ), | 12025 | ), |
| 12025 | - okText: "关闭" | 12026 | + okText: BtnClose |
| 12026 | }); | 12027 | }); |
| 12027 | }; | 12028 | }; |
| 12028 | 12029 |
src/components/Common/CommonViewDragable/index.js
| @@ -135,6 +135,7 @@ const ParamTableComponent = childProps => { | @@ -135,6 +135,7 @@ const ParamTableComponent = childProps => { | ||
| 135 | const RGLComponent = childProps => { | 135 | const RGLComponent = childProps => { |
| 136 | const { props, hooksProps } = useContext(myContext); | 136 | const { props, hooksProps } = useContext(myContext); |
| 137 | const { tableName } = props; | 137 | const { tableName } = props; |
| 138 | + | ||
| 138 | const { selectedData } = hooksProps; | 139 | const { selectedData } = hooksProps; |
| 139 | const { sParamType } = childProps; | 140 | const { sParamType } = childProps; |
| 140 | const xlyRGLRef = useRef(null); | 141 | const xlyRGLRef = useRef(null); |
| @@ -216,12 +217,13 @@ const RGLComponent = childProps => { | @@ -216,12 +217,13 @@ const RGLComponent = childProps => { | ||
| 216 | </ReactGridLayout> | 217 | </ReactGridLayout> |
| 217 | </div> | 218 | </div> |
| 218 | ) : ( | 219 | ) : ( |
| 219 | - <EmptyComponent /> | 220 | + <EmptyComponent props ={props} /> |
| 220 | ); | 221 | ); |
| 221 | }; | 222 | }; |
| 222 | 223 | ||
| 223 | const EmptyComponent = () => { | 224 | const EmptyComponent = () => { |
| 224 | - return <div className="emptyComponent">暂无数据</div>; | 225 | + const noData = commonFunc.showLocalMessage(this.props, 'noData', '暂无数据'); |
| 226 | + return <div className="emptyComponent">{noData}</div>; | ||
| 225 | }; | 227 | }; |
| 226 | 228 | ||
| 227 | // 获取选中数据 | 229 | // 获取选中数据 |
src/components/Common/SearchComponent/index.js
| @@ -1179,6 +1179,8 @@ export default class SearchComponent extends Component { | @@ -1179,6 +1179,8 @@ export default class SearchComponent extends Component { | ||
| 1179 | const btnSaveAndSearch = commonFunc.showMessage(app.commonConst, 'btnSaveAndSearch') || "保存并查询";/* 保存并查询 */ | 1179 | const btnSaveAndSearch = commonFunc.showMessage(app.commonConst, 'btnSaveAndSearch') || "保存并查询";/* 保存并查询 */ |
| 1180 | const solutionFilterSave = commonFunc.showMessage(app.commonConst, 'solutionFilterSave'); | 1180 | const solutionFilterSave = commonFunc.showMessage(app.commonConst, 'solutionFilterSave'); |
| 1181 | const solutionFilterNameUpd = commonFunc.showMessage(app.commonConst, 'solutionFilterNameUpd'); | 1181 | const solutionFilterNameUpd = commonFunc.showMessage(app.commonConst, 'solutionFilterNameUpd'); |
| 1182 | + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认'); | ||
| 1183 | + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); | ||
| 1182 | 1184 | ||
| 1183 | const modalCom = ( | 1185 | const modalCom = ( |
| 1184 | <AntdDraggableModal | 1186 | <AntdDraggableModal |
| @@ -1188,8 +1190,8 @@ export default class SearchComponent extends Component { | @@ -1188,8 +1190,8 @@ export default class SearchComponent extends Component { | ||
| 1188 | this.handleOk(e); | 1190 | this.handleOk(e); |
| 1189 | }, 300)} | 1191 | }, 300)} |
| 1190 | onCancel={this.handleCancel.bind(this, 'modalVisible')} | 1192 | onCancel={this.handleCancel.bind(this, 'modalVisible')} |
| 1191 | - okText="确认" | ||
| 1192 | - cancelText="取消" | 1193 | + okText={BtnSure} |
| 1194 | + cancelText={BtnCancel} | ||
| 1193 | confirmLoading={confirmLoading} | 1195 | confirmLoading={confirmLoading} |
| 1194 | maskClosable={false} | 1196 | maskClosable={false} |
| 1195 | > | 1197 | > |
src/components/Common/SlaveMemo.js
| @@ -218,7 +218,8 @@ class SlaveMemoRc extends Component { | @@ -218,7 +218,8 @@ class SlaveMemoRc extends Component { | ||
| 218 | let bVisibleMemo; | 218 | let bVisibleMemo; |
| 219 | let sMemoField; | 219 | let sMemoField; |
| 220 | let btnName = ""; | 220 | let btnName = ""; |
| 221 | - const title = "详细"; | 221 | + const sDetailTitle = commonFunc.showLocalMessage(props, 'sDetailTitle', '详细'); |
| 222 | + const title = sDetailTitle; | ||
| 222 | let bEnabledTextArea = false; /* 多行文本默认可输入 非编辑状态多行文本禁止输入 */ | 223 | let bEnabledTextArea = false; /* 多行文本默认可输入 非编辑状态多行文本禁止输入 */ |
| 223 | if (commonUtils.isNotEmptyObject(sCurrMemoProps)) { | 224 | if (commonUtils.isNotEmptyObject(sCurrMemoProps)) { |
| 224 | bVisibleMemo = sCurrMemoProps.bVisibleMemo; | 225 | bVisibleMemo = sCurrMemoProps.bVisibleMemo; |
src/components/Common/commonBusiness.js
| @@ -1267,8 +1267,9 @@ export async function clearSocketData(param) { | @@ -1267,8 +1267,9 @@ export async function clearSocketData(param) { | ||
| 1267 | * */ | 1267 | * */ |
| 1268 | export function createMemoProps(name, props) { | 1268 | export function createMemoProps(name, props) { |
| 1269 | const { sCurrMemoProps } = props; | 1269 | const { sCurrMemoProps } = props; |
| 1270 | + const sDetailTitle = commonFunc.showLocalMessage(props, 'sDetailTitle', '详细'); | ||
| 1270 | if (commonUtils.isNotEmptyObject(sCurrMemoProps) && commonUtils.isEmptyStr(sCurrMemoProps.title)) { | 1271 | if (commonUtils.isNotEmptyObject(sCurrMemoProps) && commonUtils.isEmptyStr(sCurrMemoProps.title)) { |
| 1271 | - sCurrMemoProps.title = '详细'; | 1272 | + sCurrMemoProps.title = sDetailTitle; |
| 1272 | sCurrMemoProps.name = name; | 1273 | sCurrMemoProps.name = name; |
| 1273 | } | 1274 | } |
| 1274 | const sMemoProps = { | 1275 | const sMemoProps = { |
src/components/Draggable/index.js
| @@ -37,6 +37,8 @@ export const DraggableConfirmModal = ({ | @@ -37,6 +37,8 @@ export const DraggableConfirmModal = ({ | ||
| 37 | }); | 37 | }); |
| 38 | const draggleRef = useRef(null); | 38 | const draggleRef = useRef(null); |
| 39 | 39 | ||
| 40 | + // const FriendlyReminder = commonFunc.showLocalMessage(this.props, 'FriendlyReminder', '温馨提示'); | ||
| 41 | + | ||
| 40 | const showModal = () => { | 42 | const showModal = () => { |
| 41 | setOpen(true); | 43 | setOpen(true); |
| 42 | }; | 44 | }; |
src/mes/common/commonModalComponent/index.js
| 1 | import React, { useEffect, useState } from "react"; | 1 | import React, { useEffect, useState } from "react"; |
| 2 | import { Button, Modal, Space } from "antd"; | 2 | import { Button, Modal, Space } from "antd"; |
| 3 | +import * as commonFunc from '@/components/Common//commonFunc'; | ||
| 3 | import RouterComponent from "@/routes/mes/routerComponent"; | 4 | import RouterComponent from "@/routes/mes/routerComponent"; |
| 4 | 5 | ||
| 5 | // 通用方法 | 6 | // 通用方法 |
| @@ -57,7 +58,7 @@ const CommonModalComponent = props => { | @@ -57,7 +58,7 @@ const CommonModalComponent = props => { | ||
| 57 | window.deviceTargetInfoModalAutoShow = false; | 58 | window.deviceTargetInfoModalAutoShow = false; |
| 58 | }; | 59 | }; |
| 59 | }, []); | 60 | }, []); |
| 60 | - | 61 | + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); |
| 61 | return ( | 62 | return ( |
| 62 | <Modal | 63 | <Modal |
| 63 | title={titleNew} | 64 | title={titleNew} |
| @@ -79,7 +80,7 @@ const CommonModalComponent = props => { | @@ -79,7 +80,7 @@ const CommonModalComponent = props => { | ||
| 79 | props.onCancel && props.onCancel(); | 80 | props.onCancel && props.onCancel(); |
| 80 | }} | 81 | }} |
| 81 | > | 82 | > |
| 82 | - 取消 | 83 | + {BtnCancel} |
| 83 | </Button> | 84 | </Button> |
| 84 | </Space> | 85 | </Space> |
| 85 | } | 86 | } |
src/mes/common/commonModelComponent/index.js
| @@ -1288,7 +1288,7 @@ const CommonModelComponent = props => { | @@ -1288,7 +1288,7 @@ const CommonModelComponent = props => { | ||
| 1288 | width = "100%", | 1288 | width = "100%", |
| 1289 | height = "100%" | 1289 | height = "100%" |
| 1290 | } = item; | 1290 | } = item; |
| 1291 | - console.log('ssconfigLists', configList, sEntireTabName ); | 1291 | + console.log('ssconfigLists', configList, sEntireTabName, item); |
| 1292 | const sEntireTabNameNew = sLanguage === 'sEnglish' ? sEnglishEntireTabName : | 1292 | const sEntireTabNameNew = sLanguage === 'sEnglish' ? sEnglishEntireTabName : |
| 1293 | sLanguage === 'sBig5EntireTabName' ? sBig5EntireTabName : sEntireTabName; | 1293 | sLanguage === 'sBig5EntireTabName' ? sBig5EntireTabName : sEntireTabName; |
| 1294 | console.log('sEntireTabNameNew', sEntireTabNameNew); | 1294 | console.log('sEntireTabNameNew', sEntireTabNameNew); |
| @@ -2022,10 +2022,10 @@ const CommonRepairComponent = props => { | @@ -2022,10 +2022,10 @@ const CommonRepairComponent = props => { | ||
| 2022 | bReturn: false | 2022 | bReturn: false |
| 2023 | }) | 2023 | }) |
| 2024 | } | 2024 | } |
| 2025 | - | 2025 | + const titleNew = title === '异常信息' ? 'Abnormal Info' : title; |
| 2026 | return ( | 2026 | return ( |
| 2027 | <Modal | 2027 | <Modal |
| 2028 | - title={title} | 2028 | + title={titleNew} |
| 2029 | open={visible} | 2029 | open={visible} |
| 2030 | width={width} | 2030 | width={width} |
| 2031 | height={height} | 2031 | height={height} |
| @@ -2606,10 +2606,10 @@ const TaskConfirmModal = props => { | @@ -2606,10 +2606,10 @@ const TaskConfirmModal = props => { | ||
| 2606 | props.itemClickRef.current = null; | 2606 | props.itemClickRef.current = null; |
| 2607 | props.onSaveState({ taskConfirmModalVisible: false }); | 2607 | props.onSaveState({ taskConfirmModalVisible: false }); |
| 2608 | }; | 2608 | }; |
| 2609 | - | 2609 | + const prompt = commonFunc.showLocalMessage(props, 'prompt', '提示'); |
| 2610 | return ( | 2610 | return ( |
| 2611 | <Modal | 2611 | <Modal |
| 2612 | - title="提示!" | 2612 | + title={prompt} |
| 2613 | open={taskConfirmModalVisible} | 2613 | open={taskConfirmModalVisible} |
| 2614 | width={500} | 2614 | width={500} |
| 2615 | height={250} | 2615 | height={250} |
src/mes/common/commonOperationBarComponent/index.js
| @@ -1469,7 +1469,8 @@ const ScanCodeToLoadMaterials = props => { | @@ -1469,7 +1469,8 @@ const ScanCodeToLoadMaterials = props => { | ||
| 1469 | }, | 1469 | }, |
| 1470 | [valueNew] | 1470 | [valueNew] |
| 1471 | ); | 1471 | ); |
| 1472 | - | 1472 | + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认'); |
| 1473 | + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); | ||
| 1473 | return ( | 1474 | return ( |
| 1474 | <Modal | 1475 | <Modal |
| 1475 | title="扫码上料" | 1476 | title="扫码上料" |
| @@ -1480,10 +1481,10 @@ const ScanCodeToLoadMaterials = props => { | @@ -1480,10 +1481,10 @@ const ScanCodeToLoadMaterials = props => { | ||
| 1480 | footer={ | 1481 | footer={ |
| 1481 | <Space> | 1482 | <Space> |
| 1482 | <Button size="large" onClick={handleCancel}> | 1483 | <Button size="large" onClick={handleCancel}> |
| 1483 | - 取消 | 1484 | + {BtnCancel} |
| 1484 | </Button> | 1485 | </Button> |
| 1485 | <Button type="primary" size="large" onClick={handleOk}> | 1486 | <Button type="primary" size="large" onClick={handleOk}> |
| 1486 | - 确认 | 1487 | + {BtnSure} |
| 1487 | </Button> | 1488 | </Button> |
| 1488 | </Space> | 1489 | </Space> |
| 1489 | } | 1490 | } |
src/mes/indexMes/index.js
| @@ -453,7 +453,7 @@ const IndexMes = baseProps => { | @@ -453,7 +453,7 @@ const IndexMes = baseProps => { | ||
| 453 | } | 453 | } |
| 454 | }; | 454 | }; |
| 455 | const bExsitLogin = commonFunc.showLocalMessage(props, 'bExsitLogin', '是否退出登录'); | 455 | const bExsitLogin = commonFunc.showLocalMessage(props, 'bExsitLogin', '是否退出登录'); |
| 456 | - | 456 | + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示'); |
| 457 | return ( | 457 | return ( |
| 458 | <ConfigProvider locale={getLocale()}> | 458 | <ConfigProvider locale={getLocale()}> |
| 459 | <myContext.Provider | 459 | <myContext.Provider |
| @@ -476,7 +476,9 @@ const IndexMes = baseProps => { | @@ -476,7 +476,9 @@ const IndexMes = baseProps => { | ||
| 476 | {logoutShow && ( | 476 | {logoutShow && ( |
| 477 | <DraggableConfirmModal | 477 | <DraggableConfirmModal |
| 478 | btnShow={false} | 478 | btnShow={false} |
| 479 | + title ={FriendlyReminder} | ||
| 479 | content={bExsitLogin} | 480 | content={bExsitLogin} |
| 481 | + props={props} | ||
| 480 | onOk={() => { | 482 | onOk={() => { |
| 481 | handleColseOee(); | 483 | handleColseOee(); |
| 482 | setLogoutShow(false); | 484 | setLogoutShow(false); |
| @@ -772,7 +774,7 @@ const SiderComponent = () => { | @@ -772,7 +774,7 @@ const SiderComponent = () => { | ||
| 772 | const { currentContent, menuMap } = hooksProps; | 774 | const { currentContent, menuMap } = hooksProps; |
| 773 | 775 | ||
| 774 | const teamInformation= commonFunc.showLocalMessage(props, 'teamInformation', '班组信息'); | 776 | const teamInformation= commonFunc.showLocalMessage(props, 'teamInformation', '班组信息'); |
| 775 | - console.log('2222', teamInformation); | 777 | + |
| 776 | 778 | ||
| 777 | const scheduledTask= commonFunc.showLocalMessage(props, 'scheduledTask', '计划任务'); | 779 | const scheduledTask= commonFunc.showLocalMessage(props, 'scheduledTask', '计划任务'); |
| 778 | 780 | ||
| @@ -929,7 +931,7 @@ const SystemFunComponent = () => { | @@ -929,7 +931,7 @@ const SystemFunComponent = () => { | ||
| 929 | const handleProcedureCall = async (params, iFlag) => { | 931 | const handleProcedureCall = async (params, iFlag) => { |
| 930 | const { onSuccess } = params; | 932 | const { onSuccess } = params; |
| 931 | const { app } = props; | 933 | const { app } = props; |
| 932 | - const FriendlyReminder = commonFunc.showLocalMessage(this.props, 'FriendlyReminder', '温馨提示'); | 934 | + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示'); |
| 933 | const { sMachineNameSId, sTeamNameSId, sShift, token, sModelsId } = app; | 935 | const { sMachineNameSId, sTeamNameSId, sShift, token, sModelsId } = app; |
| 934 | 936 | ||
| 935 | const value = { | 937 | const value = { |
src/mes/productionExec/quickSwitchTabComponent/index.js
| 1 | import React, { useEffect, useRef } from "react"; | 1 | import React, { useEffect, useRef } from "react"; |
| 2 | import * as commonUtils from "@/utils/utils"; | 2 | import * as commonUtils from "@/utils/utils"; |
| 3 | import useCommonBase from "@/components/Common/CommonHooks/useCommonBase"; | 3 | import useCommonBase from "@/components/Common/CommonHooks/useCommonBase"; |
| 4 | +import * as commonFunc from '@/components/Common/commonFunc'; | ||
| 4 | import styles from "./index.less"; | 5 | import styles from "./index.less"; |
| 5 | import { message } from "antd"; | 6 | import { message } from "antd"; |
| 6 | 7 | ||
| @@ -102,7 +103,7 @@ const QuickSwitchTabComponent = baseProps => { | @@ -102,7 +103,7 @@ const QuickSwitchTabComponent = baseProps => { | ||
| 102 | } | 103 | } |
| 103 | const sLanguage = props.app.userinfo.sLanguage || 'sChinese'; | 104 | const sLanguage = props.app.userinfo.sLanguage || 'sChinese'; |
| 104 | list = translateList(sLanguage); | 105 | list = translateList(sLanguage); |
| 105 | - | 106 | + const no = commonFunc.showLocalMessage(props, 'No', '暂无'); |
| 106 | return ( | 107 | return ( |
| 107 | <div className={styles.quickSwitchTabComponent} ref={ref}> | 108 | <div className={styles.quickSwitchTabComponent} ref={ref}> |
| 108 | {list.map((title, index) => { | 109 | {list.map((title, index) => { |
| @@ -124,7 +125,7 @@ const QuickSwitchTabComponent = baseProps => { | @@ -124,7 +125,7 @@ const QuickSwitchTabComponent = baseProps => { | ||
| 124 | } else { | 125 | } else { |
| 125 | props.onGetFileUrl(title, url => { | 126 | props.onGetFileUrl(title, url => { |
| 126 | if (!url) { | 127 | if (!url) { |
| 127 | - message.info(`暂无${title}`); | 128 | + message.info(`${no}${title}`); |
| 128 | return; | 129 | return; |
| 129 | } | 130 | } |
| 130 | props.onOpenCommonModal({ | 131 | props.onOpenCommonModal({ |
src/mes/scheduledTasks/machineTasks/index.js
| @@ -863,10 +863,13 @@ | @@ -863,10 +863,13 @@ | ||
| 863 | setPauseValue(args[2].sPausereason); | 863 | setPauseValue(args[2].sPausereason); |
| 864 | } | 864 | } |
| 865 | }; | 865 | }; |
| 866 | - | 866 | + const prompt = commonFunc.showLocalMessage(props, 'prompt', '提示'); |
| 867 | + const pause = commonFunc.showLocalMessage(props, 'pause', '提示'); | ||
| 868 | + const finishConstruction = commonFunc.showLocalMessage(props, 'finishConstruction', '完工'); | ||
| 869 | + const choosePauseReason = commonFunc.showLocalMessage(props, 'choosePauseReason', '请先选择暂停原因'); | ||
| 867 | return ( | 870 | return ( |
| 868 | <Modal | 871 | <Modal |
| 869 | - title={<span style={{ fontSize: 22 }}>提示!</span>} | 872 | + title={<span style={{ fontSize: 22 }}>{prompt}</span>} |
| 870 | open={taskConfirmModalVisible} | 873 | open={taskConfirmModalVisible} |
| 871 | width={500} | 874 | width={500} |
| 872 | height={320} | 875 | height={320} |
| @@ -881,13 +884,13 @@ | @@ -881,13 +884,13 @@ | ||
| 881 | className={styles.btnZt} | 884 | className={styles.btnZt} |
| 882 | onClick={() => { | 885 | onClick={() => { |
| 883 | if (!pauseValue.trim()) { | 886 | if (!pauseValue.trim()) { |
| 884 | - message.warning("请先选择暂停原因!"); | 887 | + message.warning(choosePauseReason); |
| 885 | return; | 888 | return; |
| 886 | } | 889 | } |
| 887 | props.pauseCallback(pauseValue.trim()); | 890 | props.pauseCallback(pauseValue.trim()); |
| 888 | }} | 891 | }} |
| 889 | > | 892 | > |
| 890 | - 暂停 | 893 | + {pause} |
| 891 | </Button> | 894 | </Button> |
| 892 | </Space> | 895 | </Space> |
| 893 | ) : ( | 896 | ) : ( |
| @@ -905,7 +908,7 @@ | @@ -905,7 +908,7 @@ | ||
| 905 | // handleClose(); | 908 | // handleClose(); |
| 906 | }} | 909 | }} |
| 907 | > | 910 | > |
| 908 | - 完工 | 911 | + {finishConstruction} |
| 909 | </Button> | 912 | </Button> |
| 910 | <Button | 913 | <Button |
| 911 | size="large" | 914 | size="large" |
| @@ -913,7 +916,7 @@ | @@ -913,7 +916,7 @@ | ||
| 913 | className={styles.btnZt} | 916 | className={styles.btnZt} |
| 914 | onClick={() => { | 917 | onClick={() => { |
| 915 | if (!pauseValue.trim()) { | 918 | if (!pauseValue.trim()) { |
| 916 | - message.warning("请先选择暂停原因!"); | 919 | + message.warning(choosePauseReason); |
| 917 | return; | 920 | return; |
| 918 | } | 921 | } |
| 919 | if (props.itemClickRef.current?.data) | 922 | if (props.itemClickRef.current?.data) |
| @@ -925,7 +928,7 @@ | @@ -925,7 +928,7 @@ | ||
| 925 | // handleClose(); | 928 | // handleClose(); |
| 926 | }} | 929 | }} |
| 927 | > | 930 | > |
| 928 | - 暂停 | 931 | + {pause} |
| 929 | </Button> | 932 | </Button> |
| 930 | </Space> | 933 | </Space> |
| 931 | )} | 934 | )} |