Browse Source

Merge pull request #9646 in DEC/decision-webui-dcm from research/mss-2.0 to research/fbp-1.0

* commit '50b9a9a181fd29fa37d88669c8ad80acb205371f':
  REPORT-126948 合并WebSocket的namespace和event FBP部分 数据结构调整
  REPORT-126948 合并WebSocket的namespace和event FBP部分
fbp/feature
superman 4 months ago
parent
commit
974aed4acd
  1. 9
      src/modules/crud/decision.api.ts
  2. 2
      types/globals.d.ts

9
src/modules/crud/decision.api.ts

@ -50,7 +50,7 @@ export class DecisionApi implements Api {
/**
*
* @returns
* @returns
*/
getDriverLoadPath(data: Connection): Promise<ResultType<string>> {
const form = {
@ -90,8 +90,7 @@ export class DecisionApi implements Api {
}
return new Promise((resolve, rejected) => {
this.addEventListener(editStatusEvent.OPEN, res => {
const data = JSON.parse(res.data);
this.addEventListener(editStatusEvent.OPEN, data => {
if (data.errorCode) {
let errorMessage = '';
@ -111,7 +110,7 @@ export class DecisionApi implements Api {
});
rejected(data);
} else {
resolve(res);
resolve(data);
}
});
});
@ -191,6 +190,6 @@ export class DecisionApi implements Api {
Dec.socket.removeListener(name);
}
Dec.socket.originOn(name, callback);
Dec.socket.on(name, callback);
}
}

2
types/globals.d.ts vendored

@ -12,7 +12,7 @@ declare const Dec: {
socket: {
connected: boolean;
emit: Function;
originOn: Function;
on: Function;
hasListeners: Function;
removeListener: Function;
};

Loading…
Cancel
Save