From e7a1c18924a3a88e7e01ff4cc829ee8115e24c72 Mon Sep 17 00:00:00 2001 From: pengm <674192343@qq.com> Date: Mon, 8 Sep 2025 11:47:20 +0800 Subject: [PATCH] 1.修复状态写死运行,停机的逻辑处理 2.处理表格复制按钮,及弹出的英文版翻译 --- src/components/Common/CommonTable/index.js | 29 +++++++++++++++++++---------- src/mes/common/RunningStatus/index.js | 6 ++++-- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/src/components/Common/CommonTable/index.js b/src/components/Common/CommonTable/index.js index 1f0f7fd..1ea878f 100644 --- a/src/components/Common/CommonTable/index.js +++ b/src/components/Common/CommonTable/index.js @@ -4720,6 +4720,15 @@ class CommonTableRc extends React.Component { tableBtnsWidth += "px"; } const setOperation = commonFunc.showMessage(props.app.commonConst, 'operation') || '操作'; + const setCopy = commonFunc.showMessage(props.app.commonConst, 'setCopy') || '复制'; + const copyDivingRecorder = commonFunc.showMessage(props.app.commonConst, 'copyDivingRecorder') || '复制'; + const FriendlyReminder = commonFunc.showLocalMessage(props, "FriendlyReminder", "温馨提示"); + const btnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认'); + const btnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); + const BtnSave = commonFunc.showLocalMessage(props, 'BtnSave', '保存'); + const copyFirst = commonFunc.showLocalMessage(props, 'copyFirst', '请先选择要复制的数据'); + const splitFirst = commonFunc.showLocalMessage(props, 'splitFirst', '请先保存新拆分数据 '); + const operationCol = { dataIndex: "operation", render: (text, record, index) => { @@ -4847,12 +4856,12 @@ class CommonTableRc extends React.Component { !selectedRowKeys.length || !data.some(item => item.sId === selectedRowKeys[0]) ) { - message.error("请先选择要复制的数据!", 3); + message.error(copyFirst, 3); return; } if (data.some(item => item.bUnChanged)) { - message.error("请先保存新拆分数据!", 3); + message.error(splitFirst, 3); return; } @@ -4932,15 +4941,15 @@ class CommonTableRc extends React.Component { ]; Modal.confirm({ - title: "温馨提示:", - content:
确认复制该行车记录?
, - okText: "确认", - cancelText: "取消", + title: FriendlyReminder, + content:
{copyDivingRecorder}
, + okText: btnSure, + cancelText: btnCancel, onOk() { props.parentProps.onExecInstructSet({ nextProps: { ...props, table0Data: table0DataNew }, btnConfig: { - showName: "保存", + showName: BtnSave, sInstruct: JSON.stringify([ { opr: "save", @@ -4964,7 +4973,7 @@ class CommonTableRc extends React.Component { }); }} > - 复制 + {setCopy} ) : ( "" @@ -9338,9 +9347,9 @@ class CommonTableRc extends React.Component { // 系统记录状态 if (sName === "sPlcMachineStatus" || sName === "sPlcMachineStatusName") { - if (sValue === "运行") { + if (sValue === "运行" || sValue === "In operation") { noInputClass = styles.mesFinish; - } else if (sValue === "停机") { + } else if (sValue === "停机" || sValue === "Shutdown") { noInputClass = styles.mesStop; } } diff --git a/src/mes/common/RunningStatus/index.js b/src/mes/common/RunningStatus/index.js index ba1f056..7538784 100644 --- a/src/mes/common/RunningStatus/index.js +++ b/src/mes/common/RunningStatus/index.js @@ -276,9 +276,11 @@ const RunningStatusModal = _props => { if (!bNotCheck) { if ( - (parentTable0Data[iIndex].sPlcMachineStatusName === "运行" && + ( (parentTable0Data[iIndex].sPlcMachineStatusName === "运行" || + parentTable0Data[iIndex].sPlcMachineStatusName === "In operation" + ) && sClassifyName !== "sType1") || - (parentTable0Data[iIndex].sPlcMachineStatusName !== "运行" && + ((parentTable0Data[iIndex].sPlcMachineStatusName !== "运行" || parentTable0Data[iIndex].sPlcMachineStatusName !== "In operation" )&& sClassifyName === "sType1") ) { message.error("行车状态与当前选择不匹配,请重新选择!"); -- libgit2 0.22.2