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 4720 tableBtnsWidth += "px";
4721 4721 }
4722 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 4732 const operationCol = {
4724 4733 dataIndex: "operation",
4725 4734 render: (text, record, index) => {
... ... @@ -4847,12 +4856,12 @@ class CommonTableRc extends React.Component {
4847 4856 !selectedRowKeys.length ||
4848 4857 !data.some(item => item.sId === selectedRowKeys[0])
4849 4858 ) {
4850   - message.error("请先选择要复制的数据!", 3);
  4859 + message.error(copyFirst, 3);
4851 4860 return;
4852 4861 }
4853 4862  
4854 4863 if (data.some(item => item.bUnChanged)) {
4855   - message.error("请先保存新拆分数据!", 3);
  4864 + message.error(splitFirst, 3);
4856 4865 return;
4857 4866 }
4858 4867  
... ... @@ -4932,15 +4941,15 @@ class CommonTableRc extends React.Component {
4932 4941 ];
4933 4942  
4934 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 4948 onOk() {
4940 4949 props.parentProps.onExecInstructSet({
4941 4950 nextProps: { ...props, table0Data: table0DataNew },
4942 4951 btnConfig: {
4943   - showName: "保存",
  4952 + showName: BtnSave,
4944 4953 sInstruct: JSON.stringify([
4945 4954 {
4946 4955 opr: "save",
... ... @@ -4964,7 +4973,7 @@ class CommonTableRc extends React.Component {
4964 4973 });
4965 4974 }}
4966 4975 >
4967   - 复制
  4976 + {setCopy}
4968 4977 </Button>
4969 4978 ) : (
4970 4979 ""
... ... @@ -9338,9 +9347,9 @@ class CommonTableRc extends React.Component {
9338 9347  
9339 9348 // 系统记录状态
9340 9349 if (sName === "sPlcMachineStatus" || sName === "sPlcMachineStatusName") {
9341   - if (sValue === "运行") {
  9350 + if (sValue === "运行" || sValue === "In operation") {
9342 9351 noInputClass = styles.mesFinish;
9343   - } else if (sValue === "停机") {
  9352 + } else if (sValue === "停机" || sValue === "Shutdown") {
9344 9353 noInputClass = styles.mesStop;
9345 9354 }
9346 9355 }
... ...
src/mes/common/RunningStatus/index.js
... ... @@ -276,9 +276,11 @@ const RunningStatusModal = _props =&gt; {
276 276  
277 277 if (!bNotCheck) {
278 278 if (
279   - (parentTable0Data[iIndex].sPlcMachineStatusName === "运行" &&
  279 + ( (parentTable0Data[iIndex].sPlcMachineStatusName === "运行" ||
  280 + parentTable0Data[iIndex].sPlcMachineStatusName === "In operation"
  281 + ) &&
280 282 sClassifyName !== "sType1") ||
281   - (parentTable0Data[iIndex].sPlcMachineStatusName !== "运行" &&
  283 + ((parentTable0Data[iIndex].sPlcMachineStatusName !== "运行" || parentTable0Data[iIndex].sPlcMachineStatusName !== "In operation" )&&
282 284 sClassifyName === "sType1")
283 285 ) {
284 286 message.error("行车状态与当前选择不匹配,请重新选择!");
... ...