Commit fdb9805542310ab9c483bf1a5ed8a837d96f64bb

Authored by chenxt
2 parents 7bc4b753 b94104b8

Merge branch 'release/customer/2025/五彩' of http://git.xlyprint.cn/qiangmj/ebc-Me…

…s into release/customer/2025/五彩
Showing 1 changed file with 16 additions and 1 deletions
src/models/app.js
... ... @@ -67,6 +67,7 @@ export default {
67 67 "17087496600006537425550144737000": "serviceUpkeep"
68 68 },
69 69 changeExecInfo: {},
  70 + refreshExecInfo: {},
70 71 },
71 72 reducers: {
72 73 saveToken(state, { payload: token }) {
... ... @@ -217,6 +218,12 @@ export default {
217 218 }
218 219 return state;
219 220 },
  221 + saveRefreshExecInfo(state, { payload }) {
  222 + if (['/indexMes/productionExec'].includes(state?.currentMesPane?.sModelType)) {
  223 + localStorage.setItem(`${config.prefix}refreshExecInfo`, JSON.stringify({ ...payload || {} }));
  224 + }
  225 + return state;
  226 + },
220 227 saveCounter(state, { payload }) {
221 228 return { ...state, counterInfo: payload };
222 229 },
... ... @@ -668,11 +675,19 @@ export default {
668 675 } else if (false && rtmsg.action === 'workMsg') { // 工单系统消息
669 676 const msgData = JSON.parse(msg.data);
670 677 dispatch({ type: 'app/saveWorkMsg', payload: { workMsg: msgData.msg } });
671   - } else if (rtmsg.action === 'showOeeData') {
  678 + } else if (rtmsg.action === 'showOeeData') {
672 679 if (window.bChangeMachineData) {
673 680 const msgData = JSON.parse(msg.data);
674 681 dispatch({ type: 'app/changeMachineData', payload: { ...msgData.msg || {} } });
675 682 }
  683 + } else if (rtmsg.action === 'flushData') {
  684 + if (window.bChangeMachineData) {
  685 + const msgData = JSON.parse(msg.data);
  686 + dispatch({ type: 'app/saveRefreshExecInfo', payload: { ...msgData.msg || {} } });
  687 + }
  688 + } else if (rtmsg.action === 'showErroMsg') {
  689 + console.log('=====msgData', msgData);
  690 + message.error(msgData.msg);
676 691 }
677 692 };
678 693 ws.onmessage = (msg) => {
... ...