Commit e7a1c18924a3a88e7e01ff4cc829ee8115e24c72

Authored by Min
1 parent 0aff5a95

1.修复状态写死运行,停机的逻辑处理

2.处理表格复制按钮,及弹出的英文版翻译
src/components/Common/CommonTable/index.js
@@ -4720,6 +4720,15 @@ class CommonTableRc extends React.Component { @@ -4720,6 +4720,15 @@ class CommonTableRc extends React.Component {
4720 tableBtnsWidth += "px"; 4720 tableBtnsWidth += "px";
4721 } 4721 }
4722 const setOperation = commonFunc.showMessage(props.app.commonConst, 'operation') || '操作'; 4722 const setOperation = commonFunc.showMessage(props.app.commonConst, 'operation') || '操作';
  4723 + const setCopy = commonFunc.showMessage(props.app.commonConst, 'setCopy') || '复制';
  4724 + const copyDivingRecorder = commonFunc.showMessage(props.app.commonConst, 'copyDivingRecorder') || '复制';
  4725 + const FriendlyReminder = commonFunc.showLocalMessage(props, "FriendlyReminder", "温馨提示");
  4726 + const btnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认');
  4727 + const btnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消');
  4728 + const BtnSave = commonFunc.showLocalMessage(props, 'BtnSave', '保存');
  4729 + const copyFirst = commonFunc.showLocalMessage(props, 'copyFirst', '请先选择要复制的数据');
  4730 + const splitFirst = commonFunc.showLocalMessage(props, 'splitFirst', '请先保存新拆分数据 ');
  4731 +
4723 const operationCol = { 4732 const operationCol = {
4724 dataIndex: "operation", 4733 dataIndex: "operation",
4725 render: (text, record, index) => { 4734 render: (text, record, index) => {
@@ -4847,12 +4856,12 @@ class CommonTableRc extends React.Component { @@ -4847,12 +4856,12 @@ class CommonTableRc extends React.Component {
4847 !selectedRowKeys.length || 4856 !selectedRowKeys.length ||
4848 !data.some(item => item.sId === selectedRowKeys[0]) 4857 !data.some(item => item.sId === selectedRowKeys[0])
4849 ) { 4858 ) {
4850 - message.error("请先选择要复制的数据!", 3); 4859 + message.error(copyFirst, 3);
4851 return; 4860 return;
4852 } 4861 }
4853 4862
4854 if (data.some(item => item.bUnChanged)) { 4863 if (data.some(item => item.bUnChanged)) {
4855 - message.error("请先保存新拆分数据!", 3); 4864 + message.error(splitFirst, 3);
4856 return; 4865 return;
4857 } 4866 }
4858 4867
@@ -4932,15 +4941,15 @@ class CommonTableRc extends React.Component { @@ -4932,15 +4941,15 @@ class CommonTableRc extends React.Component {
4932 ]; 4941 ];
4933 4942
4934 Modal.confirm({ 4943 Modal.confirm({
4935 - title: "温馨提示:",  
4936 - content: <div>确认复制该行车记录?</div>,  
4937 - okText: "确认",  
4938 - cancelText: "取消", 4944 + title: FriendlyReminder,
  4945 + content: <div>{copyDivingRecorder}</div>,
  4946 + okText: btnSure,
  4947 + cancelText: btnCancel,
4939 onOk() { 4948 onOk() {
4940 props.parentProps.onExecInstructSet({ 4949 props.parentProps.onExecInstructSet({
4941 nextProps: { ...props, table0Data: table0DataNew }, 4950 nextProps: { ...props, table0Data: table0DataNew },
4942 btnConfig: { 4951 btnConfig: {
4943 - showName: "保存", 4952 + showName: BtnSave,
4944 sInstruct: JSON.stringify([ 4953 sInstruct: JSON.stringify([
4945 { 4954 {
4946 opr: "save", 4955 opr: "save",
@@ -4964,7 +4973,7 @@ class CommonTableRc extends React.Component { @@ -4964,7 +4973,7 @@ class CommonTableRc extends React.Component {
4964 }); 4973 });
4965 }} 4974 }}
4966 > 4975 >
4967 - 复制 4976 + {setCopy}
4968 </Button> 4977 </Button>
4969 ) : ( 4978 ) : (
4970 "" 4979 ""
@@ -9338,9 +9347,9 @@ class CommonTableRc extends React.Component { @@ -9338,9 +9347,9 @@ class CommonTableRc extends React.Component {
9338 9347
9339 // 系统记录状态 9348 // 系统记录状态
9340 if (sName === "sPlcMachineStatus" || sName === "sPlcMachineStatusName") { 9349 if (sName === "sPlcMachineStatus" || sName === "sPlcMachineStatusName") {
9341 - if (sValue === "运行") { 9350 + if (sValue === "运行" || sValue === "In operation") {
9342 noInputClass = styles.mesFinish; 9351 noInputClass = styles.mesFinish;
9343 - } else if (sValue === "停机") { 9352 + } else if (sValue === "停机" || sValue === "Shutdown") {
9344 noInputClass = styles.mesStop; 9353 noInputClass = styles.mesStop;
9345 } 9354 }
9346 } 9355 }
src/mes/common/RunningStatus/index.js
@@ -276,9 +276,11 @@ const RunningStatusModal = _props =&gt; { @@ -276,9 +276,11 @@ const RunningStatusModal = _props =&gt; {
276 276
277 if (!bNotCheck) { 277 if (!bNotCheck) {
278 if ( 278 if (
279 - (parentTable0Data[iIndex].sPlcMachineStatusName === "运行" && 279 + ( (parentTable0Data[iIndex].sPlcMachineStatusName === "运行" ||
  280 + parentTable0Data[iIndex].sPlcMachineStatusName === "In operation"
  281 + ) &&
280 sClassifyName !== "sType1") || 282 sClassifyName !== "sType1") ||
281 - (parentTable0Data[iIndex].sPlcMachineStatusName !== "运行" && 283 + ((parentTable0Data[iIndex].sPlcMachineStatusName !== "运行" || parentTable0Data[iIndex].sPlcMachineStatusName !== "In operation" )&&
282 sClassifyName === "sType1") 284 sClassifyName === "sType1")
283 ) { 285 ) {
284 message.error("行车状态与当前选择不匹配,请重新选择!"); 286 message.error("行车状态与当前选择不匹配,请重新选择!");